only use --wildcards for gnu tar
[openwrt/staging/dedeckeh.git] / openwrt / include / host.mk
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/.host.mk
9
10 $(TOPDIR)/.host.mk: $(INCLUDE_DIR)/host.mk
11 echo "HOST_OS:=`uname`" > $@
12 echo "HOST_ARCH:=` \
13 $(HOSTCC) -dumpmachine | sed -e s'/-.*//' \
14 -e 's/sparc.*/sparc/' \
15 -e 's/arm.*/arm/' \
16 -e 's/m68k.*/m68k/' \
17 -e 's/ppc/powerpc/' \
18 -e 's/v850.*/v850/' \
19 -e 's/sh[234]/sh/' \
20 -e 's/mips-.*/mips/' \
21 -e 's/mipsel-.*/mipsel/' \
22 -e 's/cris.*/cris/' \
23 -e 's/i[3-9]86/i386/'`" >> $@
24 echo "GNU_HOST_NAME:=`$(HOSTCC) -dumpmachine`" >> $@
25 if tar --version 2>&1 | grep 'GNU' >/dev/null; then \
26 echo "TAR_OPTIONS+=--wildcards" >> $@; \
27 fi
28