]> Git Repo - buildroot-mgba.git/commitdiff
Makefile: ignore glib-genmarshal in staging_dir
authorPeter Korsgaard <[email protected]>
Mon, 3 Nov 2008 20:11:03 +0000 (20:11 -0000)
committerPeter Korsgaard <[email protected]>
Mon, 3 Nov 2008 20:11:03 +0000 (20:11 -0000)
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.

Makefile

index c6e683a1d555c34cc93369fca1272cdd285945d6..f5d1967129cf6ea192f3888b76b17120bb055be2 100644 (file)
--- 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)
 
 
This page took 0.033576 seconds and 4 git commands to generate.