summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Korsgaard <jacmet@sunsite.dk>2008-11-03 20:11:03 +0000
committerPeter Korsgaard <jacmet@sunsite.dk>2008-11-03 20:11:03 +0000
commitb948fdba2219ac599b374ce4aa189bbc464048bf (patch)
tree7298fe029e13472f4f433f973e71448adcda266d
parent030a9d39b1754d7d9750308202686db8b5c929d7 (diff)
Makefile: ignore glib-genmarshal in staging_dir
HOST_GLIB is set to the path that contains the host glib tool set and is used when building packages using glib. The buildroot top level Makefile sets HOST_GLIB using which to find the path where glib-genmarshal is located. The problem is that a cross compiled version of glib-genmarshal is also put in the build_ARCH/staging_dir/usr/bin directory when the package libglib2 is built. This cross compiled version will typically not run on the host system. Fix it by ignoring staging_dir in the which output. Closes #5934 jacmet: fixed to work correctly if it's only found in staging_dir.
-rw-r--r--Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index c6e683a1d..f5d196712 100644
--- a/Makefile
+++ b/Makefile
@@ -122,7 +122,8 @@ HOSTCPP:=$(shell $(CONFIG_SHELL) -c "which $(HOSTCPP)" || type -p $(HOSTCPP) ||
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)`
+# ignore version in staging_dir
+HOST_GLIB_BIN:=`dirname $(shell $(CONFIG_SHELL) -c "(which -a glib-genmarshal; echo /usr/bin/glib-genmarshal)|grep -v staging_dir|head -n 1")`
HOST_GLIB:=$(shell $(CONFIG_SHELL) -c "dirname $(HOST_GLIB_BIN)" || echo /usr)