Fix the annoying base-files autorebuild bug.
[openwrt.git] / 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 $(TMP_DIR)/.host.mk
9
10 export TAR
11
12 $(TMP_DIR)/.host.mk: $(TOPDIR)/include/host.mk
13 @mkdir -p $(TMP_DIR)
14 @( \
15 HOST_OS=`uname`; \
16 case "$$HOST_OS" in \
17 Linux) HOST_ARCH=`uname -m`;; \
18 *) HOST_ARCH=`uname -p`;; \
19 esac; \
20 GNU_HOST_NAME=`gcc -dumpmachine`; \
21 [ -n "$$GNU_HOST_NAME" ] || \
22 GNU_HOST_NAME=`$(SCRIPT_DIR)/config.guess`; \
23 echo "HOST_OS:=$$HOST_OS" > $@; \
24 echo "HOST_ARCH:=$$HOST_ARCH" >> $@; \
25 echo "GNU_HOST_NAME:=$$GNU_HOST_NAME" >> $@; \
26 TAR=`which gtar 2>/dev/null`; \
27 [ -n "$$TAR" -a -x "$$TAR" ] || TAR=`which tar 2>/dev/null`; \
28 echo "TAR:=$$TAR" >> $@; \
29 ZCAT=`which gzcat 2>/dev/null`; \
30 [ -n "$$ZCAT" -a -x "$$ZCAT" ] || ZCAT=`which zcat 2>/dev/null`; \
31 echo "ZCAT:=$$ZCAT" >> $@; \
32 echo "BASH:=$(shell which bash)" >> $@; \
33 )
34
This page took 0.051889 seconds and 5 git commands to generate.