diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-06-15 01:37:04 -0400 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-06-15 01:37:04 -0400 |
commit | 570e0dd0f7bb790ad83adfdb74708fa893a3c4a3 (patch) | |
tree | bb2faaaf5543238a003e2f6e977f1c23e7f80481 /Makefile | |
parent | 80b378afd5e641809c373f55653b2049054510a2 (diff) |
Makefile: also set PATH from dependencies
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -135,9 +135,13 @@ package_generic =$(filter-out $(patsubst rules/%/Makefile,%,$(wildcard rules/*/M dirs2jars = $(if $1,$(shell $(FIND) $1 -name '*.jar')) deps2jars = $(filter %.jar,$1) $(call dirs2jars,$(filter build/packages/%,$1)) -deps2classpath = $(shell $(ECHO) $(abspath $(call deps2jars,$1)) | $(SED) 'y/ /:/') +deps2classpath = $(shell $(ECHO) $(abspath $(call deps2jars,$1)) $(CLASSPATH) | $(SED) 'y/ /:/') -recurse = CLASSPATH='$(call deps2classpath,$^)' extra_makefiles='$(abspath $(wildcard rules/$*/*.mk))' $(MAKE) -C build/workdir/$* -f '$1' install DESTDIR='$(top)/$@' +deps2bindirs = $(if $1,$(sort $(shell $(FIND) $1 -type f -executable -printf '%h\n' 2>/dev/null))) +sanitize_bindirs = $(filter-out $(subst :, ,$(PATH)),$(abspath $1)) +deps2path = $(shell $(ECHO) $(call sanitize_bindirs,$(call deps2bindirs,$1)) $(PATH) | $(SED) 'y/ /:/') + +recurse = PATH='$(call deps2path,$^)' CLASSPATH='$(call deps2classpath,$^)' extra_makefiles='$(abspath $(wildcard rules/$*/*.mk))' $(MAKE) -C build/workdir/$* -f '$1' install DESTDIR='$(top)/$@' $(addprefix build/packages/,$(package_specific)): \ build/packages/%: RECURSIVE build/workdir/% rules/%/Makefile |