summaryrefslogtreecommitdiff
path: root/build-aux/Makefile.each.tail
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2017-02-01 23:31:17 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2017-02-01 23:31:17 -0500
commit2cdd7acfc2df072b80d319490fbff8bb583d311e (patch)
treeb3fb5df154bddb5ac54a6389c017c0dc3e5e044f /build-aux/Makefile.each.tail
parent79cde738a3f979b9135d08ce6e77374e139a40c7 (diff)
parent16e8d3b92b5e35a5eaee40a7b7fc0279c342886a (diff)
Merge remote-tracking branch 'r-autothing/v3/master' into notsystemd/master
Diffstat (limited to 'build-aux/Makefile.each.tail')
-rw-r--r--build-aux/Makefile.each.tail/00-dist.mk2
-rw-r--r--build-aux/Makefile.each.tail/00-var.mk6
-rw-r--r--build-aux/Makefile.each.tail/10-files.mk23
-rw-r--r--build-aux/Makefile.each.tail/10-nested.mk3
-rw-r--r--build-aux/Makefile.each.tail/11-texinfo.mk38
5 files changed, 53 insertions, 19 deletions
diff --git a/build-aux/Makefile.each.tail/00-dist.mk b/build-aux/Makefile.each.tail/00-dist.mk
index bc2a3d5dd1..b023e80235 100644
--- a/build-aux/Makefile.each.tail/00-dist.mk
+++ b/build-aux/Makefile.each.tail/00-dist.mk
@@ -1 +1 @@
-_dist.files := $(strip $(_dist.files) $(call at.addprefix,$(srcdir),$(files.src)))
+_dist.files := $(strip $(_dist.files) $(call at.addprefix,$(srcdir),$(filter-out $(files.src.int),$(files.src))))
diff --git a/build-aux/Makefile.each.tail/00-var.mk b/build-aux/Makefile.each.tail/00-var.mk
index c2fd9d7001..954defb2da 100644
--- a/build-aux/Makefile.each.tail/00-var.mk
+++ b/build-aux/Makefile.each.tail/00-var.mk
@@ -1,4 +1,4 @@
-# Copyright (C) 2016 Luke Shumaker
+# Copyright (C) 2016-2017 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,10 +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/>.
-mod.var.depends += quote write-ifchanged
+mod.var.depends += files quote write-ifchanged
$(outdir)/.var.%: _var.FORCE
@printf '%s' $(call quote.shell,$($*)) | sed 's/^/#/' | $(WRITE_IFCHANGED) $@
-include $(wildcard $(outdir)/.var.*)
-at.targets += $(addprefix $(outdir)/,.var.%)
+files.out.int += .var.*
diff --git a/build-aux/Makefile.each.tail/10-files.mk b/build-aux/Makefile.each.tail/10-files.mk
index 8ab187b401..787a3bdbd1 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-2016 Luke Shumaker
+# Copyright (C) 2015-2017 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
@@ -34,24 +34,19 @@ $(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))
+ $$(outdir)/install-$(_files.g): $$(_files.sys.$(_files.g))$(at.nl)))
# Destructive targets
_files.uninstall = $(_files.sys)
_files.mostlyclean = $(filter-out $(_files.out.slow) $(_files.out.cfg),$(_files.out))
_files.clean = $(filter-out $(_files.out.cfg),$(_files.out))
_files.distclean = $(_files.out)
-$(addprefix $(outdir)/,uninstall mostlyclean clean distclean): %: %-hook
- $(RM) -- $(sort $(filter-out %/,$(_files.$(@F))))
- $(RM) -r -- $(sort $(filter %/,$(_files.$(@F))))
- $(RMDIR_P) -- $(sort $(dir $(_files.$(@F))))
-_files.maintainer-clean = $(filter-out $(_files.src.cfg) $(_files.src.src),$(_files.src))
-_files.$(files.vcsclean) = $(filter-out $(_files.src.src),$(_files.src))
-$(addprefix $(outdir)/,maintainer-clean $(files.vcsclean)): $(outdir)/%: $(outdir)/distclean $(outdir)/%-hook
- @echo 'This command is intended for maintainers to use; it'
- @echo 'deletes files that may need special tools to rebuild.'
- $(RM) -- $(sort $(filter-out %/,$(_files.$(@F))))
- $(RM) -r -- $(sort $(filter %/,$(_files.$(@F))))
- $(RMDIR_P) -- $(sort $(dir $(_files.$(@F))))
+_files.maintainer-clean = $(_files.distclean) $(filter-out $(_files.src.cfg) $(_files.src.src),$(_files.src))
+_files.$(files.vcsclean) = $(_files.distclean) $(filter-out $(_files.src.src),$(_files.src))
+$(addprefix $(outdir)/,uninstall mostlyclean clean distclean maintainer-clean $(files.vcsclean)): %: %-hook
+ $(call _files.XARGS,$(RM) --, $(sort $(wildcard $(filter-out %/,$(_files.$(@F))))) )
+ $(call _files.XARGS,$(RM) -r --, $(sort $(wildcard $(filter %/,$(_files.$(@F))))) )
+ $(call _files.XARGS,$(RMDIR_P) --,$(filter-out ./,$(sort $(wildcard $(dir $(_files.$(@F)))))))
+$(addprefix $(outdir)/,maintainer-clean $(files.vcsclean)): _files.maintainer-clean-warning
$(foreach t,uninstall mostlyclean clean distclean maintainer-clean $(files.vcsclean), $(outdir)/$t-hook)::
.PHONY: $(foreach t,uninstall mostlyclean clean distclean maintainer-clean $(files.vcsclean), $(outdir)/$t-hook)
diff --git a/build-aux/Makefile.each.tail/10-nested.mk b/build-aux/Makefile.each.tail/10-nested.mk
index 5e5a40b921..667ec6f901 100644
--- a/build-aux/Makefile.each.tail/10-nested.mk
+++ b/build-aux/Makefile.each.tail/10-nested.mk
@@ -1,4 +1,4 @@
-# Copyright (C) 2016 Luke Shumaker
+# Copyright (C) 2016-2017 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
@@ -18,3 +18,4 @@ $(eval $(foreach _tmp.nested,$(nested.targets),\
.PHONY: $(addprefix $(outdir)/,$(nested.targets))
at.subdirs += $(nested.subdirs)
+at.targets += $(addprefix $(outdir)/,$(nested.targets))
diff --git a/build-aux/Makefile.each.tail/11-texinfo.mk b/build-aux/Makefile.each.tail/11-texinfo.mk
new file mode 100644
index 0000000000..1ee5843d69
--- /dev/null
+++ b/build-aux/Makefile.each.tail/11-texinfo.mk
@@ -0,0 +1,38 @@
+# Copyright (C) 2016 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
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# 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/>.
+
+$(outdir)/info : $(addsuffix .info,$(texinfo.docs))
+files.src.gen += $(addsuffix .info,$(texinfo.docs))
+files.out.dvi += $(addsuffix .dvi ,$(texinfo.docs))
+files.out.html += $(addsuffix .html,$(texinfo.docs))
+files.out.pdf += $(addsuffix .pdf ,$(texinfo.docs))
+files.out.ps += $(addsuffix .ps ,$(texinfo.docs))
+
+files.sys.all += $(foreach f,$(texinfo.docs), $(infodir)/$f.info )
+files.sys.dvi += $(foreach f,$(texinfo.docs), $(dvidir)/$f.dvi )
+files.sys.html += $(foreach f,$(texinfo.docs), $(htmldir)/$f.html )
+files.sys.pdf += $(foreach f,$(texinfo.docs), $(pdfdir)/$f.pdf )
+files.sys.ps += $(foreach f,$(texinfo.docs), $(psdir)/$f.ps )
+
+$(outdir)/%.info: $(srcdir)/%.texi; $(MAKEINFO) -o $(@D) $<
+$(outdir)/%.info: $(outdir)/%.texi; $(MAKEINFO) -o $(@D) $<
+$(outdir)/%.dvi : $(srcdir)/%.texi; $(TEXI2DVI) -o $(@D) $<
+$(outdir)/%.dvi : $(outdir)/%.texi; $(TEXI2DVI) -o $(@D) $<
+$(outdir)/%.html: $(srcdir)/%.texi; $(TEXI2HTML) -o $(@D) $<
+$(outdir)/%.html: $(outdir)/%.texi; $(TEXI2HTML) -o $(@D) $<
+$(outdir)/%.pdf : $(srcdir)/%.texi; $(TEXI2PDF) -o $(@D) $<
+$(outdir)/%.pdf : $(outdir)/%.texi; $(TEXI2PDF) -o $(@D) $<
+$(outdir)/%.ps : $(srcdir)/%.texi; $(TEXI2PS) -o $(@D) $<
+$(outdir)/%.ps : $(outdir)/%.texi; $(TEXI2PS) -o $(@D) $<