diff options
Diffstat (limited to 'src/Makefile.housekeeping')
-rw-r--r-- | src/Makefile.housekeeping | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/Makefile.housekeeping b/src/Makefile.housekeeping index 80b70f5c..8603bfd6 100644 --- a/src/Makefile.housekeeping +++ b/src/Makefile.housekeeping @@ -1011,15 +1011,20 @@ $(BIN)/%.nodeps : $(BIN)/%.tmp # Get licensing verdict for the specified target # define licensable_deps_list - $(filter-out config/local/%.h,$(call deps_list,$(1))) + $(filter-out config/local/%.h,\ + $(filter-out $(BIN)/.%.list,\ + $(call deps_list,$(1)))) endef define unlicensed_deps_list $(shell grep -L FILE_LICENCE $(call licensable_deps_list,$(1))) endef define licence_list - $(patsubst __licence_%,%,\ - $(filter __licence_%,$(shell $(NM) $(1) | cut -d" " -f3))) + $(sort $(foreach LICENCE,\ + $(filter __licence__%,$(shell $(NM) $(1) | cut -d" " -f3)),\ + $(word 2,$(subst __, ,$(LICENCE))))) endef +$(BIN)/%.licence_list : $(BIN)/%.tmp + $(Q)$(ECHO) $(call licence_list,$<) $(BIN)/%.licence : $(BIN)/%.tmp $(QM)$(ECHO) " [LICENCE] $@" $(Q)$(if $(strip $(call unlicensed_deps_list,$<)),\ |