summaryrefslogtreecommitdiff
path: root/build-aux
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-08-08 01:09:59 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-08-08 01:09:59 -0400
commitbf8f76973a833659ce4ac730c4918c382192d3e0 (patch)
tree6e3e78da593c4d06a1d23ed61a614c947adbb618 /build-aux
parent8a5ecbb4fcaf0d9864074666a45d9263b73f31b8 (diff)
(systemd) speed up
Diffstat (limited to 'build-aux')
-rw-r--r--build-aux/Makefile.each.head/00-files.mk4
-rw-r--r--build-aux/Makefile.each.tail/10-files.mk22
-rw-r--r--build-aux/Makefile.head.mk6
-rw-r--r--build-aux/Makefile.once.head/zz-mod.mk2
-rw-r--r--build-aux/Makefile.tail.mk10
5 files changed, 24 insertions, 20 deletions
diff --git a/build-aux/Makefile.each.head/00-files.mk b/build-aux/Makefile.each.head/00-files.mk
index 7bf323e..c9a94e1 100644
--- a/build-aux/Makefile.each.head/00-files.mk
+++ b/build-aux/Makefile.each.head/00-files.mk
@@ -22,8 +22,8 @@ files.src = $(sort $(foreach _files.v,$(filter files.src.%,$(.VARIABLES)),$($(_f
files.out.slow ?=
files.out.int ?=
files.out.cfg ?=
-$(foreach t,$(files.groups),$(eval files.out.$t ?=))
+$(eval $(foreach t,$(files.groups),files.out.$t ?=$(at.nl)))
files.out = $(sort $(foreach _files.v,$(filter files.out.%,$(.VARIABLES)),$($(_files.v))))
-$(foreach t,$(files.groups),$(eval files.sys.$t ?=))
+$(eval $(foreach t,$(files.groups),files.sys.$t ?=$(at.nl)))
files.sys = $(sort $(foreach _files.v,$(filter files.sys.%,$(.VARIABLES)),$($(_files.v))))
diff --git a/build-aux/Makefile.each.tail/10-files.mk b/build-aux/Makefile.each.tail/10-files.mk
index 4607c43..8ab187b 100644
--- a/build-aux/Makefile.each.tail/10-files.mk
+++ b/build-aux/Makefile.each.tail/10-files.mk
@@ -14,12 +14,13 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Add some more defaults to the *_files variables
-$(foreach _files.var,$(patsubst files.%,%,files.src $(filter files.src.%,$(.VARIABLES))),\
- $(eval _files.$(_files.var) = $$(call at.addprefix,$$(srcdir),$$(files.$(_files.var)))))
-$(foreach _files.var,$(patsubst files.%,%,files.out $(filter files.out.%,$(.VARIABLES))),\
- $(eval _files.$(_files.var) = $$(call at.addprefix,$$(outdir),$$(files.$(_files.var)))))
-$(foreach _files.var,$(patsubst files.%,%,files.sys $(filter files.sys.%,$(.VARIABLES))),\
- $(eval _files.$(_files.var) = $$(addprefix $$(DESTDIR),$$(files.$(_files.var)))))
+$(eval \
+ $(foreach _files.var,$(filter files.src files.src.%,$(.VARIABLES)),\
+ _$(_files.var) = $$(call at.addprefix,$$(srcdir),$$($(_files.var)))$(at.nl))\
+ $(foreach _files.var,$(filter files.out files.out.%,$(.VARIABLES)),\
+ _$(_files.var) = $$(call at.addprefix,$$(outdir),$$($(_files.var)))$(at.nl))\
+ $(foreach _files.var,$(filter files.sys files.sys.%,$(.VARIABLES)),\
+ _$(_files.var) = $$(addprefix $$(DESTDIR),$$($(_files.var)))$(at.nl)))
_files.all = $(_files.src) $(_files.out) $(_files.sys)
@@ -29,10 +30,11 @@ at.targets += $(subst *,%,$(_files.all))
$(outdir)/$(files.generate): $(_files.src.gen) $(_files.src.cfg)
$(outdir)/install: $(_files.sys.$(files.default))
$(outdir)/installdirs: $(sort $(dir $(_files.sys)))
-$(foreach _files.g,$(files.groups),\
- $(eval $$(outdir)/$(_files.g): $$(_files.out.$(_files.g))))
-$(foreach _files.g,$(filter-out $(files.default),$(files.groups)),\
- $(eval $$(outdir)/install-$(_files.g): $$(_files.sys.$(_files.g))))
+$(eval \
+ $(foreach _files.g,$(files.groups),\
+ $$(outdir)/$(_files.g): $$(_files.out.$(_files.g))$(at.nl))\
+ $(foreach _files.g,$(filter-out $(files.default),$(files.groups)),\
+ $$(outdir)/install-$(_files.g): $$(_files.sys.$(_files.g)))$(at.nl))
# Destructive targets
_files.uninstall = $(_files.sys)
diff --git a/build-aux/Makefile.head.mk b/build-aux/Makefile.head.mk
index 8213043..105432c 100644
--- a/build-aux/Makefile.head.mk
+++ b/build-aux/Makefile.head.mk
@@ -47,6 +47,10 @@ _at.addprefix = $(call _at.path,$(if $(filter-out /%,$2),$1/$2,$2))
_at.rest = $(wordlist 2,$(words $1),$1)
_at.reverse = $(if $1,$(call _at.reverse,$(_at.rest))) $(firstword $1)
+_at.target_variable = $(_at.target_variable.$(flavor $2))
+_at.target_variable.recursive = $1: private $2 = $(subst $(at.nl),$$(at.nl),$(value $2))
+_at.target_variable.simple = $1: private $2 := $$($2)
+
# Sanity checking ######################################################
ifeq ($(filter undefine,$(.FEATURES)),)
$(error Autothing: We need a version of Make that supports 'undefine')
@@ -61,8 +65,6 @@ ifneq ($(call _at.is_strict_subdir,$(topoutdir),$(topsrcdir)),)
$(error Autothing: topsrcdir=$(topsrcdir) must not be a subdirectory of topoutdir=$(topoutdir))
endif
-# Internal setup #######################################################
-
# External provisions ##################################################
# These 4 functions are all $(call _at.func,parent,child)
diff --git a/build-aux/Makefile.once.head/zz-mod.mk b/build-aux/Makefile.once.head/zz-mod.mk
index 3bf6398..7e52606 100644
--- a/build-aux/Makefile.once.head/zz-mod.mk
+++ b/build-aux/Makefile.once.head/zz-mod.mk
@@ -19,6 +19,8 @@ _mod.target = at-mod-info
_mod.modules := $(sort $(patsubst %.mk,%,$(filter %.mk,$(subst -, ,$(notdir $(wildcard $(topsrcdir)/build-aux/Makefile.*/??-*.mk))))))
_mod.quote = '$(subst ','\'',$1)'
+$(eval $(foreach _mod.tmp,$(_mod.modules),mod.$(_mod.tmp).description ?=$(at.nl)mod.$(_mod.tmp).depends ?=$(at.nl)))
+
_mod.vars = $(filter $(addsuffix .%,$(_mod.modules)),$(.VARIABLES))
_mod.once := $(_mod.vars)
_mod.each :=
diff --git a/build-aux/Makefile.tail.mk b/build-aux/Makefile.tail.mk
index 136e483..aeba2d1 100644
--- a/build-aux/Makefile.tail.mk
+++ b/build-aux/Makefile.tail.mk
@@ -21,12 +21,10 @@ _at.tmp_targets := $(at.targets)
_at.tmp_subdirs := $(call at.addprefix,$(outdir),$(at.subdirs))
# Clean the environment
-$(foreach _at.tmp_variable,$(filter-out _at.tmp_variable $(_at.VARIABLES),$(.VARIABLES)), \
- $(foreach _at.tmp_target,$(_at.tmp_targets), \
- $(if $(filter recursive,$(flavor $(_at.tmp_variable))), \
- $(eval $(_at.tmp_target): private $(_at.tmp_variable) = $(subst $(at.nl),$$(at.nl),$(value $(_at.tmp_variable)))), \
- $(eval $(_at.tmp_target): private $(_at.tmp_variable) := $$($(_at.tmp_variable))))) \
- $(eval undefine $(_at.tmp_variable)))
+$(eval \
+ $(foreach _at.tmp_variable,$(filter-out _at.tmp_variable $(_at.VARIABLES),$(.VARIABLES)),\
+ $(call _at.target_variable,$(_at.tmp_targets),$(_at.tmp_variable))$(at.nl)\
+ undefine $(_at.tmp_variable)$(at.nl)))
# Recurse
$(foreach _at.NO_ONCE,y,\