]> mj.ucw.cz Git - libucw.git/commitdiff
Build system hack: set PKG_CONFIG_PATH in shell commands.
authorMartin Mares <mj@ucw.cz>
Wed, 25 Jun 2008 09:06:02 +0000 (11:06 +0200)
committerMartin Mares <mj@ucw.cz>
Wed, 25 Jun 2008 14:21:28 +0000 (16:21 +0200)
Unfortunately, even if we `export PKG_CONFIG_PATH' explicitly in the makefiles,
make still ignores it for $(shell).

build/Makebottom

index bf9a49e966489e0c5479274212b0ec0c56fcc064..1a37a35b71903bcd5aa47e4e364ba0cb8376315c 100644 (file)
@@ -123,7 +123,7 @@ $(o)/%-tt.o: $(s)/%.c $(o)/autoconf.h
 
 $(o)/%-t: $(o)/%-tt.o $(TESTING_DEPS)
        $(M)LD-TEST $@
-       $(Q)$(CC) $(LDFLAGS) -o $@ $(shell $(s)/build/lib-flags $^) $(LIBS)
+       $(Q)$(CC) $(LDFLAGS) -o $@ $(shell PKG_CONFIG_PATH="$(PKG_CONFIG_PATH)" $(s)/build/lib-flags $^) $(LIBS)
 
 $(o)/%.test: $(s)/%.t $(s)/build/tester
        $(M)TEST $@
@@ -135,7 +135,7 @@ BINDIR=bin
 
 $(o)/%: $(o)/%.o
        $(M)LD $@
-       $(Q)$(CC) $(LDFLAGS) -o $@ $(shell $(s)/build/lib-flags $^) $(LIBS)
+       $(Q)$(CC) $(LDFLAGS) -o $@ $(shell PKG_CONFIG_PATH="$(PKG_CONFIG_PATH)" $(s)/build/lib-flags $^) $(LIBS)
        $(Q)$(call symlink,$@,run/$(BINDIR))
 
 $(o)/%: $(s)/%.sh $(o)/config.mk $(s)/build/genconf