summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2017-01-15 01:44:37 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2017-01-15 01:44:37 -0500
commitcbee7a272b1f61843d596da913093acf77506481 (patch)
treee53b9a9a6f0a275f469c3c2c98c5d540a04a4884
parent5eb6e559d6665f4210be95fe46f1d0a6007dd734 (diff)
Tidy the gnustuff (and fork off gnudoc).
-rw-r--r--build-aux/Makefile.each.head/00-gnudoc.mk16
-rw-r--r--build-aux/Makefile.each.tail/11-gnudoc.mk42
-rw-r--r--build-aux/Makefile.each.tail/11-gnustuff.mk45
-rw-r--r--build-aux/Makefile.once.head/10-gnudoc.mk53
-rw-r--r--build-aux/Makefile.once.head/10-gnustuff.mk56
-rw-r--r--build-aux/Makefile.once.head/11-gnustuff.mk34
-rw-r--r--build-aux/Makefile.once.tail/11-gnustuff.mk4
7 files changed, 173 insertions, 77 deletions
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 <http://www.gnu.org/licenses/>.
+
+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 <http://www.gnu.org/licenses/>.
+
+$(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 <http://www.gnu.org/licenses/>.
-
-# 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 <http://www.gnu.org/licenses/>.
+
+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 <http://www.gnu.org/licenses/>.
+
+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 ?= <every variable from gnuconf ending in `dir`
+# that isn't bindir, sbindir, or libexecdir>
+# - 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 <http://www.gnu.org/licenses/>.
-
-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 <http://www.gnu.org/licenses/>.
-$(gnu.dirs):
+$(gnustuff.dirs):
$(MKDIR_P) $@