Make the build for libraries more robust in case of mis-spelling

This commit is contained in:
Christophe de Dinechin 2017-11-28 18:22:01 +01:00
parent 502d12b9b6
commit 172dbe84d6
1 changed files with 2 additions and 2 deletions

View File

@ -261,9 +261,9 @@ recurse: $(SUBDIRS:%=%.recurse)
# If LIBRARIES=foo/bar, go to directory foo/bar, which should build bar.a
$(OUTPUT)$(LIB_PFX)%$(LIB_EXT): $(DEEP_BUILD)
+$(PRINT_COMMAND) cd $(filter %$*, $(LIBRARIES:.lib=) $(SUBDIRS)) && $(RECURSE_CMD)
+$(PRINT_COMMAND) cd $(firstword $(dir $(filter %$*, $(LIBRARIES:.lib=) $(SUBDIRS))) .) && $(RECURSE_CMD)
$(OUTPUT)$(DLL_PFX)%$(DLL_EXT): $(DEEP_BUILD)
+$(PRINT_COMMAND) cd $(filter %$*, $(LIBRARIES:.dll=) $(SUBDIRS)) && $(RECURSE_CMD)
+$(PRINT_COMMAND) cd $(firstword $(dir $(filter %$*, $(LIBRARIES:.dll=) $(SUBDIRS))) .) && $(RECURSE_CMD)
%/.test:
+$(PRINT_TEST) cd $* && $(MAKE) TARGET=$(TARGET) test
deep_build: