1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-09-28 03:06:20 -04:00

Speed up the build time by not using templates + eval

Seems to half the traversal of an already build time.
Reverts 70a0f339e8.
This commit is contained in:
Jonas Fonseca 2006-01-14 12:41:27 +01:00 committed by Jonas Fonseca
parent c8aa6c2360
commit ef23ef93a2

View File

@ -198,25 +198,28 @@ endif
RULES = all install clean cleanall init check test RULES = all install clean cleanall init check test
# Setup the basic dependencies. RULES_LOCAL = $(addsuffix -local,$(RULES))
define basic_dependency RULES_REC = $(addsuffix -recursive,$(RULES))
.PHONY: $(1) $(1)-recursive
# First decend subdirs, then do all the default stuff and finally do any local .PHONY: $(RULES) $(RULES_LOCAL) $(RULES_REC) $(addsuffix -default,$(RULES))
# hooks which can then depend on the default hook making things.
$(1): $(1)-recursive $(1)-default $(1)-local
# The -recursive rules decend all subdirs. # The -recursive rules decend all subdirs.
$(1)-recursive: $(RULES_REC):
@$(foreach subdir,$(sort $(SUBDIRS)), \ @$(foreach subdir,$(sort $(SUBDIRS)), \
$(call ncmd,recmake,$(subdir),$(1)) || exit 1;) $(call ncmd,recmake,$(subdir),$(subst -recursive,,$@)) || exit 1;)
# Dummy rules for local hooks # Dummy -local rules
$(1)-local: $(RULES_LOCAL):
endef
$(foreach rule,$(RULES),$(eval $(call basic_dependency,$(rule))))
# 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 # Misc