diff options
author | Peter Korsgaard <jacmet@sunsite.dk> | 2009-01-01 21:20:35 +0000 |
---|---|---|
committer | Peter Korsgaard <jacmet@sunsite.dk> | 2009-01-01 21:20:35 +0000 |
commit | 69f8592407635cc7b36aebac692e24a02b046aab (patch) | |
tree | 45744fac12f296318e2bbf7e234b6a58fb0da9f3 | |
parent | ae6011eb3360be00b2c72b98faea6398c418770a (diff) |
buildroot: set SHELL instead of messing around with CONFIG_SHELL
Simply set SHELL to bash instead of adding CONFIG_SHELL to all shell
invocations. CONFIG_SHELL is still set, as it is used by kconfig.
-rw-r--r-- | Makefile | 30 | ||||
-rw-r--r-- | package/Makefile.autotools.in | 2 | ||||
-rw-r--r-- | package/Makefile.in | 6 | ||||
-rw-r--r-- | package/busybox/initramfs.mk | 2 | ||||
-rw-r--r-- | package/lzma/lzma.mk | 4 | ||||
-rw-r--r-- | target/initramfs/initramfs.mk | 2 |
6 files changed, 25 insertions, 21 deletions
@@ -79,11 +79,15 @@ else Q=@ endif -CONFIG_SHELL:=$(shell if [ -x "$$BASH" ]; then echo $$BASH; \ +# we want bash as shell +SHELL:=$(shell if [ -x "$$BASH" ]; then echo $$BASH; \ else if [ -x /bin/bash ]; then echo /bin/bash; \ else echo sh; fi; fi) -export CONFIG_SHELL quiet Q KBUILD_VERBOSE VERBOSE +# kconfig uses CONFIG_SHELL +CONFIG_SHELL:=$(SHELL) + +export SHELL CONFIG_SHELL quiet Q KBUILD_VERBOSE VERBOSE ifndef HOSTAR HOSTAR:=ar @@ -113,17 +117,17 @@ endif ifndef HOSTNM HOSTNM:=nm endif -HOSTAR:=$(shell $(CONFIG_SHELL) -c "which $(HOSTAR)" || type -p $(HOSTAR) || echo ar) -HOSTAS:=$(shell $(CONFIG_SHELL) -c "which $(HOSTAS)" || type -p $(HOSTAS) || echo as) -HOSTCC:=$(shell $(CONFIG_SHELL) -c "which $(HOSTCC)" || type -p $(HOSTCC) || echo gcc) -HOSTCXX:=$(shell $(CONFIG_SHELL) -c "which $(HOSTCXX)" || type -p $(HOSTCXX) || echo g++) -HOSTFC:=$(shell $(CONFIG_SHELL) -c "which $(HOSTLD)" || type -p $(HOSTLD) || echo || which g77 || type -p g77 || echo gfortran) -HOSTCPP:=$(shell $(CONFIG_SHELL) -c "which $(HOSTCPP)" || type -p $(HOSTCPP) || echo cpp) -HOSTLD:=$(shell $(CONFIG_SHELL) -c "which $(HOSTLD)" || type -p $(HOSTLD) || echo ld) -HOSTLN:=$(shell $(CONFIG_SHELL) -c "which $(HOSTLN)" || type -p $(HOSTLN) || echo ln) -HOSTNM:=$(shell $(CONFIG_SHELL) -c "which $(HOSTNM)" || type -p $(HOSTNM) || echo nm) -HOST_GLIB_BIN:=`dirname $(shell $(CONFIG_SHELL) -c "which glib-genmarshal" || echo /usr/bin/glib-genmarshal)` -HOST_GLIB:=$(shell $(CONFIG_SHELL) -c "dirname $(HOST_GLIB_BIN)" || echo /usr) +HOSTAR:=$(shell which $(HOSTAR) || type -p $(HOSTAR) || echo ar) +HOSTAS:=$(shell which $(HOSTAS) || type -p $(HOSTAS) || echo as) +HOSTCC:=$(shell which $(HOSTCC) || type -p $(HOSTCC) || echo gcc) +HOSTCXX:=$(shell which $(HOSTCXX) || type -p $(HOSTCXX) || echo g++) +HOSTFC:=$(shell which $(HOSTLD) || type -p $(HOSTLD) || echo || which g77 || type -p g77 || echo gfortran) +HOSTCPP:=$(shell which $(HOSTCPP) || type -p $(HOSTCPP) || echo cpp) +HOSTLD:=$(shell which $(HOSTLD) || type -p $(HOSTLD) || echo ld) +HOSTLN:=$(shell which $(HOSTLN) || type -p $(HOSTLN) || echo ln) +HOSTNM:=$(shell which $(HOSTNM) || type -p $(HOSTNM) || echo nm) +HOST_GLIB_BIN:=`dirname $(shell which glib-genmarshal || echo /usr/bin/glib-genmarshal)` +HOST_GLIB:=$(shell dirname $(HOST_GLIB_BIN) || echo /usr) ifndef CFLAGS_FOR_BUILD diff --git a/package/Makefile.autotools.in b/package/Makefile.autotools.in index ce6ad0f8f..6ed9c31fe 100644 --- a/package/Makefile.autotools.in +++ b/package/Makefile.autotools.in @@ -127,7 +127,7 @@ TAR ?= tar # ACLOCAL="$(ACLOCAL)" # Automatically detect tar --strip-path/components option -TAR_STRIP_COMPONENTS := $(shell $(CONFIG_SHELL) -c '$(TAR) --help | grep strip-path > /dev/null ; if test $$? = 0 ; then echo '--strip-path' ; else echo '--strip-components' ; fi') +TAR_STRIP_COMPONENTS := $(shell $(TAR) --help | grep strip-path > /dev/null ; if test $$? = 0 ; then echo '--strip-path' ; else echo '--strip-components' ; fi) ################################################################################ # Implicit targets -- produce a stamp file for each step of a package build diff --git a/package/Makefile.in b/package/Makefile.in index ca6dd1498..186329cf1 100644 --- a/package/Makefile.in +++ b/package/Makefile.in @@ -4,7 +4,7 @@ endif ifndef HOSTMAKE HOSTMAKE=$(MAKE) endif -HOSTMAKE :=$(shell $(CONFIG_SHELL) -c "which $(HOSTMAKE)" || type -p $(HOSTMAKE) || echo make) +HOSTMAKE :=$(shell which $(HOSTMAKE) || type -p $(HOSTMAKE) || echo make) MAKE1:=$(HOSTMAKE) -j1 MAKE:=$(HOSTMAKE) -j$(BR2_JLEVEL) @@ -178,8 +178,8 @@ TARGET_STRIP=true -Not_stripping STRIPCMD=$(TARGET_STRIP) endif INSTALL=/usr/bin/install -FLEX:=$(shell $(CONFIG_SHELL) -c 'which flex || type -p flex') -BISON:=$(shell $(CONFIG_SHELL) -c 'which bison || type -p bison') +FLEX:=$(shell which flex || type -p flex) +BISON:=$(shell which bison || type -p bison) HOST_ARCH:=$(shell $(HOSTCC) -dumpmachine | sed -e s'/-.*//' \ -e 's/sparc.*/sparc/' \ diff --git a/package/busybox/initramfs.mk b/package/busybox/initramfs.mk index e3e654cda..c2e144c86 100644 --- a/package/busybox/initramfs.mk +++ b/package/busybox/initramfs.mk @@ -112,7 +112,7 @@ $(BB_INITRAMFS_TARGET): host-fakeroot $(BR2_INITRAMFS_DIR)/bin/busybox rm -f $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(BB_INITRAMFS_TARGET)) (echo "chown -R 0:0 $(PROJECT_BUILD_DIR)/initramfs"; \ echo "$(STAGING_DIR)/bin/makedevs -d $(TARGET_DEVICE_TABLE) $(PROJECT_BUILD_DIR)/initramfs"; \ - echo "$(CONFIG_SHELL) target/initramfs/gen_initramfs_list.sh -u 0 -g 0 $(PROJECT_BUILD_DIR)/initramfs > $(BB_INITRAMFS_TARGET)"; \ + echo "$(SHELL) target/initramfs/gen_initramfs_list.sh -u 0 -g 0 $(PROJECT_BUILD_DIR)/initramfs > $(BB_INITRAMFS_TARGET)"; \ ) > $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(BB_INITRAMFS_TARGET)) chmod +x $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(BB_INITRAMFS_TARGET)) $(STAGING_DIR)/usr/bin/fakeroot -- \ diff --git a/package/lzma/lzma.mk b/package/lzma/lzma.mk index 8d13d4428..130292f08 100644 --- a/package/lzma/lzma.mk +++ b/package/lzma/lzma.mk @@ -13,8 +13,8 @@ LZMA_TARGET_BINARY:=bin/lzma # lzma binary for use on the host LZMA=$(TOOL_BUILD_DIR)/bin/lzma -HOST_LZMA_BINARY=$(shell $(CONFIG_SHELL) package/lzma/lzmacheck.sh) -HOST_LZMA_IF_ANY=$(shell $(CONFIG_SHELL) toolchain/dependencies/check-host-lzma.sh) +HOST_LZMA_BINARY=$(shell package/lzma/lzmacheck.sh) +HOST_LZMA_IF_ANY=$(shell toolchain/dependencies/check-host-lzma.sh) $(DL_DIR)/$(LZMA_SOURCE): diff --git a/target/initramfs/initramfs.mk b/target/initramfs/initramfs.mk index 6ace2f114..d7a77c17c 100644 --- a/target/initramfs/initramfs.mk +++ b/target/initramfs/initramfs.mk @@ -34,7 +34,7 @@ endif echo "$(STAGING_DIR)/bin/makedevs -d $(TARGET_DEVICE_TABLE) $(TARGET_DIR)" \ >> $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(TAR_TARGET)) # Use fakeroot so gen_initramfs_list.sh believes the previous fakery - echo "$(CONFIG_SHELL) target/initramfs/gen_initramfs_list.sh -u 0 -g 0 $(TARGET_DIR) > $(INITRAMFS_TARGET)" \ + echo "$(SHELL) target/initramfs/gen_initramfs_list.sh -u 0 -g 0 $(TARGET_DIR) > $(INITRAMFS_TARGET)" \ >> $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(TAR_TARGET)) chmod a+x $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(TAR_TARGET)) $(STAGING_DIR)/usr/bin/fakeroot -- $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(TAR_TARGET)) |