diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-08-07 21:03:44 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-08-07 21:03:44 -0400 |
commit | 8a5ecbb4fcaf0d9864074666a45d9263b73f31b8 (patch) | |
tree | 49e95e6d4d1c2745c16778ebd5016e32ec2419e5 /build-aux/Makefile.tail.mk | |
parent | a13198f6ea2547d69159be7a2f2a1b1c0119c6f9 (diff) |
(systemd) stuff
Diffstat (limited to 'build-aux/Makefile.tail.mk')
-rw-r--r-- | build-aux/Makefile.tail.mk | 40 |
1 files changed, 15 insertions, 25 deletions
diff --git a/build-aux/Makefile.tail.mk b/build-aux/Makefile.tail.mk index a8b3d89..136e483 100644 --- a/build-aux/Makefile.tail.mk +++ b/build-aux/Makefile.tail.mk @@ -17,36 +17,26 @@ include $(call _at.reverse,$(sort $(wildcard $(topsrcdir)/build-aux/Makefile.each.tail/*.mk))) -# Move all of the dirlocal variables to their namespaced version -$(foreach v,$(at.dirlocal),$(eval $v/$(outdir) := $$($v))) -$(foreach v,$(at.dirlocal),$(eval undefine $v)) - -# Adjust subdirs and depdirs to be relative to $(outdir) -at.subdirs/$(outdir) := $(sort $(patsubst %/,%,$(call at.addprefix,$(outdir)/,$(at.subdirs/$(outdir))))) -at.depdirs/$(outdir) := $(sort $(patsubst %/,%,$(call at.addprefix,$(outdir)/,$(at.depdirs/$(outdir))))) - -# Remember that this is a directory that we've visited -_at.outdirs := $(_at.outdirs) $(outdir) - -# Generic phony target declarations: -# mark them phony -.PHONY: $(addprefix $(outdir)/,$(at.phony)) -# have them depend on subdirs -$(foreach t,$(at.phony),$(eval $(outdir)/$t: $(addsuffix /$t,$(at.subdirs/$(outdir))))) - -# Include Makefiles from other directories +_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))) + +# Recurse $(foreach _at.NO_ONCE,y,\ - $(foreach makefile,$(call at.path,$(addsuffix /$(at.Makefile),$(at.subdirs/$(outdir)) $(at.depdirs/$(outdir)))),\ - $(eval include $(filter-out $(_at.included_makefiles),$(makefile))))) + $(foreach _at.tmp,$(call at.path,$(addsuffix /$(at.Makefile),$(_at.tmp_subdirs))),\ + $(if $(filter-out $(_at.MAKEFILE_LIST),$(abspath $(_at.tmp))),\ + $(eval include $(_at.tmp))))) # This bit only gets evaluated once, after all of the other Makefiles are read ifeq ($(origin _at.NO_ONCE),undefined) -outdir = /bogus -srcdir = /bogus - -$(foreach v,$(at.dirlocal),$(eval $v=)) - include $(call _at.reverse,$(sort $(wildcard $(topsrcdir)/build-aux/Makefile.once.tail/*.mk))) endif # _at.NO_ONCE |