From ef23ef93a286fde9edf07a0bcc70ff9469598c46 Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Sat, 14 Jan 2006 12:41:27 +0100 Subject: [PATCH] Speed up the build time by not using templates + eval Seems to half the traversal of an already build time. Reverts 70a0f339e8eff757d43e40f965f49184678a853b. --- Makefile.lib | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/Makefile.lib b/Makefile.lib index e23b5a6f..f7b108e0 100644 --- a/Makefile.lib +++ b/Makefile.lib @@ -198,25 +198,28 @@ endif RULES = all install clean cleanall init check test -# Setup the basic dependencies. -define basic_dependency -.PHONY: $(1) $(1)-recursive +RULES_LOCAL = $(addsuffix -local,$(RULES)) +RULES_REC = $(addsuffix -recursive,$(RULES)) -# First decend subdirs, then do all the default stuff and finally do any local -# hooks which can then depend on the default hook making things. -$(1): $(1)-recursive $(1)-default $(1)-local +.PHONY: $(RULES) $(RULES_LOCAL) $(RULES_REC) $(addsuffix -default,$(RULES)) # The -recursive rules decend all subdirs. -$(1)-recursive: +$(RULES_REC): @$(foreach subdir,$(sort $(SUBDIRS)), \ - $(call ncmd,recmake,$(subdir),$(1)) || exit 1;) + $(call ncmd,recmake,$(subdir),$(subst -recursive,,$@)) || exit 1;) -# Dummy rules for local hooks -$(1)-local: -endef - -$(foreach rule,$(RULES),$(eval $(call basic_dependency,$(rule)))) +# Dummy -local rules +$(RULES_LOCAL): +# Default deps +rule_deps = $(1)-recursive $(1)-default $(1)-local +all: $(call rule_deps,all) +install: $(call rule_deps,install) +clean: $(call rule_deps,clean) +cleanall: $(call rule_deps,cleanall) +init: $(call rule_deps,init) +check: $(call rule_deps,check) +test: $(call rule_deps,test) ############################################################################# # Misc