From 9c11591c59f467be3ca7c2a511ae22de8f5fb2fd Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 30 May 2016 00:57:02 -0400 Subject: strip out stuff from gnuconf --- build-aux/Makefile.each.tail/11-gnu.mk | 59 ----------------------------- build-aux/Makefile.each.tail/11-gnustuff.mk | 59 +++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+), 59 deletions(-) delete mode 100644 build-aux/Makefile.each.tail/11-gnu.mk create mode 100644 build-aux/Makefile.each.tail/11-gnustuff.mk (limited to 'build-aux/Makefile.each.tail') diff --git a/build-aux/Makefile.each.tail/11-gnu.mk b/build-aux/Makefile.each.tail/11-gnu.mk deleted file mode 100644 index c7cb1cb767..0000000000 --- a/build-aux/Makefile.each.tail/11-gnu.mk +++ /dev/null @@ -1,59 +0,0 @@ -# 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 . - -# 7.2.6: Standard Targets for Users -# --------------------------------- - -std.gen_files += $(foreach f,$(gnu.info_docs), $f.info ) -std.sys_files += $(foreach f,$(gnu.info_docs), $(infodir)/$f.info ) - -$(foreach d,$(gnu.program_dirs),$(eval $(call _gnu.install_program,$d))) -$(foreach d,$(gnu.data_dirs) ,$(eval $(call _gnu.install_data,$d))) - -#all: std -#install: std -$(outdir)/install-html: $(foreach f,$(gnu.info_docs), $(DESTDIR)$(htmldir)/$f.html ) -$(outdir)/install-dvi : $(foreach f,$(gnu.info_docs), $(DESTDIR)$(dvidir)/$f.dvi ) -$(outdir)/install-pdf : $(foreach f,$(gnu.info_docs), $(DESTDIR)$(pdfdir)/$f.pdf ) -$(outdir)/install-ps : $(foreach f,$(gnu.info_docs), $(DESTDIR)$(psdir)/$f.ps ) -#uninstall: std -$(outdir)/install-strip: install - $(STRIP) $(filter $(addsuffix /%,$(gnu.program_dirs)),$(std.sys_files/$(@D))) -#clean: std -#distclean: std -#mostlyclean: std -#maintainer-clean: std -TAGS: TODO -$(outdir)/info: $(addsuffix .info,$(gnu.info_docs)) -$(outdir)/dvi : $(addsuffix .dvi ,$(gnu.info_docs)) -$(outdir)/html: $(addsuffix .html,$(gnu.info_docs)) -$(outdir)/pdf : $(addsuffix .pdf ,$(gnu.info_docs)) -$(outdir)/ps : $(addsuffix .ps ,$(gnu.info_docs)) -#dist:dist -check: TODO -installcheck: TODO -#installdirs: std - -$(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) $< -#installdirs: std diff --git a/build-aux/Makefile.each.tail/11-gnustuff.mk b/build-aux/Makefile.each.tail/11-gnustuff.mk new file mode 100644 index 0000000000..fe76eb8348 --- /dev/null +++ b/build-aux/Makefile.each.tail/11-gnustuff.mk @@ -0,0 +1,59 @@ +# 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 . + +# 7.2.6: Standard Targets for Users +# --------------------------------- + +std.gen_files += $(foreach f,$(gnustuff.info_docs), $f.info ) +std.sys_files += $(foreach f,$(gnustuff.info_docs), $(infodir)/$f.info ) + +$(foreach d,$(gnustuff.program_dirs),$(eval $(call _gnustuff.install_program,$d))) +$(foreach d,$(gnustuff.data_dirs) ,$(eval $(call _gnustuff.install_data,$d))) + +#all: std +#install: std +$(outdir)/install-html: $(foreach f,$(gnustuff.info_docs), $(DESTDIR)$(htmldir)/$f.html ) +$(outdir)/install-dvi : $(foreach f,$(gnustuff.info_docs), $(DESTDIR)$(dvidir)/$f.dvi ) +$(outdir)/install-pdf : $(foreach f,$(gnustuff.info_docs), $(DESTDIR)$(pdfdir)/$f.pdf ) +$(outdir)/install-ps : $(foreach f,$(gnustuff.info_docs), $(DESTDIR)$(psdir)/$f.ps ) +#uninstall: std +$(outdir)/install-strip: install + $(STRIP) $(filter $(addsuffix /%,$(gnustuff.program_dirs)),$(std.sys_files/$(@D))) +#clean: std +#distclean: std +#mostlyclean: std +#maintainer-clean: std +TAGS: TODO +$(outdir)/info: $(addsuffix .info,$(gnustuff.info_docs)) +$(outdir)/dvi : $(addsuffix .dvi ,$(gnustuff.info_docs)) +$(outdir)/html: $(addsuffix .html,$(gnustuff.info_docs)) +$(outdir)/pdf : $(addsuffix .pdf ,$(gnustuff.info_docs)) +$(outdir)/ps : $(addsuffix .ps ,$(gnustuff.info_docs)) +#dist:dist +check: TODO +installcheck: TODO +#installdirs: std + +$(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) $< +#installdirs: std -- cgit v1.2.3-54-g00ecf From 081f7d3c73c212ddb239c81ce27940771da593f8 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 30 May 2016 11:16:48 -0400 Subject: add install rule, add missing at.phony definitions --- build-aux/Makefile.each.tail/11-gnustuff.mk | 3 ++- build-aux/Makefile.once.head/11-gnustuff.mk | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'build-aux/Makefile.each.tail') diff --git a/build-aux/Makefile.each.tail/11-gnustuff.mk b/build-aux/Makefile.each.tail/11-gnustuff.mk index fe76eb8348..790efad0fa 100644 --- a/build-aux/Makefile.each.tail/11-gnustuff.mk +++ b/build-aux/Makefile.each.tail/11-gnustuff.mk @@ -23,7 +23,8 @@ $(foreach d,$(gnustuff.program_dirs),$(eval $(call _gnustuff.install_program,$d) $(foreach d,$(gnustuff.data_dirs) ,$(eval $(call _gnustuff.install_data,$d))) #all: std -#install: std +install: + $(foreach f,$(gnustuff.info_docs),$(INSTALL_INFO) $(DESTDIR)$(infodir)/$f.info $(DESTDIR)$(infodir)/dir$(at.nl)) $(outdir)/install-html: $(foreach f,$(gnustuff.info_docs), $(DESTDIR)$(htmldir)/$f.html ) $(outdir)/install-dvi : $(foreach f,$(gnustuff.info_docs), $(DESTDIR)$(dvidir)/$f.dvi ) $(outdir)/install-pdf : $(foreach f,$(gnustuff.info_docs), $(DESTDIR)$(pdfdir)/$f.pdf ) diff --git a/build-aux/Makefile.once.head/11-gnustuff.mk b/build-aux/Makefile.once.head/11-gnustuff.mk index d91832d5b1..800f6d271c 100644 --- a/build-aux/Makefile.once.head/11-gnustuff.mk +++ b/build-aux/Makefile.once.head/11-gnustuff.mk @@ -28,3 +28,7 @@ gnustuff.info_docs ?= std.dirlocal += gnustuff.info_docs gnustuff.dirs += $(gnu.program_dirs) $(gnu.data_dirs) + +at.phony += install-html install-dvi install-pdf install-ps +at.phony += info html dvi pdf ps +at.phony += install-strip -- cgit v1.2.3-54-g00ecf From 28708b49282ed15ac69df4e16a2d6eccc219fa82 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 17 Jun 2016 16:02:13 -0400 Subject: fixup --- build-aux/Makefile.each.tail/10-std.mk | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'build-aux/Makefile.each.tail') diff --git a/build-aux/Makefile.each.tail/10-std.mk b/build-aux/Makefile.each.tail/10-std.mk index 5150a71a72..693f39da90 100644 --- a/build-aux/Makefile.each.tail/10-std.mk +++ b/build-aux/Makefile.each.tail/10-std.mk @@ -12,6 +12,7 @@ # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . + # Add some more defaults to the *_files variables std.clean_files += $(std.gen_files) $(std.cfg_files) $(std.out_files) @@ -38,7 +39,13 @@ _std.mostlyclean/$(outdir) := $(filter-out $(std.slow_files) $(std.cfg_file _std.clean/$(outdir) := $(filter-out $(std.cfg_files) $(std.gen_files) $(std.src_files),$(std.clean_files)) _std.distclean/$(outdir) := $(filter-out $(std.gen_files) $(std.src_files),$(std.clean_files)) _std.maintainer-clean/$(outdir) := $(filter-out $(std.src_files),$(std.clean_files)) -$(addprefix $(outdir)/,uninstall mostlyclean clean distclean maintainer-clean): %: %-hook +$(addprefix $(outdir)/,mostlyclean clean distclean maintainer-clean): %: %-hook + $(RM) -- $(sort $(filter-out %/,$(_std.$(@F)/$(@D)))) + $(RM) -r -- $(sort $(filter %/,$(_std.$(@F)/$(@D)))) + $(RMDIR_P) $(sort $(dir $(_std.$(@F)/$(@D)))) 2>/dev/null || $(TRUE) +# separate uninstall to support GNU Coding Standards' NORMAL_UNINSTALL +$(addprefix $(outdir)/,uninstall): %: %-hook + $(NORMAL_UNINSTALL) $(RM) -- $(sort $(filter-out %/,$(_std.$(@F)/$(@D)))) $(RM) -r -- $(sort $(filter %/,$(_std.$(@F)/$(@D)))) $(RMDIR_P) $(sort $(dir $(_std.$(@F)/$(@D)))) 2>/dev/null || $(TRUE) -- cgit v1.2.3-54-g00ecf From 5eb6e559d6665f4210be95fe46f1d0a6007dd734 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 15 Jan 2017 01:44:18 -0500 Subject: mod: files: fix a misplaced paren --- build-aux/Makefile.each.tail/10-files.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'build-aux/Makefile.each.tail') diff --git a/build-aux/Makefile.each.tail/10-files.mk b/build-aux/Makefile.each.tail/10-files.mk index 8ab187b401..3bb3bc23df 100644 --- a/build-aux/Makefile.each.tail/10-files.mk +++ b/build-aux/Makefile.each.tail/10-files.mk @@ -34,7 +34,7 @@ $(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) -- cgit v1.2.3-54-g00ecf From cbee7a272b1f61843d596da913093acf77506481 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 15 Jan 2017 01:44:37 -0500 Subject: Tidy the gnustuff (and fork off gnudoc). --- build-aux/Makefile.each.head/00-gnudoc.mk | 16 +++++++++ build-aux/Makefile.each.tail/11-gnudoc.mk | 42 ++++++++++++++++++++++ build-aux/Makefile.each.tail/11-gnustuff.mk | 45 +++-------------------- build-aux/Makefile.once.head/10-gnudoc.mk | 53 +++++++++++++++++++++++++++ build-aux/Makefile.once.head/10-gnustuff.mk | 56 +++++++++++++++++++++++++++++ build-aux/Makefile.once.head/11-gnustuff.mk | 34 ------------------ build-aux/Makefile.once.tail/11-gnustuff.mk | 4 +-- 7 files changed, 173 insertions(+), 77 deletions(-) create mode 100644 build-aux/Makefile.each.head/00-gnudoc.mk create mode 100644 build-aux/Makefile.each.tail/11-gnudoc.mk create mode 100644 build-aux/Makefile.once.head/10-gnudoc.mk create mode 100644 build-aux/Makefile.once.head/10-gnustuff.mk delete mode 100644 build-aux/Makefile.once.head/11-gnustuff.mk (limited to 'build-aux/Makefile.each.tail') diff --git a/build-aux/Makefile.each.head/00-gnudoc.mk b/build-aux/Makefile.each.head/00-gnudoc.mk new file mode 100644 index 0000000000..631d5766b7 --- /dev/null +++ b/build-aux/Makefile.each.head/00-gnudoc.mk @@ -0,0 +1,16 @@ +# 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 +# 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 . + +gnudoc.docs ?= diff --git a/build-aux/Makefile.each.tail/11-gnudoc.mk b/build-aux/Makefile.each.tail/11-gnudoc.mk new file mode 100644 index 0000000000..1df4d7363a --- /dev/null +++ b/build-aux/Makefile.each.tail/11-gnudoc.mk @@ -0,0 +1,42 @@ +# 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 . + +$(outdir)/info : $(addsuffix .info,$(gnudoc.docs)) +files.src.gen += $(addsuffix .info,$(gnudoc.docs)) +files.out.dvi += $(addsuffix .dvi ,$(gnudoc.docs)) +files.out.html += $(addsuffix .html,$(gnudoc.docs)) +files.out.pdf += $(addsuffix .pdf ,$(gnudoc.docs)) +files.out.ps += $(addsuffix .ps ,$(gnudoc.docs)) + +files.sys.all += $(foreach f,$(gnudoc.docs), $(infodir)/$f.info ) +files.sys.dvi += $(foreach f,$(gnudoc.docs), $(dvidir)/$f.dvi ) +files.sys.html += $(foreach f,$(gnudoc.docs), $(htmldir)/$f.html ) +files.sys.pdf += $(foreach f,$(gnudoc.docs), $(pdfdir)/$f.pdf ) +files.sys.ps += $(foreach f,$(gnudoc.docs), $(psdir)/$f.ps ) + +$(outdir)/install: + $(POST_INSTALL) + $(foreach f,$(gnudoc.docs),$(INSTALL_INFO) $(DESTDIR)$(infodir)/$f.info $(DESTDIR)$(infodir)/dir$(at.nl)) + +$(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) $< diff --git a/build-aux/Makefile.each.tail/11-gnustuff.mk b/build-aux/Makefile.each.tail/11-gnustuff.mk index 790efad0fa..d89d204315 100644 --- a/build-aux/Makefile.each.tail/11-gnustuff.mk +++ b/build-aux/Makefile.each.tail/11-gnustuff.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 @@ -12,49 +12,12 @@ # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . - -# 7.2.6: Standard Targets for Users -# --------------------------------- - -std.gen_files += $(foreach f,$(gnustuff.info_docs), $f.info ) -std.sys_files += $(foreach f,$(gnustuff.info_docs), $(infodir)/$f.info ) - $(foreach d,$(gnustuff.program_dirs),$(eval $(call _gnustuff.install_program,$d))) $(foreach d,$(gnustuff.data_dirs) ,$(eval $(call _gnustuff.install_data,$d))) -#all: std -install: - $(foreach f,$(gnustuff.info_docs),$(INSTALL_INFO) $(DESTDIR)$(infodir)/$f.info $(DESTDIR)$(infodir)/dir$(at.nl)) -$(outdir)/install-html: $(foreach f,$(gnustuff.info_docs), $(DESTDIR)$(htmldir)/$f.html ) -$(outdir)/install-dvi : $(foreach f,$(gnustuff.info_docs), $(DESTDIR)$(dvidir)/$f.dvi ) -$(outdir)/install-pdf : $(foreach f,$(gnustuff.info_docs), $(DESTDIR)$(pdfdir)/$f.pdf ) -$(outdir)/install-ps : $(foreach f,$(gnustuff.info_docs), $(DESTDIR)$(psdir)/$f.ps ) -#uninstall: std $(outdir)/install-strip: install $(STRIP) $(filter $(addsuffix /%,$(gnustuff.program_dirs)),$(std.sys_files/$(@D))) -#clean: std -#distclean: std -#mostlyclean: std -#maintainer-clean: std -TAGS: TODO -$(outdir)/info: $(addsuffix .info,$(gnustuff.info_docs)) -$(outdir)/dvi : $(addsuffix .dvi ,$(gnustuff.info_docs)) -$(outdir)/html: $(addsuffix .html,$(gnustuff.info_docs)) -$(outdir)/pdf : $(addsuffix .pdf ,$(gnustuff.info_docs)) -$(outdir)/ps : $(addsuffix .ps ,$(gnustuff.info_docs)) -#dist:dist -check: TODO -installcheck: TODO -#installdirs: std -$(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) $< -#installdirs: std +#TAGS: TODO +#check: TODO +#installcheck: TODO diff --git a/build-aux/Makefile.once.head/10-gnudoc.mk b/build-aux/Makefile.once.head/10-gnudoc.mk new file mode 100644 index 0000000000..a53c89fecf --- /dev/null +++ b/build-aux/Makefile.once.head/10-gnudoc.mk @@ -0,0 +1,53 @@ +# 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 +# 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 . + +mod.gnudoc.description = GNU Info page support +mod.gnudoc.depends += files nested gnuconf +define mod.gnudoc.doc +# User variables (in addition to gnuconf): +# - `TEXI2HTML ?= makeinfo --html` +# - `TEXI2PDF ?= texi2pdf` +# - `TEXI2PS ?= texi2dvi --ps` +# Inputs: +# - Directory variable : `gnudoc.docs ?=` +# Outputs: +# - Global variable : `files.groups += html dvi pdf ps` +# - Global variable : `nested.targets += info` +# - Directory variable : `files.src.gen` +# - Directory variable : `files.out.{dvi,html,pdf,ps}` +# - Directory variable : `files.sys.{dvi,html,pdf,ps,all}` +# - .PHONY target : `$(outdir)/info` +# - .PHONY target : `$(outdir)/install` (see below) +# - Target : `$(outdir)/%.info` +# - Target : `$(outdir)/%.dvi` +# - target : `$(outdir)/%.html` +# - target : `$(outdir)/%.pdf` +# - Target : `$(outdir)/%.ps` +# +# The The `gnudoc + +# The module counts on the `$(outdir)/install` target being defined by +# `files`, but not having a rule that executes once the dependencies +# have been taken care of; it adds a "post-install" rule to add the +# info files to the index. +endef +mod.gnudoc.doc := $(value mod.gnudoc.doc) + +TEXI2HTML ?= makeinfo --html +TEXI2PDF ?= texi2pdf +TEXI2PS ?= texi2dvi --ps + +files.groups += html dvi pdf ps +nested.targets += info diff --git a/build-aux/Makefile.once.head/10-gnustuff.mk b/build-aux/Makefile.once.head/10-gnustuff.mk new file mode 100644 index 0000000000..759e48ac8d --- /dev/null +++ b/build-aux/Makefile.once.head/10-gnustuff.mk @@ -0,0 +1,56 @@ +# 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 +# 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 . + +mod.gnustuff.description = Misc parts of the GNU Coding Standards +mod.gnustuff.depends += files nested +define mod.gnustuff.doc +# User variables: +# - `STRIP ?= strip` +# - `MKDIR_P ?= mkdir -p` +# Inputs: +# - Global variable : `gnustuff.program_dirs ?= $(bindir) $(sbindir) $(libexecdir)` +# - Global variable : `gnustuff.data_dirs ?= +# - Global variable : `gnustuff.dirs ?= $(gnustuff.program_dirs) $(gnustuff.data_dirs) +# Outputs: +# - Global variable : `nested.targets += install-strip` +# - .PHONY target : `$(outdir)/install-strip` +# +# gnustuff.info_docs: +# The list of texinfo documents in the current directory, without +# the `.texi` suffix. +# +# gnustuff.program_dirs: +# Directories to use $(INSTALL_PROGRAM) for inserting files into. +# +# gnustuff.data_dirs: +# Directories to use $(INSTALL_DATA) for inserting files into. +# +# gnustuff.dirs: +# Directories to create +endef +mod.gnustuff.doc := $(value mod.gnustuff.doc) + +STRIP ?= strip +MKDIR_P ?= mkdir -p + +gnustuff.program_dirs ?= $(bindir) $(sbindir) $(libexecdir) +gnustuff.data_dirs ?= \ + $(datarootdir) $(datadir) $(sysconfdir) $(sharedstatedir) $(localstatedir) $(runstatedir) \ + $(includedir) $(oldincludedir) $(docdir) $(infodir) $(htmldir) $(dvidir) $(pdfdir) $(psdir) $(libdir) $(lispdir) $(localedir) \ + $(mandir) $(man1dir) $(man2dir) $(man3dir) $(man4dir) $(man5dir) $(man6dir) $(man7dir) $(man8dir) +gnustuff.dirs += $(gnu.program_dirs) $(gnu.data_dirs) + +nested.targets += install-strip diff --git a/build-aux/Makefile.once.head/11-gnustuff.mk b/build-aux/Makefile.once.head/11-gnustuff.mk deleted file mode 100644 index 800f6d271c..0000000000 --- a/build-aux/Makefile.once.head/11-gnustuff.mk +++ /dev/null @@ -1,34 +0,0 @@ -# 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 . - -STRIP ?= strip -TEXI2HTML ?= makeinfo --html -TEXI2PDF ?= texi2pdf -TEXI2PS ?= texi2dvi --ps -MKDIR_P ?= mkdir -p - -gnustuff.program_dirs += $(bindir) $(sbindir) $(libexecdir) -gnustuff.data_dirs += $(datarootdir) $(datadir) $(sysconfdir) $(sharedstatedir) $(localstatedir) $(runstatedir) -gnustuff.data_dirs += $(includedir) $(oldincludedir) $(docdir) $(infodir) $(htmldir) $(dvidir) $(pdfdir) $(psdir) $(libdir) $(lispdir) $(localedir) -gnustuff.data_dirs += $(mandir) $(man1dir) $(man2dir) $(man3dir) $(man4dir) $(man5dir) $(man6dir) $(man7dir) $(man8dir) - -gnustuff.info_docs ?= -std.dirlocal += gnustuff.info_docs - -gnustuff.dirs += $(gnu.program_dirs) $(gnu.data_dirs) - -at.phony += install-html install-dvi install-pdf install-ps -at.phony += info html dvi pdf ps -at.phony += install-strip diff --git a/build-aux/Makefile.once.tail/11-gnustuff.mk b/build-aux/Makefile.once.tail/11-gnustuff.mk index df5f19258c..e4b18c0594 100644 --- a/build-aux/Makefile.once.tail/11-gnustuff.mk +++ b/build-aux/Makefile.once.tail/11-gnustuff.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,5 +13,5 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -$(gnu.dirs): +$(gnustuff.dirs): $(MKDIR_P) $@ -- cgit v1.2.3-54-g00ecf From 0a1826bd8b2fe2a374112c3218b5139aba40555d Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 15 Jan 2017 01:51:02 -0500 Subject: Rename gnudoc->texinfo --- build-aux/Makefile.each.head/00-gnudoc.mk | 16 --------- build-aux/Makefile.each.head/00-texinfo.mk | 16 +++++++++ build-aux/Makefile.each.tail/11-gnudoc.mk | 42 ----------------------- build-aux/Makefile.each.tail/11-texinfo.mk | 42 +++++++++++++++++++++++ build-aux/Makefile.once.head/10-gnudoc.mk | 53 ------------------------------ build-aux/Makefile.once.head/10-texinfo.mk | 51 ++++++++++++++++++++++++++++ 6 files changed, 109 insertions(+), 111 deletions(-) delete mode 100644 build-aux/Makefile.each.head/00-gnudoc.mk create mode 100644 build-aux/Makefile.each.head/00-texinfo.mk delete mode 100644 build-aux/Makefile.each.tail/11-gnudoc.mk create mode 100644 build-aux/Makefile.each.tail/11-texinfo.mk delete mode 100644 build-aux/Makefile.once.head/10-gnudoc.mk create mode 100644 build-aux/Makefile.once.head/10-texinfo.mk (limited to 'build-aux/Makefile.each.tail') diff --git a/build-aux/Makefile.each.head/00-gnudoc.mk b/build-aux/Makefile.each.head/00-gnudoc.mk deleted file mode 100644 index 631d5766b7..0000000000 --- a/build-aux/Makefile.each.head/00-gnudoc.mk +++ /dev/null @@ -1,16 +0,0 @@ -# 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 -# 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 . - -gnudoc.docs ?= diff --git a/build-aux/Makefile.each.head/00-texinfo.mk b/build-aux/Makefile.each.head/00-texinfo.mk new file mode 100644 index 0000000000..88aaeb5262 --- /dev/null +++ b/build-aux/Makefile.each.head/00-texinfo.mk @@ -0,0 +1,16 @@ +# 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 +# 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 . + +texinfo.docs ?= diff --git a/build-aux/Makefile.each.tail/11-gnudoc.mk b/build-aux/Makefile.each.tail/11-gnudoc.mk deleted file mode 100644 index 1df4d7363a..0000000000 --- a/build-aux/Makefile.each.tail/11-gnudoc.mk +++ /dev/null @@ -1,42 +0,0 @@ -# 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 . - -$(outdir)/info : $(addsuffix .info,$(gnudoc.docs)) -files.src.gen += $(addsuffix .info,$(gnudoc.docs)) -files.out.dvi += $(addsuffix .dvi ,$(gnudoc.docs)) -files.out.html += $(addsuffix .html,$(gnudoc.docs)) -files.out.pdf += $(addsuffix .pdf ,$(gnudoc.docs)) -files.out.ps += $(addsuffix .ps ,$(gnudoc.docs)) - -files.sys.all += $(foreach f,$(gnudoc.docs), $(infodir)/$f.info ) -files.sys.dvi += $(foreach f,$(gnudoc.docs), $(dvidir)/$f.dvi ) -files.sys.html += $(foreach f,$(gnudoc.docs), $(htmldir)/$f.html ) -files.sys.pdf += $(foreach f,$(gnudoc.docs), $(pdfdir)/$f.pdf ) -files.sys.ps += $(foreach f,$(gnudoc.docs), $(psdir)/$f.ps ) - -$(outdir)/install: - $(POST_INSTALL) - $(foreach f,$(gnudoc.docs),$(INSTALL_INFO) $(DESTDIR)$(infodir)/$f.info $(DESTDIR)$(infodir)/dir$(at.nl)) - -$(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) $< 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..9491820f2e --- /dev/null +++ b/build-aux/Makefile.each.tail/11-texinfo.mk @@ -0,0 +1,42 @@ +# 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 . + +$(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)/install: + $(POST_INSTALL) + $(foreach f,$(texinfo.docs),$(INSTALL_INFO) $(DESTDIR)$(infodir)/$f.info $(DESTDIR)$(infodir)/dir$(at.nl)) + +$(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) $< diff --git a/build-aux/Makefile.once.head/10-gnudoc.mk b/build-aux/Makefile.once.head/10-gnudoc.mk deleted file mode 100644 index a53c89fecf..0000000000 --- a/build-aux/Makefile.once.head/10-gnudoc.mk +++ /dev/null @@ -1,53 +0,0 @@ -# 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 -# 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 . - -mod.gnudoc.description = GNU Info page support -mod.gnudoc.depends += files nested gnuconf -define mod.gnudoc.doc -# User variables (in addition to gnuconf): -# - `TEXI2HTML ?= makeinfo --html` -# - `TEXI2PDF ?= texi2pdf` -# - `TEXI2PS ?= texi2dvi --ps` -# Inputs: -# - Directory variable : `gnudoc.docs ?=` -# Outputs: -# - Global variable : `files.groups += html dvi pdf ps` -# - Global variable : `nested.targets += info` -# - Directory variable : `files.src.gen` -# - Directory variable : `files.out.{dvi,html,pdf,ps}` -# - Directory variable : `files.sys.{dvi,html,pdf,ps,all}` -# - .PHONY target : `$(outdir)/info` -# - .PHONY target : `$(outdir)/install` (see below) -# - Target : `$(outdir)/%.info` -# - Target : `$(outdir)/%.dvi` -# - target : `$(outdir)/%.html` -# - target : `$(outdir)/%.pdf` -# - Target : `$(outdir)/%.ps` -# -# The The `gnudoc - -# The module counts on the `$(outdir)/install` target being defined by -# `files`, but not having a rule that executes once the dependencies -# have been taken care of; it adds a "post-install" rule to add the -# info files to the index. -endef -mod.gnudoc.doc := $(value mod.gnudoc.doc) - -TEXI2HTML ?= makeinfo --html -TEXI2PDF ?= texi2pdf -TEXI2PS ?= texi2dvi --ps - -files.groups += html dvi pdf ps -nested.targets += info diff --git a/build-aux/Makefile.once.head/10-texinfo.mk b/build-aux/Makefile.once.head/10-texinfo.mk new file mode 100644 index 0000000000..aac2c287a4 --- /dev/null +++ b/build-aux/Makefile.once.head/10-texinfo.mk @@ -0,0 +1,51 @@ +# 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 +# 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 . + +mod.texinfo.description = The GNU documentation system +mod.texinfo.depends += files nested gnuconf +define mod.texinfo.doc +# User variables (in addition to gnuconf): +# - `TEXI2HTML ?= makeinfo --html` +# - `TEXI2PDF ?= texi2pdf` +# - `TEXI2PS ?= texi2dvi --ps` +# Inputs: +# - Directory variable : `texinfo.docs ?=` +# Outputs: +# - Global variable : `files.groups += html dvi pdf ps` +# - Global variable : `nested.targets += info` +# - Directory variable : `files.src.gen` +# - Directory variable : `files.out.{dvi,html,pdf,ps}` +# - Directory variable : `files.sys.{dvi,html,pdf,ps,all}` +# - .PHONY target : `$(outdir)/info` +# - .PHONY target : `$(outdir)/install` (see below) +# - Target : `$(outdir)/%.info` +# - Target : `$(outdir)/%.dvi` +# - target : `$(outdir)/%.html` +# - target : `$(outdir)/%.pdf` +# - Target : `$(outdir)/%.ps` +# +# The module counts on the `$(outdir)/install` target being defined by +# `files`, but not having a rule that executes once the dependencies +# have been taken care of; it adds a "post-install" rule to add the +# info files to the index. +endef +mod.texinfo.doc := $(value mod.texinfo.doc) + +TEXI2HTML ?= makeinfo --html +TEXI2PDF ?= texi2pdf +TEXI2PS ?= texi2dvi --ps + +files.groups += html dvi pdf ps +nested.targets += info -- cgit v1.2.3-54-g00ecf From aca833ffe2fc52c7f18b641031e371d22fd926bd Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 15 Jan 2017 01:56:50 -0500 Subject: remove gnustuff --- build-aux/Makefile.each.tail/11-gnustuff.mk | 23 ------------ build-aux/Makefile.once.head/10-gnustuff.mk | 56 ----------------------------- build-aux/Makefile.once.tail/11-gnustuff.mk | 17 --------- 3 files changed, 96 deletions(-) delete mode 100644 build-aux/Makefile.each.tail/11-gnustuff.mk delete mode 100644 build-aux/Makefile.once.head/10-gnustuff.mk delete mode 100644 build-aux/Makefile.once.tail/11-gnustuff.mk (limited to 'build-aux/Makefile.each.tail') diff --git a/build-aux/Makefile.each.tail/11-gnustuff.mk b/build-aux/Makefile.each.tail/11-gnustuff.mk deleted file mode 100644 index d89d204315..0000000000 --- a/build-aux/Makefile.each.tail/11-gnustuff.mk +++ /dev/null @@ -1,23 +0,0 @@ -# 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 -# 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 . -$(foreach d,$(gnustuff.program_dirs),$(eval $(call _gnustuff.install_program,$d))) -$(foreach d,$(gnustuff.data_dirs) ,$(eval $(call _gnustuff.install_data,$d))) - -$(outdir)/install-strip: install - $(STRIP) $(filter $(addsuffix /%,$(gnustuff.program_dirs)),$(std.sys_files/$(@D))) - -#TAGS: TODO -#check: TODO -#installcheck: TODO diff --git a/build-aux/Makefile.once.head/10-gnustuff.mk b/build-aux/Makefile.once.head/10-gnustuff.mk deleted file mode 100644 index 759e48ac8d..0000000000 --- a/build-aux/Makefile.once.head/10-gnustuff.mk +++ /dev/null @@ -1,56 +0,0 @@ -# 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 -# 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 . - -mod.gnustuff.description = Misc parts of the GNU Coding Standards -mod.gnustuff.depends += files nested -define mod.gnustuff.doc -# User variables: -# - `STRIP ?= strip` -# - `MKDIR_P ?= mkdir -p` -# Inputs: -# - Global variable : `gnustuff.program_dirs ?= $(bindir) $(sbindir) $(libexecdir)` -# - Global variable : `gnustuff.data_dirs ?= -# - Global variable : `gnustuff.dirs ?= $(gnustuff.program_dirs) $(gnustuff.data_dirs) -# Outputs: -# - Global variable : `nested.targets += install-strip` -# - .PHONY target : `$(outdir)/install-strip` -# -# gnustuff.info_docs: -# The list of texinfo documents in the current directory, without -# the `.texi` suffix. -# -# gnustuff.program_dirs: -# Directories to use $(INSTALL_PROGRAM) for inserting files into. -# -# gnustuff.data_dirs: -# Directories to use $(INSTALL_DATA) for inserting files into. -# -# gnustuff.dirs: -# Directories to create -endef -mod.gnustuff.doc := $(value mod.gnustuff.doc) - -STRIP ?= strip -MKDIR_P ?= mkdir -p - -gnustuff.program_dirs ?= $(bindir) $(sbindir) $(libexecdir) -gnustuff.data_dirs ?= \ - $(datarootdir) $(datadir) $(sysconfdir) $(sharedstatedir) $(localstatedir) $(runstatedir) \ - $(includedir) $(oldincludedir) $(docdir) $(infodir) $(htmldir) $(dvidir) $(pdfdir) $(psdir) $(libdir) $(lispdir) $(localedir) \ - $(mandir) $(man1dir) $(man2dir) $(man3dir) $(man4dir) $(man5dir) $(man6dir) $(man7dir) $(man8dir) -gnustuff.dirs += $(gnu.program_dirs) $(gnu.data_dirs) - -nested.targets += install-strip diff --git a/build-aux/Makefile.once.tail/11-gnustuff.mk b/build-aux/Makefile.once.tail/11-gnustuff.mk deleted file mode 100644 index e4b18c0594..0000000000 --- a/build-aux/Makefile.once.tail/11-gnustuff.mk +++ /dev/null @@ -1,17 +0,0 @@ -# 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 -# 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 . - -$(gnustuff.dirs): - $(MKDIR_P) $@ -- cgit v1.2.3-54-g00ecf From dd98e1c994520acc817d3dfa651ccf291827630d Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 17 Jan 2017 02:20:31 -0500 Subject: Backport fixes from work on parabola-hackers.git. - core: Actually support at.Makefile; how it set the internal variable _at.MAKEFILE_LIST was broken if $(at.Makefile) != Makefile - mod: dist: * Don't try to distribute $(files.src.int) files. * Add a comment noting that the lack of the `-P` flag to `cp` is not a bug. - mod: gitfiles: * Correctly list files in $(topsrcdir). * Also enumerate files in git submodules. --- build-aux/Makefile.each.tail/00-dist.mk | 2 +- build-aux/Makefile.head.mk | 8 +++----- build-aux/Makefile.once.head/00-gitfiles.mk | 7 ++++--- build-aux/Makefile.once.tail/00-dist.mk | 5 ++++- 4 files changed, 12 insertions(+), 10 deletions(-) (limited to 'build-aux/Makefile.each.tail') 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.head.mk b/build-aux/Makefile.head.mk index e6b4a19808..f4eb51da5b 100644 --- a/build-aux/Makefile.head.mk +++ b/build-aux/Makefile.head.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 @@ -13,8 +13,9 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . +at.Makefile ?= Makefile _at.MAKEFILE_LIST ?= -_at.MAKEFILE_LIST := $(strip $(_at.MAKEFILE_LIST) $(abspath $(lastword $(filter-out %.mk,$(MAKEFILE_LIST))))) +_at.MAKEFILE_LIST := $(strip $(_at.MAKEFILE_LIST) $(lastword $(filter %/$(at.Makefile),$(abspath $(MAKEFILE_LIST))))) # This bit only gets evaluated once, at the very beginning ifeq ($(origin _at.NO_ONCE),undefined) @@ -86,9 +87,6 @@ define at.nl endef -# External configuration ############################################### -at.Makefile ?= Makefile - # Include modules ###################################################### include $(sort $(wildcard $(topsrcdir)/build-aux/Makefile.once.head/*.mk)) _at.tmp_targets = diff --git a/build-aux/Makefile.once.head/00-gitfiles.mk b/build-aux/Makefile.once.head/00-gitfiles.mk index dbb4ae90ec..8566a7f5e9 100644 --- a/build-aux/Makefile.once.head/00-gitfiles.mk +++ b/build-aux/Makefile.once.head/00-gitfiles.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 @@ -65,10 +65,11 @@ _gitfiles.all = ifneq ($(wildcard $(topsrcdir)/.git),) $(topsrcdir)/$(gitfiles.file): _gitfiles.FORCE - @(cd $(@D) && git ls-files -z) | sed -z -e 's/\$$/\$$$$/g' -e 's/\n/$$(at.nl)/g' | xargs -r0 printf '_gitfiles.all+=%s\n' | $(WRITE_IFCHANGED) $@ + @(cd $(@D) && git ls-files --recurse-submodules -z) | sed -z -e 's/\$$/\$$$$/g' -e 's/\n/$$(at.nl)/g' | xargs -r0 printf '_gitfiles.all+=%s\n' | $(WRITE_IFCHANGED) $@ .PHONY: _gitfiles.FORCE endif _gitfiles.dir = $(call at.relto,$(topsrcdir),$(srcdir)) -_gitfiles.dir.all = $(patsubst $(_gitfiles.dir)/%,%,$(filter $(_gitfiles.dir)/%,$(_gitfiles.all))) +_gitfiles.pat = $(patsubst ./%,%,$(_gitfiles.dir)/%) +_gitfiles.dir.all = $(patsubst $(_gitfiles.pat),%,$(filter $(_gitfiles.pat),$(_gitfiles.all))) _gitfiles.dir.src = $(filter-out $(addsuffix /%,$(nested.subdirs)),$(_gitfiles.dir.all)) diff --git a/build-aux/Makefile.once.tail/00-dist.mk b/build-aux/Makefile.once.tail/00-dist.mk index a890d9d6dc..59a7dc3c70 100644 --- a/build-aux/Makefile.once.tail/00-dist.mk +++ b/build-aux/Makefile.once.tail/00-dist.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 @@ -13,6 +13,9 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . +# NB: intentionally resolve symlinks (tack on the -P flag to `cp` to +# not resolve them). The GNU Coding Standards say to avoid symlinks +# in tarballs. _dist.copyfile = $(MKDIR_P) $(dir $2) && $(CP) -T $1 $2 _dist.addfile = $(call _dist.copyfile,$3,$2/$(call at.relto,$1,$3)) $(topoutdir)/$(dist.pkgname)-$(dist.version): $(_dist.files) -- cgit v1.2.3-54-g00ecf From 16e8d3b92b5e35a5eaee40a7b7fc0279c342886a Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 30 Jan 2017 01:33:24 -0500 Subject: (libretools) Fix bugs in autothing. Some of these are that I hadn't originally designed autothing v3 to work with --warn-undefined-variables. Others are just straight-up bugs from inadequate testing. --- build-aux/Makefile.each.tail/00-var.mk | 6 +-- build-aux/Makefile.each.tail/10-files.mk | 21 +++----- build-aux/Makefile.each.tail/10-nested.mk | 3 +- build-aux/Makefile.each.tail/11-texinfo.mk | 4 -- build-aux/Makefile.head.mk | 22 ++++----- build-aux/Makefile.once.head/00-gitfiles.mk | 75 ----------------------------- build-aux/Makefile.once.head/00-var.mk | 7 ++- build-aux/Makefile.once.head/10-dist.mk | 8 ++- build-aux/Makefile.once.head/10-files.mk | 37 +++++++++----- build-aux/Makefile.once.head/10-gitfiles.mk | 75 +++++++++++++++++++++++++++++ build-aux/Makefile.once.head/10-gnuconf.mk | 3 ++ build-aux/Makefile.once.head/10-nested.mk | 3 +- build-aux/Makefile.once.head/10-texinfo.mk | 6 +-- 13 files changed, 142 insertions(+), 128 deletions(-) delete mode 100644 build-aux/Makefile.once.head/00-gitfiles.mk create mode 100644 build-aux/Makefile.once.head/10-gitfiles.mk (limited to 'build-aux/Makefile.each.tail') 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 . -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 3bb3bc23df..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 @@ -41,17 +41,12 @@ _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 index 9491820f2e..1ee5843d69 100644 --- a/build-aux/Makefile.each.tail/11-texinfo.mk +++ b/build-aux/Makefile.each.tail/11-texinfo.mk @@ -26,10 +26,6 @@ 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)/install: - $(POST_INSTALL) - $(foreach f,$(texinfo.docs),$(INSTALL_INFO) $(DESTDIR)$(infodir)/$f.info $(DESTDIR)$(infodir)/dir$(at.nl)) - $(outdir)/%.info: $(srcdir)/%.texi; $(MAKEINFO) -o $(@D) $< $(outdir)/%.info: $(outdir)/%.texi; $(MAKEINFO) -o $(@D) $< $(outdir)/%.dvi : $(srcdir)/%.texi; $(TEXI2DVI) -o $(@D) $< diff --git a/build-aux/Makefile.head.mk b/build-aux/Makefile.head.mk index f4eb51da5b..6ac3d49f9f 100644 --- a/build-aux/Makefile.head.mk +++ b/build-aux/Makefile.head.mk @@ -32,17 +32,19 @@ _at.relbase = $(strip \ _at.relto = $(strip \ $(if $(call _at.is_subdir,$1,$2), \ $(patsubst %/.,%,$(patsubst $(abspath $1)/%,%,$(abspath $2)/.)), \ - ../$(call _at.relto,$(dir $1),$2))) + ../$(call _at.relto,$(dir $(abspath $1)),$2))) # These 3 functions only take one operand; we define public multi-operand # versions below. -_at.path = $(strip \ - $(if $(call _at.is_subdir,$(topoutdir),$1), \ - $(patsubst %/.,%,$(topoutdir)/$(call _at.relto,.,$1)), \ - $(if $(call _at.is_subdir,$(topsrcdir),$1), \ - $(patsubst %/.,%,$(topsrcdir)/$(call _at.relto,$(topsrcdir),$1)), \ - $(abspath $1)))) -_at.out2src = $(call _at.path,$(if $(call _at.is_subdir,$(topoutdir),$1),$(topsrcdir)/$(call _at.path,$1),$1)) +_at.path = $(strip $(or \ + $(if $(call _at.is_subdir, . ,$1), $(call _at.relto, . ,$1) ), \ + $(if $(call _at.is_subdir,$(topoutdir),$1),$(patsubst %/.,%,$(topoutdir)/$(call _at.relto,$(topoutdir),$1))), \ + $(if $(call _at.is_subdir,$(topsrcdir),$1),$(patsubst %/.,%,$(topsrcdir)/$(call _at.relto,$(topsrcdir),$1))), \ + $(abspath $1))) +_at.out2src = $(call _at.path,$(strip \ + $(if $(call _at.is_subdir,$(topoutdir),$1), \ + $(topsrcdir)/$(call _at.relto,$(topoutdir),$1), \ + $1))) _at.addprefix = $(call _at.path,$(if $(filter-out /%,$2),$1/$2,$2)) _at.rest = $(wordlist 2,$(words $1),$1) @@ -103,9 +105,7 @@ ifeq ($(call _at.is_subdir,$(topoutdir),$(outdir)),) $(error Autothing: not a subdirectory of topoutdir=$(topoutdir): $(outdir)) endif -# Don't use at.out2src because we *know* that $(outdir) is inside $(topoutdir), -# and has already had $(_at.path) called on it. -srcdir := $(call _at.path,$(topsrcdir)/$(outdir)) +srcdir := $(call _at.out2src,$(outdir)) ifeq ($(call _at.is_subdir,$(topsrcdir),$(srcdir)),) $(error Autothing: not a subdirectory of topsrcdir=$(topsrcdir): $(srcdir)) endif diff --git a/build-aux/Makefile.once.head/00-gitfiles.mk b/build-aux/Makefile.once.head/00-gitfiles.mk deleted file mode 100644 index 8566a7f5e9..0000000000 --- a/build-aux/Makefile.once.head/00-gitfiles.mk +++ /dev/null @@ -1,75 +0,0 @@ -# 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 -# 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 . - -mod.gitfiles.description = Automatically populate files.src.src from git -mod.gitfiles.depends += files nested write-ifchanged quote -mod.gitfiles.files += $(topsrcdir)/$(gitfiles.file) -define mod.gitfiles.doc -# Inputs: -# - Global variable : `gitfiles.file` (Default: gitfiles.mk) -# - Directory variable : `nested.subdirs` -# - External : git -# Outputs: -# - File : `$(topsrcdir)/$(gitfiles.file)` -# - Directory variable : `files.src.src` -# - Directory variable : `files.src.gen` (only in top dir) -# -# The `files` module has a variable (`files.src.src`) that you (the -# developer) set to list "pure" source files; the type of files that you -# would check into a version control system. Since you are a -# responsible developer, you use a version control system. Since the -# computer is already maintaining a list of these files *in the VCS*, -# why should you--a filthy human--need to also maintain the list? Enter -# gitfiles, which will talk to git to maintain `files.src.src`, but -# won't require that the git repository be distributed to -# installing-users. -# -# If `$(topsrcdir)/.git` exists, then it will generate -# `$(topsrcdir)/$(gitfiles.file)`. Otherwise, it will assume that -# `$(topsrcdir)/$(gitfiles.file)` already exists. -# -# It will use the information in `$(topsrcdir)/$(gitfiles.file)` to -# append to `files.src.src` in each directory -# -# Finally, since the generated `$(topsrcdir)/$(gitfiles.file)` must be -# distributed to users, it is added to $(topsrcdirs)'s `files.src.gen`. -# -# When setting `files.src.src`, it needs to know which files "belong" to -# the current directory directly, and which "belong" to a further -# subdirectory. To do this, it uses an expression involving -# `$(nested.subdirs)`. -# -# While gitfiles sets `files.src.src` very early in `each.head`, because -# `nested.subdirs` might not be set yet, it may or may not be safe to -# use the value of `$(files.src.src)` in your Makefile, depending on how -# you set `nested.subdirs`. -endef -mod.gitfiles.doc := $(value mod.gitfiles.doc) - -gitfiles.file ?= gitfiles.mk - -_gitfiles.all = --include $(topsrcdir)/$(gitfiles.file) - -ifneq ($(wildcard $(topsrcdir)/.git),) -$(topsrcdir)/$(gitfiles.file): _gitfiles.FORCE - @(cd $(@D) && git ls-files --recurse-submodules -z) | sed -z -e 's/\$$/\$$$$/g' -e 's/\n/$$(at.nl)/g' | xargs -r0 printf '_gitfiles.all+=%s\n' | $(WRITE_IFCHANGED) $@ -.PHONY: _gitfiles.FORCE -endif - -_gitfiles.dir = $(call at.relto,$(topsrcdir),$(srcdir)) -_gitfiles.pat = $(patsubst ./%,%,$(_gitfiles.dir)/%) -_gitfiles.dir.all = $(patsubst $(_gitfiles.pat),%,$(filter $(_gitfiles.pat),$(_gitfiles.all))) -_gitfiles.dir.src = $(filter-out $(addsuffix /%,$(nested.subdirs)),$(_gitfiles.dir.all)) diff --git a/build-aux/Makefile.once.head/00-var.mk b/build-aux/Makefile.once.head/00-var.mk index 1f50f21f1a..7c9e6ffe55 100644 --- a/build-aux/Makefile.once.head/00-var.mk +++ b/build-aux/Makefile.once.head/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 @@ -20,14 +20,17 @@ define mod.var.doc # Outputs: # Target : `$(outdir)/.var.%` # Directory variable: `at.targets` +# Directory variable: `var.` # # It's a well-known secret that many files generated by a Makefile vary with # the values of particular variables, but that GNU Make can't track these # dependencies. Well, with some cleverness, it actually can! # # With this module, to depend on the value of a variable, depend on -# `$(outdir)/.var.VARNAME`. +# `$(outdir)/.var.VARNAME`, or `$(var.)VARNAME` for short. endef mod.var.doc := $(value mod.var.doc) +var. = $(patsubst ./%,%,$(outdir)/.var.) + .PHONY: _var.FORCE diff --git a/build-aux/Makefile.once.head/10-dist.mk b/build-aux/Makefile.once.head/10-dist.mk index 27b39ecc5a..3621195c0d 100644 --- a/build-aux/Makefile.once.head/10-dist.mk +++ b/build-aux/Makefile.once.head/10-dist.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 @@ -50,6 +50,12 @@ define mod.dist.doc endef mod.dist.doc := $(value mod.dist.doc) +PACKAGE_TARNAME ?= +PACKAGE ?= +PACKAGE_NAME ?= +PACKAGE_VERSION ?= +VERSION ?= + # Developer configuration dist.exts ?= .tar.gz diff --git a/build-aux/Makefile.once.head/10-files.mk b/build-aux/Makefile.once.head/10-files.mk index f6fcf30c3a..564f9d634f 100644 --- a/build-aux/Makefile.once.head/10-files.mk +++ b/build-aux/Makefile.once.head/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 @@ -26,15 +26,15 @@ define mod.files.doc # - Global variable : `files.default ?= all` # - Global variable : `files.vcsclean ?= files.vcsclean` # - Global variable : `files.generate ?= files.generate` -# - Directory variable : `files.src.src` -# - Directory variable : `files.src.int` -# - Directory variable : `files.src.cfg` -# - Directory variable : `files.src.gen` -# - Directory variable : `files.out.slow` -# - Directory variable : `files.out.int` -# - Directory variable : `files.out.cfg` -# - Directory variable : `files.out.$(files.groups)` (well, $(addprefix...)) -# - Directory variable : `files.sys.$(files.groups)` (well, $(addprefix...)) +# - Directory variable : `files.src.src` # Sources +# - Directory variable : `files.src.int` # Intermediates; deletable +# - Directory variable : `files.src.cfg` # Outputs needed to run ./configure +# - Directory variable : `files.src.gen` # Other outputs +# - Directory variable : `files.out.slow` # Things to exclude from `make mostlyclean` +# - Directory variable : `files.out.int` # Intermediates +# - Directory variable : `files.out.cfg` # Outputs created by ./configure +# - Directory variable : `files.out.$(group)` for `group` in `$(files.groups)` +# - Directory variable : `files.sys.$(group)` for `group` in `$(files.groups)` # Outputs: # - Global variable : `nested.targets` # - Global variable : `at.targets` @@ -43,7 +43,7 @@ define mod.files.doc # - Directory variable : `files.out` # - Directory variable : `files.sys` # - Creative .PHONY targets: -# - `$(outdir)/$(files.generate))` +# - `$(outdir)/$(files.generate)` # - `$(outdir)/$(group)` for `group` in `$(files.groups)` # - `$(outdir)/install` # - `$(outdir)/install-$(group)` for `group` in `$(filter-out $(files.default),$(files.groups))` @@ -59,6 +59,10 @@ define mod.files.doc # Basic `*` wildcards are supported. Use `*`, not `%`; it will automatically # substitute `*`->`%` where appropriate. # +# Each of the destructive targets depends on `$(target)-hook`, which +# is defined to be a "double-colon rule" allowing you to add your own +# code. +# # TODO: prose documentation endef mod.files.doc := $(value mod.files.doc) @@ -76,7 +80,7 @@ nested.targets += install installdirs nested.targets += $(foreach g,$(files.groups),$g) nested.targets += $(foreach g,$(filter-out $(files.default),$(files.groups)),install-$g install-$gdirs) # Standard destructive PHONY targets -nested.targets += uninstall mostlyclean clean distclean maintainer-clean +nested.targets += uninstall mostlyclean clean distclean maintainer-clean $(files.vcsclean) # User configuration @@ -85,3 +89,12 @@ DESTDIR ?= RM ?= rm -f RMDIR_P ?= rmdir -p --ignore-fail-on-non-empty TRUE ?= true + +# Utility functions + +_files.XARGS = $(if $(strip $2),$1 $(strip $2)) + +_files.maintainer-clean-warning: + @echo 'This command is intended for maintainers to use; it' + @echo 'deletes files that may need special tools to rebuild.' +.PHONY: _files.maintainer-clean-warning diff --git a/build-aux/Makefile.once.head/10-gitfiles.mk b/build-aux/Makefile.once.head/10-gitfiles.mk new file mode 100644 index 0000000000..8566a7f5e9 --- /dev/null +++ b/build-aux/Makefile.once.head/10-gitfiles.mk @@ -0,0 +1,75 @@ +# 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 +# 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 . + +mod.gitfiles.description = Automatically populate files.src.src from git +mod.gitfiles.depends += files nested write-ifchanged quote +mod.gitfiles.files += $(topsrcdir)/$(gitfiles.file) +define mod.gitfiles.doc +# Inputs: +# - Global variable : `gitfiles.file` (Default: gitfiles.mk) +# - Directory variable : `nested.subdirs` +# - External : git +# Outputs: +# - File : `$(topsrcdir)/$(gitfiles.file)` +# - Directory variable : `files.src.src` +# - Directory variable : `files.src.gen` (only in top dir) +# +# The `files` module has a variable (`files.src.src`) that you (the +# developer) set to list "pure" source files; the type of files that you +# would check into a version control system. Since you are a +# responsible developer, you use a version control system. Since the +# computer is already maintaining a list of these files *in the VCS*, +# why should you--a filthy human--need to also maintain the list? Enter +# gitfiles, which will talk to git to maintain `files.src.src`, but +# won't require that the git repository be distributed to +# installing-users. +# +# If `$(topsrcdir)/.git` exists, then it will generate +# `$(topsrcdir)/$(gitfiles.file)`. Otherwise, it will assume that +# `$(topsrcdir)/$(gitfiles.file)` already exists. +# +# It will use the information in `$(topsrcdir)/$(gitfiles.file)` to +# append to `files.src.src` in each directory +# +# Finally, since the generated `$(topsrcdir)/$(gitfiles.file)` must be +# distributed to users, it is added to $(topsrcdirs)'s `files.src.gen`. +# +# When setting `files.src.src`, it needs to know which files "belong" to +# the current directory directly, and which "belong" to a further +# subdirectory. To do this, it uses an expression involving +# `$(nested.subdirs)`. +# +# While gitfiles sets `files.src.src` very early in `each.head`, because +# `nested.subdirs` might not be set yet, it may or may not be safe to +# use the value of `$(files.src.src)` in your Makefile, depending on how +# you set `nested.subdirs`. +endef +mod.gitfiles.doc := $(value mod.gitfiles.doc) + +gitfiles.file ?= gitfiles.mk + +_gitfiles.all = +-include $(topsrcdir)/$(gitfiles.file) + +ifneq ($(wildcard $(topsrcdir)/.git),) +$(topsrcdir)/$(gitfiles.file): _gitfiles.FORCE + @(cd $(@D) && git ls-files --recurse-submodules -z) | sed -z -e 's/\$$/\$$$$/g' -e 's/\n/$$(at.nl)/g' | xargs -r0 printf '_gitfiles.all+=%s\n' | $(WRITE_IFCHANGED) $@ +.PHONY: _gitfiles.FORCE +endif + +_gitfiles.dir = $(call at.relto,$(topsrcdir),$(srcdir)) +_gitfiles.pat = $(patsubst ./%,%,$(_gitfiles.dir)/%) +_gitfiles.dir.all = $(patsubst $(_gitfiles.pat),%,$(filter $(_gitfiles.pat),$(_gitfiles.all))) +_gitfiles.dir.src = $(filter-out $(addsuffix /%,$(nested.subdirs)),$(_gitfiles.dir.all)) diff --git a/build-aux/Makefile.once.head/10-gnuconf.mk b/build-aux/Makefile.once.head/10-gnuconf.mk index e24dfa11d6..87baa14a69 100644 --- a/build-aux/Makefile.once.head/10-gnuconf.mk +++ b/build-aux/Makefile.once.head/10-gnuconf.mk @@ -30,6 +30,9 @@ define mod.gnuconf.doc endef mod.gnuconf.doc := $(value mod.gnuconf.doc) +PACKAGE_TARNAME ?= +PACKAGE ?= +PACKAGE_NAME ?= gnuconf.pkgname ?= $(firstword $(PACKAGE_TARNAME) $(PACKAGE) $(PACKAGE_NAME)) ifeq ($(gnuconf.pkgname),) $(error Autothing module: gnuconf: gnuconf.pkgname must be set) diff --git a/build-aux/Makefile.once.head/10-nested.mk b/build-aux/Makefile.once.head/10-nested.mk index 4f181a9290..d903d53cd4 100644 --- a/build-aux/Makefile.once.head/10-nested.mk +++ b/build-aux/Makefile.once.head/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 @@ -21,6 +21,7 @@ define mod.nested.doc # Outputs: # - .PHONY Targets : `$(addprefix $(outdir)/,$(nested.targets))` # - Variable : `at.subdirs` +# - Variable : `at.targets` # # The Autothing `at.subdirs` slates a subdirectory's Makefile for inclusion, # but doesn't help with recursive targets like `all`, `install`, or `clean`, diff --git a/build-aux/Makefile.once.head/10-texinfo.mk b/build-aux/Makefile.once.head/10-texinfo.mk index aac2c287a4..d24852d8eb 100644 --- a/build-aux/Makefile.once.head/10-texinfo.mk +++ b/build-aux/Makefile.once.head/10-texinfo.mk @@ -29,17 +29,13 @@ define mod.texinfo.doc # - Directory variable : `files.out.{dvi,html,pdf,ps}` # - Directory variable : `files.sys.{dvi,html,pdf,ps,all}` # - .PHONY target : `$(outdir)/info` -# - .PHONY target : `$(outdir)/install` (see below) # - Target : `$(outdir)/%.info` # - Target : `$(outdir)/%.dvi` # - target : `$(outdir)/%.html` # - target : `$(outdir)/%.pdf` # - Target : `$(outdir)/%.ps` # -# The module counts on the `$(outdir)/install` target being defined by -# `files`, but not having a rule that executes once the dependencies -# have been taken care of; it adds a "post-install" rule to add the -# info files to the index. +# TODO: prose documentation endef mod.texinfo.doc := $(value mod.texinfo.doc) -- cgit v1.2.3-54-g00ecf