path: root/build-aux/
diff options
Diffstat (limited to 'build-aux/')
1 files changed, 12 insertions, 23 deletions
diff --git a/build-aux/ b/build-aux/
index dfbad5a..2e4adc6 100644
--- a/build-aux/
+++ b/build-aux/
@@ -17,34 +17,23 @@
include $(call _at.reverse,$(sort $(wildcard $(topsrcdir)/build-aux/Makefile.each.tail/*.mk)))
-at.subdirs := $(patsubst ./%,%,$(addprefix $(outdir)/,$(at.subdirs)))
-at.depdirs := $(patsubst ./%,%,$(addprefix $(outdir)/,$(at.depdirs)))
+_at.tmp_targets := $(at.targets)
+_at.tmp_subdirs := $(call at.addprefix,$(outdir),$(at.subdirs))
-# 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))
+# Clean the environment
+$(eval \
+ $(foreach _at.tmp_variable,$(filter-out $(call _at.quote-pattern,_at.tmp_variable $(_at.VARIABLES)),$(.VARIABLES)),\
+ $(call _at.target_variable,$(_at.tmp_targets),$(_at.tmp_variable))$(\
+ undefine $(_at.tmp_variable)$(
-# 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
+# Recurse
$(foreach _at.NO_ONCE,y,\
- $(foreach makefile,$(call at.path,$(addsuffix /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 ($(_at.NO_ONCE),)
-outdir = /bogus
-srcdir = /bogus
-$(foreach v,$(at.dirlocal),$(eval $v=))
+ifeq ($(origin _at.NO_ONCE),undefined)
include $(call _at.reverse,$(sort $(wildcard $(topsrcdir)/build-aux/Makefile.once.tail/*.mk)))