summaryrefslogtreecommitdiff
path: root/build-aux/Makefile.each.tail
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2018-03-27 20:25:30 -0400
committerLuke Shumaker <lukeshu@lukeshu.com>2018-03-27 21:27:19 -0400
commit36f875645e36bf1ff015cc7d3441de2e1714b6fc (patch)
tree389963de82b80d9abc176a5ddd6e5c9a35e4d21d /build-aux/Makefile.each.tail
parent619cd45359e7ca762d2055f7ef4de2c12f85e9b2 (diff)
Makefile: files,nested: Don't create pseudo-targets masking real files
Diffstat (limited to 'build-aux/Makefile.each.tail')
-rw-r--r--build-aux/Makefile.each.tail/09-nested.mk (renamed from build-aux/Makefile.each.tail/10-nested.mk)9
-rw-r--r--build-aux/Makefile.each.tail/10-files.mk6
2 files changed, 9 insertions, 6 deletions
diff --git a/build-aux/Makefile.each.tail/10-nested.mk b/build-aux/Makefile.each.tail/09-nested.mk
index 667ec6f..ce36da3 100644
--- a/build-aux/Makefile.each.tail/10-nested.mk
+++ b/build-aux/Makefile.each.tail/09-nested.mk
@@ -1,4 +1,4 @@
-# Copyright (C) 2016-2017 Luke Shumaker
+# Copyright (C) 2016-2018 Luke Shumaker
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
@@ -13,9 +13,10 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-$(eval $(foreach _tmp.nested,$(nested.targets),\
+_nested.targets := $(notdir $(filter-out $(at.targets),$(addprefix $(outdir)/,$(nested.targets))))
+$(eval $(foreach _tmp.nested,$(_nested.targets),\
$$(outdir)/$(_tmp.nested): $$(addsuffix /$(_tmp.nested),$$(call at.addprefix,$$(outdir),$$(nested.subdirs)))$(at.nl)))
-.PHONY: $(addprefix $(outdir)/,$(nested.targets))
+.PHONY: $(addprefix $(outdir)/,$(_nested.targets))
at.subdirs += $(nested.subdirs)
-at.targets += $(addprefix $(outdir)/,$(nested.targets))
+at.targets += $(addprefix $(outdir)/,$(_nested.targets))
diff --git a/build-aux/Makefile.each.tail/10-files.mk b/build-aux/Makefile.each.tail/10-files.mk
index 787a3bd..015a0ad 100644
--- a/build-aux/Makefile.each.tail/10-files.mk
+++ b/build-aux/Makefile.each.tail/10-files.mk
@@ -1,4 +1,4 @@
-# Copyright (C) 2015-2017 Luke Shumaker
+# Copyright (C) 2015-2018 Luke Shumaker
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
@@ -26,12 +26,14 @@ _files.all = $(_files.src) $(_files.out) $(_files.sys)
at.targets += $(subst *,%,$(_files.all))
+_files.groups := $(notdir $(filter-out $(at.targets),$(addprefix $(outdir)/,$(files.groups))))
+
# Creative targets
$(outdir)/$(files.generate): $(_files.src.gen) $(_files.src.cfg)
$(outdir)/install: $(_files.sys.$(files.default))
$(outdir)/installdirs: $(sort $(dir $(_files.sys)))
$(eval \
- $(foreach _files.g,$(files.groups),\
+ $(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)))