From df54432d56964e39b49915289a44fe5569ce9eb1 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 27 May 2016 21:09:58 -0400 Subject: move everything into build-aux --- build-aux/Makefile.once.head/10-std.mk | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 build-aux/Makefile.once.head/10-std.mk (limited to 'build-aux/Makefile.once.head') diff --git a/build-aux/Makefile.once.head/10-std.mk b/build-aux/Makefile.once.head/10-std.mk new file mode 100644 index 0000000..dec850c --- /dev/null +++ b/build-aux/Makefile.once.head/10-std.mk @@ -0,0 +1,31 @@ +# Copyright (C) 2015-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 . + +# Declare the default target +all: build +.PHONY: all + +# Standard creative PHONY targets +$(_am)phony += build install installdirs +# Standard destructive PHONY targets +$(_am)phony += uninstall mostlyclean clean distclean maintainer-clean + +$(_am)dirlocal += $(_am)src_files +$(_am)dirlocal += $(_am)gen_files +$(_am)dirlocal += $(_am)cfg_files +$(_am)dirlocal += $(_am)out_files +$(_am)dirlocal += $(_am)sys_files +$(_am)dirlocal += $(_am)clean_files +$(_am)dirlocal += $(_am)slow_files -- cgit v1.2.3 From 42bc23772059e663a8195a086e0b5b3c32366a92 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 27 May 2016 21:09:58 -0400 Subject: move everything into build-aux --- build-aux/Makefile.once.head/00-dist.mk | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 build-aux/Makefile.once.head/00-dist.mk (limited to 'build-aux/Makefile.once.head') diff --git a/build-aux/Makefile.once.head/00-dist.mk b/build-aux/Makefile.once.head/00-dist.mk new file mode 100644 index 0000000..5be9c72 --- /dev/null +++ b/build-aux/Makefile.once.head/00-dist.mk @@ -0,0 +1,16 @@ +# 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 . + +$(_am)distexts ?= .tar.gz -- cgit v1.2.3 From 44595e16ebcde42a730d927a0f7b563feef084a3 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 29 May 2016 16:05:16 -0400 Subject: work on things --- build-aux/Makefile.once.head/10-std.mk | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'build-aux/Makefile.once.head') diff --git a/build-aux/Makefile.once.head/10-std.mk b/build-aux/Makefile.once.head/10-std.mk index dec850c..b3d7c4a 100644 --- a/build-aux/Makefile.once.head/10-std.mk +++ b/build-aux/Makefile.once.head/10-std.mk @@ -17,15 +17,17 @@ all: build .PHONY: all +DESTDIR ?= + # Standard creative PHONY targets -$(_am)phony += build install installdirs +at.phony += build install installdirs # Standard destructive PHONY targets -$(_am)phony += uninstall mostlyclean clean distclean maintainer-clean +at.phony += uninstall mostlyclean clean distclean maintainer-clean -$(_am)dirlocal += $(_am)src_files -$(_am)dirlocal += $(_am)gen_files -$(_am)dirlocal += $(_am)cfg_files -$(_am)dirlocal += $(_am)out_files -$(_am)dirlocal += $(_am)sys_files -$(_am)dirlocal += $(_am)clean_files -$(_am)dirlocal += $(_am)slow_files +at.dirlocal += std.src_files +at.dirlocal += std.gen_files +at.dirlocal += std.cfg_files +at.dirlocal += std.out_files +at.dirlocal += std.sys_files +at.dirlocal += std.clean_files +at.dirlocal += std.slow_files -- cgit v1.2.3 From 7d1baa39157b6ab5e9f0cb6b5413f6fc1e2d4eea Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 29 May 2016 16:05:16 -0400 Subject: work on things --- build-aux/Makefile.once.head/00-dist.mk | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'build-aux/Makefile.once.head') diff --git a/build-aux/Makefile.once.head/00-dist.mk b/build-aux/Makefile.once.head/00-dist.mk index 5be9c72..314f7f8 100644 --- a/build-aux/Makefile.once.head/00-dist.mk +++ b/build-aux/Makefile.once.head/00-dist.mk @@ -1,16 +1 @@ -# 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 . - -$(_am)distexts ?= .tar.gz +dist.exts ?= .tar.gz -- cgit v1.2.3 From a50081a79688df9ff91a2ea48852bcd23fb56c0f Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 29 May 2016 16:05:16 -0400 Subject: work on things --- build-aux/Makefile.once.head/11-gnustandards.mk | 181 ++++++++++++++++++++++++ 1 file changed, 181 insertions(+) create mode 100644 build-aux/Makefile.once.head/11-gnustandards.mk (limited to 'build-aux/Makefile.once.head') diff --git a/build-aux/Makefile.once.head/11-gnustandards.mk b/build-aux/Makefile.once.head/11-gnustandards.mk new file mode 100644 index 0000000..5520b9b --- /dev/null +++ b/build-aux/Makefile.once.head/11-gnustandards.mk @@ -0,0 +1,181 @@ +# This file is based on §7.2 "Makefile Conventions" of the release of +# the GNU Coding Standards dated April 13, 2016. + +# 7.2.1: General Conventions for Makefiles +# ---------------------------------------- + +# The standards claim that every Makefile should contain +# +# SHELL = /bin/sh` +# +# but note that this is unnescesary with GNU Make. + +# 7.2.2: Utilities in Makefiles +# ----------------------------- + +# It's ok to hard-code these commands in rules, but who wants to +# memorize the list of what's ok? +AWK ?= awk +CAT ?= cat +CMP ?= cmp +CP ?= cp +DIFF ?= diff +ECHO ?= echo +EGREP ?= egrep +EXPR ?= expr +FALSE ?= false +GREP ?= grep +INSTALL_INFO ?= install-info +LN ?= ln +LS ?= ls +MKDIR ?= mkdir +MV ?= mv +PRINTF ?= printf +PWD ?= pwd +RM ?= rm +RMDIR ?= rmdir +SED ?= sed +SLEEP ?= sleep +SORT ?= sort +TAR ?= tar +TEST ?= test +TOUCH ?= touch +TR ?= tr +TRUE ?= true + +# Beyond those, define them yourself. + +# 7.2.3 Variables for Specifying Commands +# --------------------------------------- + +INSTALL ?= install +INSTALL_PROGRAM ?= $(INSTALL) +INSTALL_DATA ?= ${INSTALL} -m 644 + +# 7.2.4 DESTDIR: Support for Staged Installs +# ------------------------------------------ + +# This is done for us by the std module. + +# 7.2.5 Variables for Installation Directories +# -------------------------------------------- + +# Root for the installation +prefix ?= /usr/local +exec_prefix ?= $(prefix) +# Executable programs +bindir ?= $(exec_prefix)/bin +sbindir ?= $(exec_prefix)/sbin +libexecdir ?= $(exec_prefix)/libexec +gnu.program_dirs += $(bindir) $(sbindir) $(libexecdir) +# Data files +datarootdir ?= $(prefix)/share +datadir ?= $(datarootdir) +sysconfdir ?= $(prefix)/etc +sharedstatedir ?= $(prefix)/com +localstatedir ?= $(prefix)/var +runstatedir ?= $(localstatedir)/run +gnu.data_dirs += $(datarootdir) $(datadir) $(sysconfdir) $(sharedstatedir) $(localstatedir) $(runstatedir) +# Specific types of files +includedir ?= $(prefix)/include +oldincludedir ?= /usr/include +docdir ?= $(datarootdir)/doc/$(PACKAGE) +infodir ?= $(datarootdir)/info +htmldir ?= $(docdir) +dvidir ?= $(docdir) +pdfdir ?= $(docdir) +psdir ?= $(docdir) +libdir ?= $(exec_prefix)/lib +lispdir ?= $(datarootdir)/emacs/site-lisp +localedir ?= $(datarootdir)/locale +gnu.data_dirs += $(includedir) $(oldincludedir) $(docdir) $(infodir) $(htmldir) $(dvidir) $(pdfdir) $(psdir) $(libdir) $(lispdir) $(localedir) + +mandir ?= $(datarootdir)/man +man1dir ?= $(mandir)/man1 +man2dir ?= $(mandir)/man2 +man3dir ?= $(mandir)/man3 +man4dir ?= $(mandir)/man4 +man5dir ?= $(mandir)/man5 +man6dir ?= $(mandir)/man6 +man7dir ?= $(mandir)/man7 +man8dir ?= $(mandir)/man8 +gnu.data_dirs += $(mandir) $(man1dir) $(man2dir) $(man3dir) $(man4dir) $(man5dir) $(man6dir) $(man7dir) $(man8dir) + +manext ?= .1 +man1ext ?= .1 +man2ext ?= .2 +man3ext ?= .3 +man4ext ?= .4 +man5ext ?= .5 +man6ext ?= .6 +man7ext ?= .7 +man8ext ?= .8 + +# srcdir is handled for us by the core + +define _gnu.install_program +$$($1)/%: $$(outdir)/$$($1) + $$(NORMAL_INSTALL) + $$(INSTALL_PROGRAM) +$$($1)/%: $$(srcdir)/$$($1) + $$(NORMAL_INSTALL) + $$(INSTALL_PROGRAM) +endef +$(foreach d,$(gnu.program_dirs),$(eval $(call _gnu.install_program,$d))) + +define _gnu.install_data +$$($1)/%: $$(outdir)/$$($1) + $$(NORMAL_INSTALL) + $$(INSTALL_DATA) +$$($1)/%: $$(srcdir)/$$($1) + $$(NORMAL_INSTALL) + $$(INSTALL_DATA) +endef +$(foreach d,$(gnu.data_dirs),$(eval $(call _gnu.install_data,$d))) + +gnu.dirs += $(gnu.program_dirs) $(gnu.data_dirs) +$(gnu.dirs): + $(MKDIR_P) $@ + +# 7.2.6: Standard Targets for Users +# --------------------------------- + +gnu.info_docs ?= +std.sys_files += $(foreach f,$(gnu.info_docs), $(infodir)/$f.info ) + +#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 $(bindir)/% $(sbindir)/% $(libexecdir)/%,$(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)/%.dvi : $(srcdir)/%.texi; $(TEXI2DVI) -o $(@D) $< +$(outdir)/%.html: $(srcdir)/%.texi; $(TEXI2HTML) -o $(@D) $< +$(outdir)/%.pdf : $(srcdir)/%.texi; $(TEXI2PDF) -o $(@D) $< +$(outdir)/%.ps : $(srcdir)/%.texi; $(TEXI2PS) -o $(@D) $< + + + +#installdirs: std + +# 7.2.7: Standard Targets for Users +# --------------------------------- -- cgit v1.2.3 From d98870ac5acfe42d410383dfe7f2af18923510c4 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 29 May 2016 16:05:16 -0400 Subject: work on things --- build-aux/Makefile.once.head/00-write-ifchanged.mk | 1 + 1 file changed, 1 insertion(+) create mode 100644 build-aux/Makefile.once.head/00-write-ifchanged.mk (limited to 'build-aux/Makefile.once.head') diff --git a/build-aux/Makefile.once.head/00-write-ifchanged.mk b/build-aux/Makefile.once.head/00-write-ifchanged.mk new file mode 100644 index 0000000..79ef1c4 --- /dev/null +++ b/build-aux/Makefile.once.head/00-write-ifchanged.mk @@ -0,0 +1 @@ +WRITE_IFCHANGED = $(topsrcdir)/build-aux/write-ifchanged -- cgit v1.2.3 From 8441649be887b54222d52fb9e69247c9012acff2 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 29 May 2016 16:09:27 -0400 Subject: Remove everything but the core --- build-aux/Makefile.once.head/.gitignore | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 build-aux/Makefile.once.head/.gitignore (limited to 'build-aux/Makefile.once.head') diff --git a/build-aux/Makefile.once.head/.gitignore b/build-aux/Makefile.once.head/.gitignore new file mode 100644 index 0000000..e69de29 -- cgit v1.2.3 From 85c37c0e6f8ebf9d816f984a3499d856a2e708b1 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 29 May 2016 17:05:41 -0400 Subject: tidy up --- build-aux/Makefile.once.head/10-std.mk | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'build-aux/Makefile.once.head') diff --git a/build-aux/Makefile.once.head/10-std.mk b/build-aux/Makefile.once.head/10-std.mk index b3d7c4a..3e058ec 100644 --- a/build-aux/Makefile.once.head/10-std.mk +++ b/build-aux/Makefile.once.head/10-std.mk @@ -15,9 +15,7 @@ # Declare the default target all: build -.PHONY: all - -DESTDIR ?= +.PHONY: all noop # Standard creative PHONY targets at.phony += build install installdirs @@ -31,3 +29,11 @@ at.dirlocal += std.out_files at.dirlocal += std.sys_files at.dirlocal += std.clean_files at.dirlocal += std.slow_files + +# User configuration + +DESTDIR ?= + +RM ?= rm -f +RMDIR_P ?= rmdir -p +TRUE ?= true -- cgit v1.2.3 From cbe8694c76ea68d56073ffe3e74359a5db4d997a Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 29 May 2016 17:29:02 -0400 Subject: tidy --- build-aux/Makefile.once.head/00-dist.mk | 36 +++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'build-aux/Makefile.once.head') diff --git a/build-aux/Makefile.once.head/00-dist.mk b/build-aux/Makefile.once.head/00-dist.mk index 314f7f8..98fc6b3 100644 --- a/build-aux/Makefile.once.head/00-dist.mk +++ b/build-aux/Makefile.once.head/00-dist.mk @@ -1 +1,37 @@ +# Copyright (C) 2015-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 . + +# Developer configuration + dist.exts ?= .tar.gz +PACKAGE ?= YOUR_PACKAGE_NAME +VERSION ?= 0.0.1 + +# User configuration + +CP ?= cp +GZIP ?= gzip +MKDIR ?= mkdir +MKDIR_P ?= mkdir -p +MV ?= mv +RM ?= rm -f +TAR ?= tar + +GZIPFLAGS ?= $(GZIP_ENV) +GZIP_ENV ?= --best + +# Implementation + +at.phony += dist -- cgit v1.2.3 From 37b88c702ebe46611435f528b087d82c53dfcc77 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 29 May 2016 17:37:41 -0400 Subject: rename PACKAGE->dist.name VERSION->dist.version --- build-aux/Makefile.once.head/00-dist.mk | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'build-aux/Makefile.once.head') diff --git a/build-aux/Makefile.once.head/00-dist.mk b/build-aux/Makefile.once.head/00-dist.mk index 98fc6b3..6a54b7d 100644 --- a/build-aux/Makefile.once.head/00-dist.mk +++ b/build-aux/Makefile.once.head/00-dist.mk @@ -16,8 +16,15 @@ # Developer configuration dist.exts ?= .tar.gz -PACKAGE ?= YOUR_PACKAGE_NAME -VERSION ?= 0.0.1 +dist.name ?= $(PACKAGE) +dist.version ?= $(VERSION) + +ifeq ($(dist.name),) +$(error dist.name must be set) +endif +ifeq ($(dist.version),) +$(error dist.name must be set) +endif # User configuration -- cgit v1.2.3 From c53ae3285fb85d3b70870692a0206ab0c6521796 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 29 May 2016 18:38:08 -0400 Subject: oops --- build-aux/Makefile.once.head/00-dist.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'build-aux/Makefile.once.head') diff --git a/build-aux/Makefile.once.head/00-dist.mk b/build-aux/Makefile.once.head/00-dist.mk index 6a54b7d..2f1da66 100644 --- a/build-aux/Makefile.once.head/00-dist.mk +++ b/build-aux/Makefile.once.head/00-dist.mk @@ -23,7 +23,7 @@ ifeq ($(dist.name),) $(error dist.name must be set) endif ifeq ($(dist.version),) -$(error dist.name must be set) +$(error dist.version must be set) endif # User configuration -- cgit v1.2.3 From 68affbbe3a2258510f48c62400cc95ad042c959d Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 29 May 2016 18:38:23 -0400 Subject: Rename dist.name -> dist.pkgname --- build-aux/Makefile.once.head/00-dist.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'build-aux/Makefile.once.head') diff --git a/build-aux/Makefile.once.head/00-dist.mk b/build-aux/Makefile.once.head/00-dist.mk index 2f1da66..d5bfcd3 100644 --- a/build-aux/Makefile.once.head/00-dist.mk +++ b/build-aux/Makefile.once.head/00-dist.mk @@ -16,11 +16,11 @@ # Developer configuration dist.exts ?= .tar.gz -dist.name ?= $(PACKAGE) +dist.pkgname ?= $(PACKAGE) dist.version ?= $(VERSION) -ifeq ($(dist.name),) -$(error dist.name must be set) +ifeq ($(dist.pkgname),) +$(error dist.pkgname must be set) endif ifeq ($(dist.version),) $(error dist.version must be set) -- cgit v1.2.3 From ac719e8d3e8795059752451c859af9071a1303f4 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 29 May 2016 19:15:05 -0400 Subject: tidy --- build-aux/Makefile.once.head/11-gnu.mk | 143 +++++++++++++++++++ build-aux/Makefile.once.head/11-gnustandards.mk | 181 ------------------------ 2 files changed, 143 insertions(+), 181 deletions(-) create mode 100644 build-aux/Makefile.once.head/11-gnu.mk delete mode 100644 build-aux/Makefile.once.head/11-gnustandards.mk (limited to 'build-aux/Makefile.once.head') diff --git a/build-aux/Makefile.once.head/11-gnu.mk b/build-aux/Makefile.once.head/11-gnu.mk new file mode 100644 index 0000000..b704a57 --- /dev/null +++ b/build-aux/Makefile.once.head/11-gnu.mk @@ -0,0 +1,143 @@ +# 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.2: Utilities in Makefiles +# ----------------------------- + +# It's ok to hard-code these commands in rules, but who wants to +# memorize the list of what's ok? +AWK ?= awk +CAT ?= cat +CMP ?= cmp +CP ?= cp +DIFF ?= diff +ECHO ?= echo +EGREP ?= egrep +EXPR ?= expr +FALSE ?= false +GREP ?= grep +INSTALL_INFO ?= install-info +LN ?= ln +LS ?= ls +MKDIR ?= mkdir +MV ?= mv +PRINTF ?= printf +PWD ?= pwd +RM ?= rm +RMDIR ?= rmdir +SED ?= sed +SLEEP ?= sleep +SORT ?= sort +TAR ?= tar +TEST ?= test +TOUCH ?= touch +TR ?= tr +TRUE ?= true + +# 7.2.3 Variables for Specifying Commands +# --------------------------------------- + +INSTALL ?= install +INSTALL_PROGRAM ?= $(INSTALL) +INSTALL_DATA ?= ${INSTALL} -m 644 + +# These aren't specified in the standards, but we use them +STRIP ?= strip +MAKEINFO ?= makeinfo +TEXI2DVI ?= texi2dvi +TEXI2HTML ?= makeinfo --html +TEXI2PDF ?= texi2pdf +TEXI2PS ?= makeinfo --ps +MKDIR_P ?= mkdir -p + +# 7.2.5 Variables for Installation Directories +# -------------------------------------------- + +# Root for the installation +prefix ?= /usr/local +exec_prefix ?= $(prefix) +# Executable programs +bindir ?= $(exec_prefix)/bin +sbindir ?= $(exec_prefix)/sbin +libexecdir ?= $(exec_prefix)/libexec +gnu.program_dirs += $(bindir) $(sbindir) $(libexecdir) +# Data files +datarootdir ?= $(prefix)/share +datadir ?= $(datarootdir) +sysconfdir ?= $(prefix)/etc +sharedstatedir ?= $(prefix)/com +localstatedir ?= $(prefix)/var +runstatedir ?= $(localstatedir)/run +gnu.data_dirs += $(datarootdir) $(datadir) $(sysconfdir) $(sharedstatedir) $(localstatedir) $(runstatedir) +# Specific types of files +includedir ?= $(prefix)/include +oldincludedir ?= /usr/include +docdir ?= $(datarootdir)/doc/$(PACKAGE) +infodir ?= $(datarootdir)/info +htmldir ?= $(docdir) +dvidir ?= $(docdir) +pdfdir ?= $(docdir) +psdir ?= $(docdir) +libdir ?= $(exec_prefix)/lib +lispdir ?= $(datarootdir)/emacs/site-lisp +localedir ?= $(datarootdir)/locale +gnu.data_dirs += $(includedir) $(oldincludedir) $(docdir) $(infodir) $(htmldir) $(dvidir) $(pdfdir) $(psdir) $(libdir) $(lispdir) $(localedir) + +mandir ?= $(datarootdir)/man +man1dir ?= $(mandir)/man1 +man2dir ?= $(mandir)/man2 +man3dir ?= $(mandir)/man3 +man4dir ?= $(mandir)/man4 +man5dir ?= $(mandir)/man5 +man6dir ?= $(mandir)/man6 +man7dir ?= $(mandir)/man7 +man8dir ?= $(mandir)/man8 +gnu.data_dirs += $(mandir) $(man1dir) $(man2dir) $(man3dir) $(man4dir) $(man5dir) $(man6dir) $(man7dir) $(man8dir) + +manext ?= .1 +man1ext ?= .1 +man2ext ?= .2 +man3ext ?= .3 +man4ext ?= .4 +man5ext ?= .5 +man6ext ?= .6 +man7ext ?= .7 +man8ext ?= .8 + +# srcdir is handled for us by the core + +# Other initialization +gnu.info_docs ?= +std.dirlocal += gnu.info_docs + +define _gnu.install_program +$$($1)/%: $$(outdir)/$$($1) + $$(NORMAL_INSTALL) + $$(INSTALL_PROGRAM) +$$($1)/%: $$(srcdir)/$$($1) + $$(NORMAL_INSTALL) + $$(INSTALL_PROGRAM) +endef + +define _gnu.install_data +$$($1)/%: $$(outdir)/$$($1) + $$(NORMAL_INSTALL) + $$(INSTALL_DATA) +$$($1)/%: $$(srcdir)/$$($1) + $$(NORMAL_INSTALL) + $$(INSTALL_DATA) +endef + +gnu.dirs += $(gnu.program_dirs) $(gnu.data_dirs) diff --git a/build-aux/Makefile.once.head/11-gnustandards.mk b/build-aux/Makefile.once.head/11-gnustandards.mk deleted file mode 100644 index 5520b9b..0000000 --- a/build-aux/Makefile.once.head/11-gnustandards.mk +++ /dev/null @@ -1,181 +0,0 @@ -# This file is based on §7.2 "Makefile Conventions" of the release of -# the GNU Coding Standards dated April 13, 2016. - -# 7.2.1: General Conventions for Makefiles -# ---------------------------------------- - -# The standards claim that every Makefile should contain -# -# SHELL = /bin/sh` -# -# but note that this is unnescesary with GNU Make. - -# 7.2.2: Utilities in Makefiles -# ----------------------------- - -# It's ok to hard-code these commands in rules, but who wants to -# memorize the list of what's ok? -AWK ?= awk -CAT ?= cat -CMP ?= cmp -CP ?= cp -DIFF ?= diff -ECHO ?= echo -EGREP ?= egrep -EXPR ?= expr -FALSE ?= false -GREP ?= grep -INSTALL_INFO ?= install-info -LN ?= ln -LS ?= ls -MKDIR ?= mkdir -MV ?= mv -PRINTF ?= printf -PWD ?= pwd -RM ?= rm -RMDIR ?= rmdir -SED ?= sed -SLEEP ?= sleep -SORT ?= sort -TAR ?= tar -TEST ?= test -TOUCH ?= touch -TR ?= tr -TRUE ?= true - -# Beyond those, define them yourself. - -# 7.2.3 Variables for Specifying Commands -# --------------------------------------- - -INSTALL ?= install -INSTALL_PROGRAM ?= $(INSTALL) -INSTALL_DATA ?= ${INSTALL} -m 644 - -# 7.2.4 DESTDIR: Support for Staged Installs -# ------------------------------------------ - -# This is done for us by the std module. - -# 7.2.5 Variables for Installation Directories -# -------------------------------------------- - -# Root for the installation -prefix ?= /usr/local -exec_prefix ?= $(prefix) -# Executable programs -bindir ?= $(exec_prefix)/bin -sbindir ?= $(exec_prefix)/sbin -libexecdir ?= $(exec_prefix)/libexec -gnu.program_dirs += $(bindir) $(sbindir) $(libexecdir) -# Data files -datarootdir ?= $(prefix)/share -datadir ?= $(datarootdir) -sysconfdir ?= $(prefix)/etc -sharedstatedir ?= $(prefix)/com -localstatedir ?= $(prefix)/var -runstatedir ?= $(localstatedir)/run -gnu.data_dirs += $(datarootdir) $(datadir) $(sysconfdir) $(sharedstatedir) $(localstatedir) $(runstatedir) -# Specific types of files -includedir ?= $(prefix)/include -oldincludedir ?= /usr/include -docdir ?= $(datarootdir)/doc/$(PACKAGE) -infodir ?= $(datarootdir)/info -htmldir ?= $(docdir) -dvidir ?= $(docdir) -pdfdir ?= $(docdir) -psdir ?= $(docdir) -libdir ?= $(exec_prefix)/lib -lispdir ?= $(datarootdir)/emacs/site-lisp -localedir ?= $(datarootdir)/locale -gnu.data_dirs += $(includedir) $(oldincludedir) $(docdir) $(infodir) $(htmldir) $(dvidir) $(pdfdir) $(psdir) $(libdir) $(lispdir) $(localedir) - -mandir ?= $(datarootdir)/man -man1dir ?= $(mandir)/man1 -man2dir ?= $(mandir)/man2 -man3dir ?= $(mandir)/man3 -man4dir ?= $(mandir)/man4 -man5dir ?= $(mandir)/man5 -man6dir ?= $(mandir)/man6 -man7dir ?= $(mandir)/man7 -man8dir ?= $(mandir)/man8 -gnu.data_dirs += $(mandir) $(man1dir) $(man2dir) $(man3dir) $(man4dir) $(man5dir) $(man6dir) $(man7dir) $(man8dir) - -manext ?= .1 -man1ext ?= .1 -man2ext ?= .2 -man3ext ?= .3 -man4ext ?= .4 -man5ext ?= .5 -man6ext ?= .6 -man7ext ?= .7 -man8ext ?= .8 - -# srcdir is handled for us by the core - -define _gnu.install_program -$$($1)/%: $$(outdir)/$$($1) - $$(NORMAL_INSTALL) - $$(INSTALL_PROGRAM) -$$($1)/%: $$(srcdir)/$$($1) - $$(NORMAL_INSTALL) - $$(INSTALL_PROGRAM) -endef -$(foreach d,$(gnu.program_dirs),$(eval $(call _gnu.install_program,$d))) - -define _gnu.install_data -$$($1)/%: $$(outdir)/$$($1) - $$(NORMAL_INSTALL) - $$(INSTALL_DATA) -$$($1)/%: $$(srcdir)/$$($1) - $$(NORMAL_INSTALL) - $$(INSTALL_DATA) -endef -$(foreach d,$(gnu.data_dirs),$(eval $(call _gnu.install_data,$d))) - -gnu.dirs += $(gnu.program_dirs) $(gnu.data_dirs) -$(gnu.dirs): - $(MKDIR_P) $@ - -# 7.2.6: Standard Targets for Users -# --------------------------------- - -gnu.info_docs ?= -std.sys_files += $(foreach f,$(gnu.info_docs), $(infodir)/$f.info ) - -#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 $(bindir)/% $(sbindir)/% $(libexecdir)/%,$(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)/%.dvi : $(srcdir)/%.texi; $(TEXI2DVI) -o $(@D) $< -$(outdir)/%.html: $(srcdir)/%.texi; $(TEXI2HTML) -o $(@D) $< -$(outdir)/%.pdf : $(srcdir)/%.texi; $(TEXI2PDF) -o $(@D) $< -$(outdir)/%.ps : $(srcdir)/%.texi; $(TEXI2PS) -o $(@D) $< - - - -#installdirs: std - -# 7.2.7: Standard Targets for Users -# --------------------------------- -- cgit v1.2.3 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.once.head/11-gnu.mk | 143 ---------------------------- build-aux/Makefile.once.head/11-gnustuff.mk | 30 ++++++ 2 files changed, 30 insertions(+), 143 deletions(-) delete mode 100644 build-aux/Makefile.once.head/11-gnu.mk create mode 100644 build-aux/Makefile.once.head/11-gnustuff.mk (limited to 'build-aux/Makefile.once.head') diff --git a/build-aux/Makefile.once.head/11-gnu.mk b/build-aux/Makefile.once.head/11-gnu.mk deleted file mode 100644 index b704a57..0000000 --- a/build-aux/Makefile.once.head/11-gnu.mk +++ /dev/null @@ -1,143 +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.2: Utilities in Makefiles -# ----------------------------- - -# It's ok to hard-code these commands in rules, but who wants to -# memorize the list of what's ok? -AWK ?= awk -CAT ?= cat -CMP ?= cmp -CP ?= cp -DIFF ?= diff -ECHO ?= echo -EGREP ?= egrep -EXPR ?= expr -FALSE ?= false -GREP ?= grep -INSTALL_INFO ?= install-info -LN ?= ln -LS ?= ls -MKDIR ?= mkdir -MV ?= mv -PRINTF ?= printf -PWD ?= pwd -RM ?= rm -RMDIR ?= rmdir -SED ?= sed -SLEEP ?= sleep -SORT ?= sort -TAR ?= tar -TEST ?= test -TOUCH ?= touch -TR ?= tr -TRUE ?= true - -# 7.2.3 Variables for Specifying Commands -# --------------------------------------- - -INSTALL ?= install -INSTALL_PROGRAM ?= $(INSTALL) -INSTALL_DATA ?= ${INSTALL} -m 644 - -# These aren't specified in the standards, but we use them -STRIP ?= strip -MAKEINFO ?= makeinfo -TEXI2DVI ?= texi2dvi -TEXI2HTML ?= makeinfo --html -TEXI2PDF ?= texi2pdf -TEXI2PS ?= makeinfo --ps -MKDIR_P ?= mkdir -p - -# 7.2.5 Variables for Installation Directories -# -------------------------------------------- - -# Root for the installation -prefix ?= /usr/local -exec_prefix ?= $(prefix) -# Executable programs -bindir ?= $(exec_prefix)/bin -sbindir ?= $(exec_prefix)/sbin -libexecdir ?= $(exec_prefix)/libexec -gnu.program_dirs += $(bindir) $(sbindir) $(libexecdir) -# Data files -datarootdir ?= $(prefix)/share -datadir ?= $(datarootdir) -sysconfdir ?= $(prefix)/etc -sharedstatedir ?= $(prefix)/com -localstatedir ?= $(prefix)/var -runstatedir ?= $(localstatedir)/run -gnu.data_dirs += $(datarootdir) $(datadir) $(sysconfdir) $(sharedstatedir) $(localstatedir) $(runstatedir) -# Specific types of files -includedir ?= $(prefix)/include -oldincludedir ?= /usr/include -docdir ?= $(datarootdir)/doc/$(PACKAGE) -infodir ?= $(datarootdir)/info -htmldir ?= $(docdir) -dvidir ?= $(docdir) -pdfdir ?= $(docdir) -psdir ?= $(docdir) -libdir ?= $(exec_prefix)/lib -lispdir ?= $(datarootdir)/emacs/site-lisp -localedir ?= $(datarootdir)/locale -gnu.data_dirs += $(includedir) $(oldincludedir) $(docdir) $(infodir) $(htmldir) $(dvidir) $(pdfdir) $(psdir) $(libdir) $(lispdir) $(localedir) - -mandir ?= $(datarootdir)/man -man1dir ?= $(mandir)/man1 -man2dir ?= $(mandir)/man2 -man3dir ?= $(mandir)/man3 -man4dir ?= $(mandir)/man4 -man5dir ?= $(mandir)/man5 -man6dir ?= $(mandir)/man6 -man7dir ?= $(mandir)/man7 -man8dir ?= $(mandir)/man8 -gnu.data_dirs += $(mandir) $(man1dir) $(man2dir) $(man3dir) $(man4dir) $(man5dir) $(man6dir) $(man7dir) $(man8dir) - -manext ?= .1 -man1ext ?= .1 -man2ext ?= .2 -man3ext ?= .3 -man4ext ?= .4 -man5ext ?= .5 -man6ext ?= .6 -man7ext ?= .7 -man8ext ?= .8 - -# srcdir is handled for us by the core - -# Other initialization -gnu.info_docs ?= -std.dirlocal += gnu.info_docs - -define _gnu.install_program -$$($1)/%: $$(outdir)/$$($1) - $$(NORMAL_INSTALL) - $$(INSTALL_PROGRAM) -$$($1)/%: $$(srcdir)/$$($1) - $$(NORMAL_INSTALL) - $$(INSTALL_PROGRAM) -endef - -define _gnu.install_data -$$($1)/%: $$(outdir)/$$($1) - $$(NORMAL_INSTALL) - $$(INSTALL_DATA) -$$($1)/%: $$(srcdir)/$$($1) - $$(NORMAL_INSTALL) - $$(INSTALL_DATA) -endef - -gnu.dirs += $(gnu.program_dirs) $(gnu.data_dirs) diff --git a/build-aux/Makefile.once.head/11-gnustuff.mk b/build-aux/Makefile.once.head/11-gnustuff.mk new file mode 100644 index 0000000..d91832d --- /dev/null +++ b/build-aux/Makefile.once.head/11-gnustuff.mk @@ -0,0 +1,30 @@ +# 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) -- cgit v1.2.3 From 303009fbfd0f491ad91e939dbb3a07849add2005 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 30 May 2016 01:25:10 -0400 Subject: Make a separate 00-gnuconf --- build-aux/Makefile.once.head/00-gnuconf.mk | 149 +++++++++++++++++++++++++++++ build-aux/Makefile.once.head/11-gnu.mk | 143 --------------------------- 2 files changed, 149 insertions(+), 143 deletions(-) create mode 100644 build-aux/Makefile.once.head/00-gnuconf.mk delete mode 100644 build-aux/Makefile.once.head/11-gnu.mk (limited to 'build-aux/Makefile.once.head') diff --git a/build-aux/Makefile.once.head/00-gnuconf.mk b/build-aux/Makefile.once.head/00-gnuconf.mk new file mode 100644 index 0000000..79ecc34 --- /dev/null +++ b/build-aux/Makefile.once.head/00-gnuconf.mk @@ -0,0 +1,149 @@ +# 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 . + +# This file is based on §7.2 "Makefile Conventions" of the release of +# the GNU Coding Standards dated April 13, 2016. + +gnuconf.pkgname ?= $(PACKAGE) +ifeq ($(gnuconf.pkgname),) +$(error gnuconf.pkgname must be set) +endif + +# 7.2.2: Utilities in Makefiles +# ----------------------------- + +# It's ok to hard-code these commands in rules, but who wants to +# memorize the list of what's ok? +AWK ?= awk +CAT ?= cat +CMP ?= cmp +CP ?= cp +DIFF ?= diff +ECHO ?= echo +EGREP ?= egrep +EXPR ?= expr +FALSE ?= false +GREP ?= grep +INSTALL_INFO ?= install-info +LN ?= ln +LS ?= ls +MKDIR ?= mkdir +MV ?= mv +PRINTF ?= printf +PWD ?= pwd +RM ?= rm +RMDIR ?= rmdir +SED ?= sed +SLEEP ?= sleep +SORT ?= sort +TAR ?= tar +TEST ?= test +TOUCH ?= touch +TR ?= tr +TRUE ?= true + +# These must be user-configurable +AR ?= ar +ARFLAGS ?= +BISON ?= bison +BISONFLAGS ?= +CC ?= cc +CCFLAGS ?= $(CFLAGS) +FLEX ?= flex +FLEXFLAGS ?= +INSTALL ?= install +INSTALLFLAGS ?= +LD ?= ld +LDFLAGS ?= +LDCONFIG ?= ldconfig #TODO +LDCONFIGFLAGS ?= +LEX ?= lex +LEXFLAGS ?= $(LFLAGS) +#MAKE +MAKEINFO ?= makeinfo +MAKEINFOFLAGS ?= +RANLIB ?= ranlib #TODO +RANLIBFLAGS ?= +TEXI2DVI ?= texi2dvi +TEXI2DVIFLAGS ?= +YACC ?= yacc +YACCFLAGS ?= $(YFLAGS) + +CFLAGS ?= +LFLAGS ?= +YFLAGS ?= + +LN_S ?= ln -s #TODO + +CHGRP ?= chgrp +CHMOD ?= chmod +CHOWN ?= chown +MKNOD ?= mknod + +# 7.2.3 Variables for Specifying Commands +# --------------------------------------- + +INSTALL_PROGRAM ?= $(INSTALL) +INSTALL_DATA ?= ${INSTALL} -m 644 + +# 7.2.5 Variables for Installation Directories +# -------------------------------------------- + +# Root for the installation +prefix ?= /usr/local +exec_prefix ?= $(prefix) +# Executable programs +bindir ?= $(exec_prefix)/bin +sbindir ?= $(exec_prefix)/sbin +libexecdir ?= $(exec_prefix)/libexec +# Data files +datarootdir ?= $(prefix)/share +datadir ?= $(datarootdir) +sysconfdir ?= $(prefix)/etc +sharedstatedir ?= $(prefix)/com +localstatedir ?= $(prefix)/var +runstatedir ?= $(localstatedir)/run +# Specific types of files +includedir ?= $(prefix)/include +oldincludedir ?= /usr/include +docdir ?= $(datarootdir)/doc/$(gnuconf.pkgname) +infodir ?= $(datarootdir)/info +htmldir ?= $(docdir) +dvidir ?= $(docdir) +pdfdir ?= $(docdir) +psdir ?= $(docdir) +libdir ?= $(exec_prefix)/lib +lispdir ?= $(datarootdir)/emacs/site-lisp +localedir ?= $(datarootdir)/locale + +mandir ?= $(datarootdir)/man +man1dir ?= $(mandir)/man1 +man2dir ?= $(mandir)/man2 +man3dir ?= $(mandir)/man3 +man4dir ?= $(mandir)/man4 +man5dir ?= $(mandir)/man5 +man6dir ?= $(mandir)/man6 +man7dir ?= $(mandir)/man7 +man8dir ?= $(mandir)/man8 + +manext ?= .1 +man1ext ?= .1 +man2ext ?= .2 +man3ext ?= .3 +man4ext ?= .4 +man5ext ?= .5 +man6ext ?= .6 +man7ext ?= .7 +man8ext ?= .8 diff --git a/build-aux/Makefile.once.head/11-gnu.mk b/build-aux/Makefile.once.head/11-gnu.mk deleted file mode 100644 index b704a57..0000000 --- a/build-aux/Makefile.once.head/11-gnu.mk +++ /dev/null @@ -1,143 +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.2: Utilities in Makefiles -# ----------------------------- - -# It's ok to hard-code these commands in rules, but who wants to -# memorize the list of what's ok? -AWK ?= awk -CAT ?= cat -CMP ?= cmp -CP ?= cp -DIFF ?= diff -ECHO ?= echo -EGREP ?= egrep -EXPR ?= expr -FALSE ?= false -GREP ?= grep -INSTALL_INFO ?= install-info -LN ?= ln -LS ?= ls -MKDIR ?= mkdir -MV ?= mv -PRINTF ?= printf -PWD ?= pwd -RM ?= rm -RMDIR ?= rmdir -SED ?= sed -SLEEP ?= sleep -SORT ?= sort -TAR ?= tar -TEST ?= test -TOUCH ?= touch -TR ?= tr -TRUE ?= true - -# 7.2.3 Variables for Specifying Commands -# --------------------------------------- - -INSTALL ?= install -INSTALL_PROGRAM ?= $(INSTALL) -INSTALL_DATA ?= ${INSTALL} -m 644 - -# These aren't specified in the standards, but we use them -STRIP ?= strip -MAKEINFO ?= makeinfo -TEXI2DVI ?= texi2dvi -TEXI2HTML ?= makeinfo --html -TEXI2PDF ?= texi2pdf -TEXI2PS ?= makeinfo --ps -MKDIR_P ?= mkdir -p - -# 7.2.5 Variables for Installation Directories -# -------------------------------------------- - -# Root for the installation -prefix ?= /usr/local -exec_prefix ?= $(prefix) -# Executable programs -bindir ?= $(exec_prefix)/bin -sbindir ?= $(exec_prefix)/sbin -libexecdir ?= $(exec_prefix)/libexec -gnu.program_dirs += $(bindir) $(sbindir) $(libexecdir) -# Data files -datarootdir ?= $(prefix)/share -datadir ?= $(datarootdir) -sysconfdir ?= $(prefix)/etc -sharedstatedir ?= $(prefix)/com -localstatedir ?= $(prefix)/var -runstatedir ?= $(localstatedir)/run -gnu.data_dirs += $(datarootdir) $(datadir) $(sysconfdir) $(sharedstatedir) $(localstatedir) $(runstatedir) -# Specific types of files -includedir ?= $(prefix)/include -oldincludedir ?= /usr/include -docdir ?= $(datarootdir)/doc/$(PACKAGE) -infodir ?= $(datarootdir)/info -htmldir ?= $(docdir) -dvidir ?= $(docdir) -pdfdir ?= $(docdir) -psdir ?= $(docdir) -libdir ?= $(exec_prefix)/lib -lispdir ?= $(datarootdir)/emacs/site-lisp -localedir ?= $(datarootdir)/locale -gnu.data_dirs += $(includedir) $(oldincludedir) $(docdir) $(infodir) $(htmldir) $(dvidir) $(pdfdir) $(psdir) $(libdir) $(lispdir) $(localedir) - -mandir ?= $(datarootdir)/man -man1dir ?= $(mandir)/man1 -man2dir ?= $(mandir)/man2 -man3dir ?= $(mandir)/man3 -man4dir ?= $(mandir)/man4 -man5dir ?= $(mandir)/man5 -man6dir ?= $(mandir)/man6 -man7dir ?= $(mandir)/man7 -man8dir ?= $(mandir)/man8 -gnu.data_dirs += $(mandir) $(man1dir) $(man2dir) $(man3dir) $(man4dir) $(man5dir) $(man6dir) $(man7dir) $(man8dir) - -manext ?= .1 -man1ext ?= .1 -man2ext ?= .2 -man3ext ?= .3 -man4ext ?= .4 -man5ext ?= .5 -man6ext ?= .6 -man7ext ?= .7 -man8ext ?= .8 - -# srcdir is handled for us by the core - -# Other initialization -gnu.info_docs ?= -std.dirlocal += gnu.info_docs - -define _gnu.install_program -$$($1)/%: $$(outdir)/$$($1) - $$(NORMAL_INSTALL) - $$(INSTALL_PROGRAM) -$$($1)/%: $$(srcdir)/$$($1) - $$(NORMAL_INSTALL) - $$(INSTALL_PROGRAM) -endef - -define _gnu.install_data -$$($1)/%: $$(outdir)/$$($1) - $$(NORMAL_INSTALL) - $$(INSTALL_DATA) -$$($1)/%: $$(srcdir)/$$($1) - $$(NORMAL_INSTALL) - $$(INSTALL_DATA) -endef - -gnu.dirs += $(gnu.program_dirs) $(gnu.data_dirs) -- cgit v1.2.3 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.once.head/11-gnustuff.mk | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'build-aux/Makefile.once.head') diff --git a/build-aux/Makefile.once.head/11-gnustuff.mk b/build-aux/Makefile.once.head/11-gnustuff.mk index d91832d..800f6d2 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 From 0bb5183e4e1ac300e8b7f38477a0e12d7d0d3df5 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 31 May 2016 12:51:31 -0400 Subject: (systemd) f --- build-aux/Makefile.once.head/00-gnuconf.mk | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'build-aux/Makefile.once.head') diff --git a/build-aux/Makefile.once.head/00-gnuconf.mk b/build-aux/Makefile.once.head/00-gnuconf.mk index 79ecc34..8e10f04 100644 --- a/build-aux/Makefile.once.head/00-gnuconf.mk +++ b/build-aux/Makefile.once.head/00-gnuconf.mk @@ -64,7 +64,7 @@ CCFLAGS ?= $(CFLAGS) FLEX ?= flex FLEXFLAGS ?= INSTALL ?= install -INSTALLFLAGS ?= +#INSTALLFLAGS ?= LD ?= ld LDFLAGS ?= LDCONFIG ?= ldconfig #TODO @@ -92,14 +92,14 @@ CHMOD ?= chmod CHOWN ?= chown MKNOD ?= mknod -# 7.2.3 Variables for Specifying Commands -# --------------------------------------- +# 7.2.3: Variables for Specifying Commands +# ---------------------------------------- INSTALL_PROGRAM ?= $(INSTALL) INSTALL_DATA ?= ${INSTALL} -m 644 -# 7.2.5 Variables for Installation Directories -# -------------------------------------------- +# 7.2.5: Variables for Installation Directories +# --------------------------------------------- # Root for the installation prefix ?= /usr/local @@ -147,3 +147,14 @@ man5ext ?= .5 man6ext ?= .6 man7ext ?= .7 man8ext ?= .8 + +# 7.2.7: Install Command Categories +# --------------------------------- + +PRE_INSTALL ?= +POST_INSTALL ?= +NORMAL_INSTALL ?= + +PRE_UNINSTALL ?= +POST_UNINSTALL ?= +NORMAL_UNINSTALL ?= -- cgit v1.2.3 From 786d22b74eaac27ae4c93d35e7b7718ad7d25af6 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 1 Jun 2016 13:02:33 -0400 Subject: (systemd) new autothing --- build-aux/Makefile.once.head/00-dist.mk | 4 ++-- build-aux/Makefile.once.head/00-gnuconf.mk | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'build-aux/Makefile.once.head') diff --git a/build-aux/Makefile.once.head/00-dist.mk b/build-aux/Makefile.once.head/00-dist.mk index d5bfcd3..4326cde 100644 --- a/build-aux/Makefile.once.head/00-dist.mk +++ b/build-aux/Makefile.once.head/00-dist.mk @@ -16,8 +16,8 @@ # Developer configuration dist.exts ?= .tar.gz -dist.pkgname ?= $(PACKAGE) -dist.version ?= $(VERSION) +dist.pkgname ?= $(firstword $(PACKAGE_TARNAME) $(PACKAGE) $(PACKAGE_NAME)) +dist.version ?= $(firstword $(PACKAGE_VERSION) $(VERSION)) ifeq ($(dist.pkgname),) $(error dist.pkgname must be set) diff --git a/build-aux/Makefile.once.head/00-gnuconf.mk b/build-aux/Makefile.once.head/00-gnuconf.mk index 8e10f04..83cb110 100644 --- a/build-aux/Makefile.once.head/00-gnuconf.mk +++ b/build-aux/Makefile.once.head/00-gnuconf.mk @@ -16,7 +16,7 @@ # This file is based on §7.2 "Makefile Conventions" of the release of # the GNU Coding Standards dated April 13, 2016. -gnuconf.pkgname ?= $(PACKAGE) +gnuconf.pkgname ?= $(firstword $(PACKAGE_TARNAME) $(PACKAGE) $(PACKAGE_NAME)) ifeq ($(gnuconf.pkgname),) $(error gnuconf.pkgname must be set) endif -- cgit v1.2.3 From 8b45c2af3c6f9654d133bfbb62969367a65d38ad Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 17 Jun 2016 16:02:51 -0400 Subject: fixup --- build-aux/Makefile.once.head/00-gnuconf.mk | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) (limited to 'build-aux/Makefile.once.head') diff --git a/build-aux/Makefile.once.head/00-gnuconf.mk b/build-aux/Makefile.once.head/00-gnuconf.mk index 79ecc34..83cb110 100644 --- a/build-aux/Makefile.once.head/00-gnuconf.mk +++ b/build-aux/Makefile.once.head/00-gnuconf.mk @@ -16,7 +16,7 @@ # This file is based on §7.2 "Makefile Conventions" of the release of # the GNU Coding Standards dated April 13, 2016. -gnuconf.pkgname ?= $(PACKAGE) +gnuconf.pkgname ?= $(firstword $(PACKAGE_TARNAME) $(PACKAGE) $(PACKAGE_NAME)) ifeq ($(gnuconf.pkgname),) $(error gnuconf.pkgname must be set) endif @@ -64,7 +64,7 @@ CCFLAGS ?= $(CFLAGS) FLEX ?= flex FLEXFLAGS ?= INSTALL ?= install -INSTALLFLAGS ?= +#INSTALLFLAGS ?= LD ?= ld LDFLAGS ?= LDCONFIG ?= ldconfig #TODO @@ -92,14 +92,14 @@ CHMOD ?= chmod CHOWN ?= chown MKNOD ?= mknod -# 7.2.3 Variables for Specifying Commands -# --------------------------------------- +# 7.2.3: Variables for Specifying Commands +# ---------------------------------------- INSTALL_PROGRAM ?= $(INSTALL) INSTALL_DATA ?= ${INSTALL} -m 644 -# 7.2.5 Variables for Installation Directories -# -------------------------------------------- +# 7.2.5: Variables for Installation Directories +# --------------------------------------------- # Root for the installation prefix ?= /usr/local @@ -147,3 +147,14 @@ man5ext ?= .5 man6ext ?= .6 man7ext ?= .7 man8ext ?= .8 + +# 7.2.7: Install Command Categories +# --------------------------------- + +PRE_INSTALL ?= +POST_INSTALL ?= +NORMAL_INSTALL ?= + +PRE_UNINSTALL ?= +POST_UNINSTALL ?= +NORMAL_UNINSTALL ?= -- cgit v1.2.3 From 8a5ecbb4fcaf0d9864074666a45d9263b73f31b8 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 7 Aug 2016 21:03:44 -0400 Subject: (systemd) stuff --- build-aux/Makefile.once.head/00-dist.mk | 44 ----- build-aux/Makefile.once.head/00-gnuconf.mk | 160 ------------------ build-aux/Makefile.once.head/00-write-ifchanged.mk | 1 - build-aux/Makefile.once.head/10-dist.mk | 42 +++++ build-aux/Makefile.once.head/10-files.mk | 37 ++++ build-aux/Makefile.once.head/10-gnuconf.mk | 188 +++++++++++++++++++++ build-aux/Makefile.once.head/10-lt.mk | 12 ++ build-aux/Makefile.once.head/10-nested.mk | 18 ++ build-aux/Makefile.once.head/10-std.mk | 39 ----- build-aux/Makefile.once.head/10-write-ifchanged.mk | 3 + build-aux/Makefile.once.head/zz-mod.mk | 24 +++ 11 files changed, 324 insertions(+), 244 deletions(-) delete mode 100644 build-aux/Makefile.once.head/00-dist.mk delete mode 100644 build-aux/Makefile.once.head/00-gnuconf.mk delete mode 100644 build-aux/Makefile.once.head/00-write-ifchanged.mk create mode 100644 build-aux/Makefile.once.head/10-dist.mk create mode 100644 build-aux/Makefile.once.head/10-files.mk create mode 100644 build-aux/Makefile.once.head/10-gnuconf.mk create mode 100644 build-aux/Makefile.once.head/10-lt.mk create mode 100644 build-aux/Makefile.once.head/10-nested.mk delete mode 100644 build-aux/Makefile.once.head/10-std.mk create mode 100644 build-aux/Makefile.once.head/10-write-ifchanged.mk create mode 100644 build-aux/Makefile.once.head/zz-mod.mk (limited to 'build-aux/Makefile.once.head') diff --git a/build-aux/Makefile.once.head/00-dist.mk b/build-aux/Makefile.once.head/00-dist.mk deleted file mode 100644 index 4326cde..0000000 --- a/build-aux/Makefile.once.head/00-dist.mk +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright (C) 2015-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 . - -# Developer configuration - -dist.exts ?= .tar.gz -dist.pkgname ?= $(firstword $(PACKAGE_TARNAME) $(PACKAGE) $(PACKAGE_NAME)) -dist.version ?= $(firstword $(PACKAGE_VERSION) $(VERSION)) - -ifeq ($(dist.pkgname),) -$(error dist.pkgname must be set) -endif -ifeq ($(dist.version),) -$(error dist.version must be set) -endif - -# User configuration - -CP ?= cp -GZIP ?= gzip -MKDIR ?= mkdir -MKDIR_P ?= mkdir -p -MV ?= mv -RM ?= rm -f -TAR ?= tar - -GZIPFLAGS ?= $(GZIP_ENV) -GZIP_ENV ?= --best - -# Implementation - -at.phony += dist diff --git a/build-aux/Makefile.once.head/00-gnuconf.mk b/build-aux/Makefile.once.head/00-gnuconf.mk deleted file mode 100644 index 83cb110..0000000 --- a/build-aux/Makefile.once.head/00-gnuconf.mk +++ /dev/null @@ -1,160 +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 . - -# This file is based on §7.2 "Makefile Conventions" of the release of -# the GNU Coding Standards dated April 13, 2016. - -gnuconf.pkgname ?= $(firstword $(PACKAGE_TARNAME) $(PACKAGE) $(PACKAGE_NAME)) -ifeq ($(gnuconf.pkgname),) -$(error gnuconf.pkgname must be set) -endif - -# 7.2.2: Utilities in Makefiles -# ----------------------------- - -# It's ok to hard-code these commands in rules, but who wants to -# memorize the list of what's ok? -AWK ?= awk -CAT ?= cat -CMP ?= cmp -CP ?= cp -DIFF ?= diff -ECHO ?= echo -EGREP ?= egrep -EXPR ?= expr -FALSE ?= false -GREP ?= grep -INSTALL_INFO ?= install-info -LN ?= ln -LS ?= ls -MKDIR ?= mkdir -MV ?= mv -PRINTF ?= printf -PWD ?= pwd -RM ?= rm -RMDIR ?= rmdir -SED ?= sed -SLEEP ?= sleep -SORT ?= sort -TAR ?= tar -TEST ?= test -TOUCH ?= touch -TR ?= tr -TRUE ?= true - -# These must be user-configurable -AR ?= ar -ARFLAGS ?= -BISON ?= bison -BISONFLAGS ?= -CC ?= cc -CCFLAGS ?= $(CFLAGS) -FLEX ?= flex -FLEXFLAGS ?= -INSTALL ?= install -#INSTALLFLAGS ?= -LD ?= ld -LDFLAGS ?= -LDCONFIG ?= ldconfig #TODO -LDCONFIGFLAGS ?= -LEX ?= lex -LEXFLAGS ?= $(LFLAGS) -#MAKE -MAKEINFO ?= makeinfo -MAKEINFOFLAGS ?= -RANLIB ?= ranlib #TODO -RANLIBFLAGS ?= -TEXI2DVI ?= texi2dvi -TEXI2DVIFLAGS ?= -YACC ?= yacc -YACCFLAGS ?= $(YFLAGS) - -CFLAGS ?= -LFLAGS ?= -YFLAGS ?= - -LN_S ?= ln -s #TODO - -CHGRP ?= chgrp -CHMOD ?= chmod -CHOWN ?= chown -MKNOD ?= mknod - -# 7.2.3: Variables for Specifying Commands -# ---------------------------------------- - -INSTALL_PROGRAM ?= $(INSTALL) -INSTALL_DATA ?= ${INSTALL} -m 644 - -# 7.2.5: Variables for Installation Directories -# --------------------------------------------- - -# Root for the installation -prefix ?= /usr/local -exec_prefix ?= $(prefix) -# Executable programs -bindir ?= $(exec_prefix)/bin -sbindir ?= $(exec_prefix)/sbin -libexecdir ?= $(exec_prefix)/libexec -# Data files -datarootdir ?= $(prefix)/share -datadir ?= $(datarootdir) -sysconfdir ?= $(prefix)/etc -sharedstatedir ?= $(prefix)/com -localstatedir ?= $(prefix)/var -runstatedir ?= $(localstatedir)/run -# Specific types of files -includedir ?= $(prefix)/include -oldincludedir ?= /usr/include -docdir ?= $(datarootdir)/doc/$(gnuconf.pkgname) -infodir ?= $(datarootdir)/info -htmldir ?= $(docdir) -dvidir ?= $(docdir) -pdfdir ?= $(docdir) -psdir ?= $(docdir) -libdir ?= $(exec_prefix)/lib -lispdir ?= $(datarootdir)/emacs/site-lisp -localedir ?= $(datarootdir)/locale - -mandir ?= $(datarootdir)/man -man1dir ?= $(mandir)/man1 -man2dir ?= $(mandir)/man2 -man3dir ?= $(mandir)/man3 -man4dir ?= $(mandir)/man4 -man5dir ?= $(mandir)/man5 -man6dir ?= $(mandir)/man6 -man7dir ?= $(mandir)/man7 -man8dir ?= $(mandir)/man8 - -manext ?= .1 -man1ext ?= .1 -man2ext ?= .2 -man3ext ?= .3 -man4ext ?= .4 -man5ext ?= .5 -man6ext ?= .6 -man7ext ?= .7 -man8ext ?= .8 - -# 7.2.7: Install Command Categories -# --------------------------------- - -PRE_INSTALL ?= -POST_INSTALL ?= -NORMAL_INSTALL ?= - -PRE_UNINSTALL ?= -POST_UNINSTALL ?= -NORMAL_UNINSTALL ?= diff --git a/build-aux/Makefile.once.head/00-write-ifchanged.mk b/build-aux/Makefile.once.head/00-write-ifchanged.mk deleted file mode 100644 index 79ef1c4..0000000 --- a/build-aux/Makefile.once.head/00-write-ifchanged.mk +++ /dev/null @@ -1 +0,0 @@ -WRITE_IFCHANGED = $(topsrcdir)/build-aux/write-ifchanged diff --git a/build-aux/Makefile.once.head/10-dist.mk b/build-aux/Makefile.once.head/10-dist.mk new file mode 100644 index 0000000..0e13ea2 --- /dev/null +++ b/build-aux/Makefile.once.head/10-dist.mk @@ -0,0 +1,42 @@ +# Copyright (C) 2015-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 . + +mod.dist.description = Make distribution tarballs + +# Developer configuration + +dist.exts ?= .tar.gz +dist.pkgname ?= $(firstword $(PACKAGE_TARNAME) $(PACKAGE) $(PACKAGE_NAME)) +dist.version ?= $(firstword $(PACKAGE_VERSION) $(VERSION)) + +ifeq ($(dist.pkgname),) +$(error Autothing module: dist: dist.pkgname must be set) +endif +ifeq ($(dist.version),) +$(error Autothing module: dist: dist.version must be set) +endif + +# User configuration + +CP ?= cp +GZIP ?= gzip +MKDIR ?= mkdir +MKDIR_P ?= mkdir -p +MV ?= mv +RM ?= rm -f +TAR ?= tar + +GZIPFLAGS ?= $(GZIP_ENV) +GZIP_ENV ?= --best diff --git a/build-aux/Makefile.once.head/10-files.mk b/build-aux/Makefile.once.head/10-files.mk new file mode 100644 index 0000000..56e06ac --- /dev/null +++ b/build-aux/Makefile.once.head/10-files.mk @@ -0,0 +1,37 @@ +# Copyright (C) 2015-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 . + +mod.files.description = Keeping track of groups of files +mod.files.depends += nested + +files.groups ?= all +files.default ?= all +files.vcsclean ?= files.vcsclean +files.generate ?= files.generate + +.DEFAULT_GOAL = $(files.default_group) + +# Standard creative PHONY targets +nested.targets += $(foreach g,$(files.groups), $g install-$g install-$gdirs) +# Standard destructive PHONY targets +nested.targets += uninstall mostlyclean clean distclean maintainer-clean + +# User configuration + +DESTDIR ?= + +RM ?= rm -f +RMDIR_P ?= rmdir -p --ignore-fail-on-non-empty +TRUE ?= true diff --git a/build-aux/Makefile.once.head/10-gnuconf.mk b/build-aux/Makefile.once.head/10-gnuconf.mk new file mode 100644 index 0000000..c07cfb5 --- /dev/null +++ b/build-aux/Makefile.once.head/10-gnuconf.mk @@ -0,0 +1,188 @@ +# 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 . + +# This file is based on §7.2 "Makefile Conventions" of the release of +# the GNU Coding Standards dated July 25, 2016. + +mod.gnuconf.description = GNU standard configuration variables + +gnuconf.pkgname ?= $(firstword $(PACKAGE_TARNAME) $(PACKAGE) $(PACKAGE_NAME)) +ifeq ($(gnuconf.pkgname),) +$(error Autothing module: gnuconf: gnuconf.pkgname must be set) +endif + +# 7.2.2: Utilities in Makefiles +# ----------------------------- + +# It's ok to hard-code these commands in rules, but who wants to +# memorize the list of what's ok? +AWK ?= awk +CAT ?= cat +CMP ?= cmp +CP ?= cp +DIFF ?= diff +ECHO ?= echo +EGREP ?= egrep +EXPR ?= expr +FALSE ?= false +GREP ?= grep +INSTALL_INFO ?= install-info +LN ?= ln +LS ?= ls +MKDIR ?= mkdir +MV ?= mv +PRINTF ?= printf +PWD ?= pwd +RM ?= rm +RMDIR ?= rmdir +SED ?= sed +SLEEP ?= sleep +SORT ?= sort +TAR ?= tar +TEST ?= test +TOUCH ?= touch +TR ?= tr +TRUE ?= true + +# 7.2.2: Utilities in Makefiles/7.2.3: Variables for Specifying Commands +# ---------------------------------------------------------------------- + +# Standard user-configurable programs. +# +# The list of programs here is specified in §7.2.2, but the associated FLAGS +# variables are specified in §7.2.3. I found it cleaner to list them together. +AR ?= ar +ARFLAGS ?= +BISON ?= bison +BISONFLAGS ?= +CC ?= cc +CFLAGS ?= # CFLAGS instead of CCFLAGS +FLEX ?= flex +FLEXFLAGS ?= +INSTALL ?= install +# There is no INSTALLFLAGS[0] +LD ?= ld +LDFLAGS ?= +LDCONFIG ?= ldconfig # TODO[1] +LDCONFIGFLAGS ?= +LEX ?= lex +LFLAGS ?= # LFLAGS instead of LEXFLAGS +#MAKE +MAKEINFO ?= makeinfo +MAKEINFOFLAGS ?= +RANLIB ?= ranlib # TODO[1] +RANLIBFLAGS ?= +TEXI2DVI ?= texi2dvi +TEXI2DVIFLAGS ?= +YACC ?= yacc +YFLAGS ?= # YFLAGS instead of YACCFLAGS + +LN_S ?= ln -s # TODO[2] + +CHGRP ?= chgrp +CHGRPFLAGS ?= +CHMOD ?= chmod +CHMODFLAGS ?= +CHOWN ?= chown +CHOWNFLAGS ?= +MKNOD ?= mknod +MKNODFLAGS ?= + +# [0]: There is no INSTALLFLAGS because it would be inconsistent with how the +# standards otherwise recommend using $(INSTALL); with INSTALL_PROGRAM and +# INSTALL_DATA; which are specified in a way precluding the use of +# INSTALLFLAGS. To have the variable, but to ignore it in the common case +# would be confusing. +# +# [1]: The RANLIB and LDCONFIG variables need some extra smarts; §7.2.2 says: +# +# > When you use ranlib or ldconfig, you should make sure nothing bad +# > happens if the system does not have the program in question. Arrange +# > to ignore an error from that command, and print a message before the +# > command to tell the user that failure of this command does not mean a +# > problem. (The Autoconf ‘AC_PROG_RANLIB’ macro can help with this.) +# +# [2]: The LN_S variable isn't standard, but we have it here as an (incomplete) +# stub to help support this bit of §7.2.2: +# +# > If you use symbolic links, you should implement a fallback for +# > systems that don’t have symbolic links. + +# 7.2.3: Variables for Specifying Commands +# ---------------------------------------- + +INSTALL_PROGRAM ?= $(INSTALL) +INSTALL_DATA ?= ${INSTALL} -m 644 + +# 7.2.5: Variables for Installation Directories +# --------------------------------------------- + +# Root for the installation +prefix ?= /usr/local +exec_prefix ?= $(prefix) +# Executable programs +bindir ?= $(exec_prefix)/bin +sbindir ?= $(exec_prefix)/sbin +libexecdir ?= $(exec_prefix)/libexec +# Data files +datarootdir ?= $(prefix)/share +datadir ?= $(datarootdir) +sysconfdir ?= $(prefix)/etc +sharedstatedir ?= $(prefix)/com +localstatedir ?= $(prefix)/var +runstatedir ?= $(localstatedir)/run +# Specific types of files +includedir ?= $(prefix)/include +oldincludedir ?= /usr/include +docdir ?= $(datarootdir)/doc/$(gnuconf.pkgname) +infodir ?= $(datarootdir)/info +htmldir ?= $(docdir) +dvidir ?= $(docdir) +pdfdir ?= $(docdir) +psdir ?= $(docdir) +libdir ?= $(exec_prefix)/lib +lispdir ?= $(datarootdir)/emacs/site-lisp +localedir ?= $(datarootdir)/locale + +mandir ?= $(datarootdir)/man +man1dir ?= $(mandir)/man1 +man2dir ?= $(mandir)/man2 +man3dir ?= $(mandir)/man3 +man4dir ?= $(mandir)/man4 +man5dir ?= $(mandir)/man5 +man6dir ?= $(mandir)/man6 +man7dir ?= $(mandir)/man7 +man8dir ?= $(mandir)/man8 + +manext ?= .1 +man1ext ?= .1 +man2ext ?= .2 +man3ext ?= .3 +man4ext ?= .4 +man5ext ?= .5 +man6ext ?= .6 +man7ext ?= .7 +man8ext ?= .8 + +# 7.2.7: Install Command Categories +# --------------------------------- + +PRE_INSTALL ?= +POST_INSTALL ?= +NORMAL_INSTALL ?= + +PRE_UNINSTALL ?= +POST_UNINSTALL ?= +NORMAL_UNINSTALL ?= diff --git a/build-aux/Makefile.once.head/10-lt.mk b/build-aux/Makefile.once.head/10-lt.mk new file mode 100644 index 0000000..c8410d4 --- /dev/null +++ b/build-aux/Makefile.once.head/10-lt.mk @@ -0,0 +1,12 @@ +mod.lt.description = Easy handling of libtool dependencies +mod.lt.deps += files + +_lt.dups = $(sort $(foreach l,$1,$(if $(filter-out 1,$(words $(filter $l,$1))),$l))) +_lt.patsubst-all = $(if $1,$(call _sd.patsubst-all,$(wordlist 2,$(words $1),$1),$2,$(patsubst $(firstword $1),$2,$3)),$3) +_lt.unLIBPATTERNS = $(foreach _lt.tmp,$1,$(if $(filter $(.LIBPATTERNS),$(_lt.tmp)),$(call _lt.patsubst-all,$(.LIBPATTERNS),-l%,$(_lt.tmp)),$(_lt.tmp))) + +# The semantics for the de-dup bit are a bit weird. My head hurts thinking +# about them. TODO: clarify/simplify/something +lt.rpath = $(dir $(patsubst $(DESTDIR)%,%,$(filter %/$(@F),$(files.sys)))) +_lt.link_files = $(filter %.o %.lo %.la -l%,$(call _lt.unLIBPATTERNS$,$^)) +lt.link_files = $(filter-out $(call _lt.dups,$(_lt.link_files)),$(_lt.link_files)) diff --git a/build-aux/Makefile.once.head/10-nested.mk b/build-aux/Makefile.once.head/10-nested.mk new file mode 100644 index 0000000..af9fdf7 --- /dev/null +++ b/build-aux/Makefile.once.head/10-nested.mk @@ -0,0 +1,18 @@ +# 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 . + +mod.nested.description = Easy nested .PHONY targets + +nested.targets ?= diff --git a/build-aux/Makefile.once.head/10-std.mk b/build-aux/Makefile.once.head/10-std.mk deleted file mode 100644 index 3e058ec..0000000 --- a/build-aux/Makefile.once.head/10-std.mk +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (C) 2015-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 . - -# Declare the default target -all: build -.PHONY: all noop - -# Standard creative PHONY targets -at.phony += build install installdirs -# Standard destructive PHONY targets -at.phony += uninstall mostlyclean clean distclean maintainer-clean - -at.dirlocal += std.src_files -at.dirlocal += std.gen_files -at.dirlocal += std.cfg_files -at.dirlocal += std.out_files -at.dirlocal += std.sys_files -at.dirlocal += std.clean_files -at.dirlocal += std.slow_files - -# User configuration - -DESTDIR ?= - -RM ?= rm -f -RMDIR_P ?= rmdir -p -TRUE ?= true diff --git a/build-aux/Makefile.once.head/10-write-ifchanged.mk b/build-aux/Makefile.once.head/10-write-ifchanged.mk new file mode 100644 index 0000000..7917201 --- /dev/null +++ b/build-aux/Makefile.once.head/10-write-ifchanged.mk @@ -0,0 +1,3 @@ +mod.write-ifchanged.description = build-aux/write-ifchanged helper script + +WRITE_IFCHANGED ?= $(topsrcdir)/build-aux/write-ifchanged diff --git a/build-aux/Makefile.once.head/zz-mod.mk b/build-aux/Makefile.once.head/zz-mod.mk new file mode 100644 index 0000000..3bf6398 --- /dev/null +++ b/build-aux/Makefile.once.head/zz-mod.mk @@ -0,0 +1,24 @@ +# 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 . + +mod.mod.description = Print information about Autothing modules + +_mod.target = at-mod-info +_mod.modules := $(sort $(patsubst %.mk,%,$(filter %.mk,$(subst -, ,$(notdir $(wildcard $(topsrcdir)/build-aux/Makefile.*/??-*.mk)))))) +_mod.quote = '$(subst ','\'',$1)' + +_mod.vars = $(filter $(addsuffix .%,$(_mod.modules)),$(.VARIABLES)) +_mod.once := $(_mod.vars) +_mod.each := -- cgit v1.2.3 From bf8f76973a833659ce4ac730c4918c382192d3e0 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 8 Aug 2016 01:09:59 -0400 Subject: (systemd) speed up --- build-aux/Makefile.once.head/zz-mod.mk | 2 ++ 1 file changed, 2 insertions(+) (limited to 'build-aux/Makefile.once.head') diff --git a/build-aux/Makefile.once.head/zz-mod.mk b/build-aux/Makefile.once.head/zz-mod.mk index 3bf6398..7e52606 100644 --- a/build-aux/Makefile.once.head/zz-mod.mk +++ b/build-aux/Makefile.once.head/zz-mod.mk @@ -19,6 +19,8 @@ _mod.target = at-mod-info _mod.modules := $(sort $(patsubst %.mk,%,$(filter %.mk,$(subst -, ,$(notdir $(wildcard $(topsrcdir)/build-aux/Makefile.*/??-*.mk)))))) _mod.quote = '$(subst ','\'',$1)' +$(eval $(foreach _mod.tmp,$(_mod.modules),mod.$(_mod.tmp).description ?=$(at.nl)mod.$(_mod.tmp).depends ?=$(at.nl))) + _mod.vars = $(filter $(addsuffix .%,$(_mod.modules)),$(.VARIABLES)) _mod.once := $(_mod.vars) _mod.each := -- cgit v1.2.3 From 2d47b10c0a19c9f986d2b1c4e5a06d8a49d36096 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 8 Aug 2016 13:20:56 -0400 Subject: (systemd) fix --- build-aux/Makefile.once.head/10-files.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'build-aux/Makefile.once.head') diff --git a/build-aux/Makefile.once.head/10-files.mk b/build-aux/Makefile.once.head/10-files.mk index 56e06ac..2af7bf8 100644 --- a/build-aux/Makefile.once.head/10-files.mk +++ b/build-aux/Makefile.once.head/10-files.mk @@ -21,7 +21,7 @@ files.default ?= all files.vcsclean ?= files.vcsclean files.generate ?= files.generate -.DEFAULT_GOAL = $(files.default_group) +.DEFAULT_GOAL = $(files.default) # Standard creative PHONY targets nested.targets += $(foreach g,$(files.groups), $g install-$g install-$gdirs) -- cgit v1.2.3 From 88d181c25d2f99f8b510afe2f2cc7e1ba1fa012c Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 10 Aug 2016 11:22:38 -0400 Subject: (systemd) fix build system --- build-aux/Makefile.once.head/10-dist.mk | 4 ++- build-aux/Makefile.once.head/10-files.mk | 5 +++- build-aux/Makefile.once.head/10-lt.mk | 12 -------- build-aux/Makefile.once.head/10-write-ifchanged.mk | 3 +- build-aux/Makefile.once.head/zz-mod.mk | 32 ++++++++++++++++------ 5 files changed, 33 insertions(+), 23 deletions(-) delete mode 100644 build-aux/Makefile.once.head/10-lt.mk (limited to 'build-aux/Makefile.once.head') diff --git a/build-aux/Makefile.once.head/10-dist.mk b/build-aux/Makefile.once.head/10-dist.mk index 0e13ea2..e139096 100644 --- a/build-aux/Makefile.once.head/10-dist.mk +++ b/build-aux/Makefile.once.head/10-dist.mk @@ -13,7 +13,7 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -mod.dist.description = Make distribution tarballs +mod.dist.description = `dist` target for distribution tarballs # Developer configuration @@ -28,6 +28,8 @@ ifeq ($(dist.version),) $(error Autothing module: dist: dist.version must be set) endif +_dist.files = + # User configuration CP ?= cp diff --git a/build-aux/Makefile.once.head/10-files.mk b/build-aux/Makefile.once.head/10-files.mk index 2af7bf8..5441735 100644 --- a/build-aux/Makefile.once.head/10-files.mk +++ b/build-aux/Makefile.once.head/10-files.mk @@ -24,7 +24,10 @@ files.generate ?= files.generate .DEFAULT_GOAL = $(files.default) # Standard creative PHONY targets -nested.targets += $(foreach g,$(files.groups), $g install-$g install-$gdirs) +nested.targets += $(files.generate) +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 diff --git a/build-aux/Makefile.once.head/10-lt.mk b/build-aux/Makefile.once.head/10-lt.mk deleted file mode 100644 index c8410d4..0000000 --- a/build-aux/Makefile.once.head/10-lt.mk +++ /dev/null @@ -1,12 +0,0 @@ -mod.lt.description = Easy handling of libtool dependencies -mod.lt.deps += files - -_lt.dups = $(sort $(foreach l,$1,$(if $(filter-out 1,$(words $(filter $l,$1))),$l))) -_lt.patsubst-all = $(if $1,$(call _sd.patsubst-all,$(wordlist 2,$(words $1),$1),$2,$(patsubst $(firstword $1),$2,$3)),$3) -_lt.unLIBPATTERNS = $(foreach _lt.tmp,$1,$(if $(filter $(.LIBPATTERNS),$(_lt.tmp)),$(call _lt.patsubst-all,$(.LIBPATTERNS),-l%,$(_lt.tmp)),$(_lt.tmp))) - -# The semantics for the de-dup bit are a bit weird. My head hurts thinking -# about them. TODO: clarify/simplify/something -lt.rpath = $(dir $(patsubst $(DESTDIR)%,%,$(filter %/$(@F),$(files.sys)))) -_lt.link_files = $(filter %.o %.lo %.la -l%,$(call _lt.unLIBPATTERNS$,$^)) -lt.link_files = $(filter-out $(call _lt.dups,$(_lt.link_files)),$(_lt.link_files)) diff --git a/build-aux/Makefile.once.head/10-write-ifchanged.mk b/build-aux/Makefile.once.head/10-write-ifchanged.mk index 7917201..b0a5ac4 100644 --- a/build-aux/Makefile.once.head/10-write-ifchanged.mk +++ b/build-aux/Makefile.once.head/10-write-ifchanged.mk @@ -1,3 +1,4 @@ -mod.write-ifchanged.description = build-aux/write-ifchanged helper script +mod.write-ifchanged.description = `write-ifchanged` auxiliary build script +mod.write-ifchanged.files += $(topsrcdir)/build-aux/write-ifchanged WRITE_IFCHANGED ?= $(topsrcdir)/build-aux/write-ifchanged diff --git a/build-aux/Makefile.once.head/zz-mod.mk b/build-aux/Makefile.once.head/zz-mod.mk index 7e52606..438f01e 100644 --- a/build-aux/Makefile.once.head/zz-mod.mk +++ b/build-aux/Makefile.once.head/zz-mod.mk @@ -13,14 +13,30 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -mod.mod.description = Print information about Autothing modules +mod.mod.description = Display information about Autothing modules -_mod.target = at-mod-info -_mod.modules := $(sort $(patsubst %.mk,%,$(filter %.mk,$(subst -, ,$(notdir $(wildcard $(topsrcdir)/build-aux/Makefile.*/??-*.mk)))))) -_mod.quote = '$(subst ','\'',$1)' +# The trickery that is _mod.empty/_mod.space is from §6.2 of the GNU Make +# manual, "The Two Flavors of Variables". +_mod.empty := +_mod.space := $(_mod.empty) # +undefine _mod.empty +# _mod.rest is equivalent to GMSL rest. +_mod.rest = $(wordlist 2,$(words $1),$1) -$(eval $(foreach _mod.tmp,$(_mod.modules),mod.$(_mod.tmp).description ?=$(at.nl)mod.$(_mod.tmp).depends ?=$(at.nl))) +_mod.file2mod = $(foreach _mod.tmp,$(patsubst %.mk,%,$(notdir $1)),$(subst $(_mod.space),-,$(call _mod.rest,$(subst -, ,$(_mod.tmp))))) -_mod.vars = $(filter $(addsuffix .%,$(_mod.modules)),$(.VARIABLES)) -_mod.once := $(_mod.vars) -_mod.each := +_mod.modules := $(sort $(call _mod.file2mod,$(wildcard $(topsrcdir)/build-aux/Makefile.*/??-*.mk))) +undefine _mod.rest +undefine _mod.file2mod + +$(eval $(foreach _mod.tmp,$(_mod.modules),\ + mod.$(_mod.tmp).description ?=$(at.nl)\ + mod.$(_mod.tmp).depends ?=$(at.nl)\ + mod.$(_mod.tmp).files ?=$(at.nl))) + +_mod.quote-pattern = $(subst %,\%,$(subst \,\\,$1)) +_mod.quote-shell-each = $(foreach _mod.tmp,$1,$(call _mod.quote-shell,$(_mod.tmp))) + +# I put this as the last line in the file because it confuses Emacs syntax +# highlighting and makes the remainder of the file difficult to edit. +_mod.quote-shell = $(subst $(at.nl),'$$'\n'','$(subst ','\'',$1)') -- cgit v1.2.3 From f97cfec567d54e883e1b868714b6beee5420ba2d Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 17 Aug 2016 01:33:02 -0400 Subject: (systemd) more --- build-aux/Makefile.once.head/00-quote.mk | 23 +++++++++++++++++++++++ build-aux/Makefile.once.head/zz-mod.mk | 8 +------- 2 files changed, 24 insertions(+), 7 deletions(-) create mode 100644 build-aux/Makefile.once.head/00-quote.mk (limited to 'build-aux/Makefile.once.head') diff --git a/build-aux/Makefile.once.head/00-quote.mk b/build-aux/Makefile.once.head/00-quote.mk new file mode 100644 index 0000000..23be614 --- /dev/null +++ b/build-aux/Makefile.once.head/00-quote.mk @@ -0,0 +1,23 @@ +# 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 . + +mod.quote.description = Macros to quote tricky strings + +quote.pattern = $(subst %,\%,$(subst \,\\,$1)) +quote.shell-each = $(foreach _quote.tmp,$1,$(call quote.shell,$(_mod.tmp))) + +# I put this as the last line in the file because it confuses Emacs syntax +# highlighting and makes the remainder of the file difficult to edit. +quote.shell = $(subst $(at.nl),'$$'\n'','$(subst ','\'',$1)') diff --git a/build-aux/Makefile.once.head/zz-mod.mk b/build-aux/Makefile.once.head/zz-mod.mk index 438f01e..732f1e1 100644 --- a/build-aux/Makefile.once.head/zz-mod.mk +++ b/build-aux/Makefile.once.head/zz-mod.mk @@ -14,6 +14,7 @@ # along with this program. If not, see . mod.mod.description = Display information about Autothing modules +mod.mod.depends += quote # The trickery that is _mod.empty/_mod.space is from §6.2 of the GNU Make # manual, "The Two Flavors of Variables". @@ -33,10 +34,3 @@ $(eval $(foreach _mod.tmp,$(_mod.modules),\ mod.$(_mod.tmp).description ?=$(at.nl)\ mod.$(_mod.tmp).depends ?=$(at.nl)\ mod.$(_mod.tmp).files ?=$(at.nl))) - -_mod.quote-pattern = $(subst %,\%,$(subst \,\\,$1)) -_mod.quote-shell-each = $(foreach _mod.tmp,$1,$(call _mod.quote-shell,$(_mod.tmp))) - -# I put this as the last line in the file because it confuses Emacs syntax -# highlighting and makes the remainder of the file difficult to edit. -_mod.quote-shell = $(subst $(at.nl),'$$'\n'','$(subst ','\'',$1)') -- cgit v1.2.3 From 2728d489673f1d97a43e4f8d888b3591c233cfb7 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 6 Sep 2016 14:42:55 -0400 Subject: (systemd) build-aux: gitfiles --- build-aux/Makefile.once.head/00-gitfiles.mk | 32 +++++++++++++++++++++++++++++ build-aux/Makefile.once.head/00-quote.mk | 8 +++++++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 build-aux/Makefile.once.head/00-gitfiles.mk (limited to 'build-aux/Makefile.once.head') diff --git a/build-aux/Makefile.once.head/00-gitfiles.mk b/build-aux/Makefile.once.head/00-gitfiles.mk new file mode 100644 index 0000000..95437aa --- /dev/null +++ b/build-aux/Makefile.once.head/00-gitfiles.mk @@ -0,0 +1,32 @@ +# 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 . + +mod.gitfiles.description = Automatically populate files.src.src from git +mod.gitfiles.depends += files nested write-ifchanged quote + +gitfiles.file ?= Makefile-src.mk + +_gitfiles.all = +-include $(topsrcdir)/$(gitfiles.file) + +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) $@ +.PHONY: _gitfiles.FORCE +endif + +_gitfiles.dir = $(call at.relto,$(topsrcdir),$(srcdir)) +_gitfiles.dir.all = $(patsubst $(_gitfiles.dir)/%,%,$(filter $(_gitfiles.dir)/%,$(_gitfiles.all))) +_gitfiles.dir.src = $(filter-out $(addsuffix /%,$(nested.subdirs)),$(_gitfiles.dir.all)) diff --git a/build-aux/Makefile.once.head/00-quote.mk b/build-aux/Makefile.once.head/00-quote.mk index 23be614..17f6307 100644 --- a/build-aux/Makefile.once.head/00-quote.mk +++ b/build-aux/Makefile.once.head/00-quote.mk @@ -15,7 +15,13 @@ mod.quote.description = Macros to quote tricky strings -quote.pattern = $(subst %,\%,$(subst \,\\,$1)) +_quote.backslash = $(if $1,$(call _quote.backslash,$(wordlist 2,$(words $1),$1),$(subst $(firstword $1),\$(firstword $1),$2)),$2) + +quote.var = $(subst $(at.nl),\$(at.nl),$(subst $$,$$$$,$1)) +quote.pattern = $(call _quote.backslash, \ % ,$1) +quote.ere = $(call _quote.backslash, \ ^ . [ $$ ( ) | * + ? { ,$1) +quote.bre = $(call _quote.backslash, \ ^ . [ $$ * ,$1) + quote.shell-each = $(foreach _quote.tmp,$1,$(call quote.shell,$(_mod.tmp))) # I put this as the last line in the file because it confuses Emacs syntax -- cgit v1.2.3 From 8cf92796b94f8a7d1e4b27fbf86b3c790194cb6f Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 6 Sep 2016 16:06:45 -0400 Subject: (systemd) build-aux: quote.shell-each: fix --- build-aux/Makefile.once.head/00-quote.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'build-aux/Makefile.once.head') diff --git a/build-aux/Makefile.once.head/00-quote.mk b/build-aux/Makefile.once.head/00-quote.mk index 17f6307..9fce401 100644 --- a/build-aux/Makefile.once.head/00-quote.mk +++ b/build-aux/Makefile.once.head/00-quote.mk @@ -22,7 +22,7 @@ quote.pattern = $(call _quote.backslash, \ % ,$1) quote.ere = $(call _quote.backslash, \ ^ . [ $$ ( ) | * + ? { ,$1) quote.bre = $(call _quote.backslash, \ ^ . [ $$ * ,$1) -quote.shell-each = $(foreach _quote.tmp,$1,$(call quote.shell,$(_mod.tmp))) +quote.shell-each = $(foreach _quote.tmp,$1,$(call quote.shell,$(_quote.tmp))) # I put this as the last line in the file because it confuses Emacs syntax # highlighting and makes the remainder of the file difficult to edit. -- cgit v1.2.3 From 8191cd39e9884464d526f48e8b85cf5b434d5dd5 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 6 Sep 2016 23:14:55 -0400 Subject: (systemd) gitfiles: mv Makefile-src.mk gitfiles.mk --- build-aux/Makefile.once.head/00-gitfiles.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'build-aux/Makefile.once.head') diff --git a/build-aux/Makefile.once.head/00-gitfiles.mk b/build-aux/Makefile.once.head/00-gitfiles.mk index 95437aa..b17b63a 100644 --- a/build-aux/Makefile.once.head/00-gitfiles.mk +++ b/build-aux/Makefile.once.head/00-gitfiles.mk @@ -16,7 +16,7 @@ mod.gitfiles.description = Automatically populate files.src.src from git mod.gitfiles.depends += files nested write-ifchanged quote -gitfiles.file ?= Makefile-src.mk +gitfiles.file ?= gitfiles.mk _gitfiles.all = -include $(topsrcdir)/$(gitfiles.file) -- cgit v1.2.3 From 7af3811df0e4d8707d8218361dd305f42df62be2 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 7 Sep 2016 01:20:54 -0400 Subject: (systemd) build-aux: add var and write-atomic modules --- build-aux/Makefile.once.head/00-var.mk | 18 ++++++++++++++++++ build-aux/Makefile.once.head/10-write-atomic.mk | 4 ++++ 2 files changed, 22 insertions(+) create mode 100644 build-aux/Makefile.once.head/00-var.mk create mode 100644 build-aux/Makefile.once.head/10-write-atomic.mk (limited to 'build-aux/Makefile.once.head') diff --git a/build-aux/Makefile.once.head/00-var.mk b/build-aux/Makefile.once.head/00-var.mk new file mode 100644 index 0000000..d1e537e --- /dev/null +++ b/build-aux/Makefile.once.head/00-var.mk @@ -0,0 +1,18 @@ +# 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 . + +mod.var.description = Depend on the values of variables + +.PHONY: _var.FORCE diff --git a/build-aux/Makefile.once.head/10-write-atomic.mk b/build-aux/Makefile.once.head/10-write-atomic.mk new file mode 100644 index 0000000..f099ae2 --- /dev/null +++ b/build-aux/Makefile.once.head/10-write-atomic.mk @@ -0,0 +1,4 @@ +mod.write-atomic.description = `write-atomic` auxiliary build script +mod.write-atomic.files += $(topsrcdir)/build-aux/write-atomic + +WRITE_ATOMIC ?= $(topsrcdir)/build-aux/write-atomic -- cgit v1.2.3 From 95d18493a5d3399993053b94cb1fc4542699f884 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 28 Oct 2016 12:45:33 -0400 Subject: (systemd) Autothing documentation --- build-aux/Makefile.once.head/00-gitfiles.mk | 41 ++++++++++++++++++++++ build-aux/Makefile.once.head/00-quote.mk | 23 ++++++++++-- build-aux/Makefile.once.head/00-var.mk | 14 ++++++++ build-aux/Makefile.once.head/10-dist.mk | 34 ++++++++++++++++++ build-aux/Makefile.once.head/10-files.mk | 39 ++++++++++++++++++++ build-aux/Makefile.once.head/10-gnuconf.mk | 17 +++++++-- build-aux/Makefile.once.head/10-nested.mk | 26 ++++++++++++++ build-aux/Makefile.once.head/10-write-atomic.mk | 18 ++++++++++ build-aux/Makefile.once.head/10-write-ifchanged.mk | 18 ++++++++++ build-aux/Makefile.once.head/zz-mod.mk | 22 ++++++++++++ 10 files changed, 247 insertions(+), 5 deletions(-) (limited to 'build-aux/Makefile.once.head') diff --git a/build-aux/Makefile.once.head/00-gitfiles.mk b/build-aux/Makefile.once.head/00-gitfiles.mk index b17b63a..faae91d 100644 --- a/build-aux/Makefile.once.head/00-gitfiles.mk +++ b/build-aux/Makefile.once.head/00-gitfiles.mk @@ -15,6 +15,47 @@ 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 gitfiles.file ?= gitfiles.mk diff --git a/build-aux/Makefile.once.head/00-quote.mk b/build-aux/Makefile.once.head/00-quote.mk index 9fce401..4c954b1 100644 --- a/build-aux/Makefile.once.head/00-quote.mk +++ b/build-aux/Makefile.once.head/00-quote.mk @@ -14,6 +14,24 @@ # along with this program. If not, see . mod.quote.description = Macros to quote tricky strings +define mod.quote.doc +# Inputs: +# (none) +# Outputs: +# - Global variable: `quote.var` : GNU Make variables +# - Global variable: `quote.pattern` : GNU Make patterns +# - Global variable: `quote.ere` : POSIX Extended Regular Expressions +# - Global variable: `quote.bre` : POSIX Basic Regular Expressions +# - Global variable: `quote.shell` : POSIX sh(1) strings +# - Global variable: `quote.shell-each`: POSIX sh(1) strings +# +# Escaping/quoting things is hard! This module provides a number of +# functions to escape/quote strings for various contexts. +# +# `quote.shell-each` quotes each list-item separately (munging +# whitespace), while `quote.shell` keeps them as one string (preserving +# whitespace). +endef _quote.backslash = $(if $1,$(call _quote.backslash,$(wordlist 2,$(words $1),$1),$(subst $(firstword $1),\$(firstword $1),$2)),$2) @@ -24,6 +42,7 @@ quote.bre = $(call _quote.backslash, \ ^ . [ $$ * ,$1) quote.shell-each = $(foreach _quote.tmp,$1,$(call quote.shell,$(_quote.tmp))) -# I put this as the last line in the file because it confuses Emacs syntax -# highlighting and makes the remainder of the file difficult to edit. +# I put this as the last line in the file because it confuses Emacs +# syntax highlighting and makes the remainder of the file difficult to +# edit. quote.shell = $(subst $(at.nl),'$$'\n'','$(subst ','\'',$1)') diff --git a/build-aux/Makefile.once.head/00-var.mk b/build-aux/Makefile.once.head/00-var.mk index d1e537e..636bbb0 100644 --- a/build-aux/Makefile.once.head/00-var.mk +++ b/build-aux/Makefile.once.head/00-var.mk @@ -14,5 +14,19 @@ # along with this program. If not, see . mod.var.description = Depend on the values of variables +define mod.var.doc +# Inputs: +# (user-defined) +# Outputs: +# Target : `$(outdir)/.var.%` +# Directory variable: `at.targets` +# +# 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`. +endef .PHONY: _var.FORCE diff --git a/build-aux/Makefile.once.head/10-dist.mk b/build-aux/Makefile.once.head/10-dist.mk index e139096..8c68d04 100644 --- a/build-aux/Makefile.once.head/10-dist.mk +++ b/build-aux/Makefile.once.head/10-dist.mk @@ -14,6 +14,40 @@ # along with this program. If not, see . mod.dist.description = `dist` target for distribution tarballs +define mod.dist.doc +# User variables: +# - `CP ?= cp` +# - `GZIP ?= gzip` +# - `MKDIR ?= mkdir` +# - `MKDIR_P ?= mkdir -p` +# - `MV ?= mv` +# - `RM ?= rm -f` +# - `TAR ?= tar` +# - `GZIPFLAGS ?= $(GZIP_ENV)` +# - `GZIP_ENV ?= --best` (only used via `GZIPFLAGS`, not directly) +# Inputs: +# - Global variable : `dist.exts` (Default: `.tar.gz`) +# - Global variable : `dist.pkgname` (Default: first of PACKAGE_TARNAME PACKAGE PACKAGE_NAME) +# - Global variable : `dist.version` (Default: first of PACKAGE_VERSION VERSION) +# - Directory variable : `files.src` +# Outputs: +# - Directory variable : `files.out.int` (only in top dir) +# - .PHONY Target : `$(outdir)/dist` +# - Target : `$(topoutdir)/$(dist.pkgname)-$(dist.version)` +# - Target : `$(topoutdir)/$(dist.pkgname)-$(dist.version).tar` +# - Target : `$(topoutdir)/$(dist.pkgname)-$(dist.version).tar.gz` +# +# Provide the standard `dist` .PHONY target, based on the `files` module +# information. +# +# You may change the default compression target easily via the +# `dist.exts` variable, but you must define the rule for it manually. +# +# Bugs: +# +# The tarball isn't reproducible. It uses file-system ordering of +# files, and includes timestamps. +endef # Developer configuration diff --git a/build-aux/Makefile.once.head/10-files.mk b/build-aux/Makefile.once.head/10-files.mk index 5441735..9d27ae9 100644 --- a/build-aux/Makefile.once.head/10-files.mk +++ b/build-aux/Makefile.once.head/10-files.mk @@ -15,6 +15,45 @@ mod.files.description = Keeping track of groups of files mod.files.depends += nested +define mod.files.doc +# User variables: +# - `DESTDIR ?=` +# - `RM ?= rm -f` +# - `RMDIR_P ?= rmdir -p --ignore-fail-on-non-empty` +# - `TRUE ?= true` +# Inputs: +# - Global variable : `files.groups ?= all` +# - 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...)) +# Outputs: +# - Global variable : `nested.targets` +# - Global variable : `at.targets` +# - Global variable : `.DEFAULT_GOAL = $(files.default)` +# - Creative .PHONY targets: +# - `$(outdir)/$(files.generate))` +# - `$(addprefix $(outdir)/,$(files.groups))` +# - `$(outdir)/installdirs` +# - `$(outdir)/install` +# - Destructive .PHONY targets: +# - `$(outdir)/uninstall` +# - `$(outdir)/mostlyclean` +# - `$(outdir)/clean` +# - `$(outdir)/distclean` +# - `$(outdir)/maintainer-clean` +# - `$(outdir)/$(files.vcsclean)` +# +# TODO: prose documentation +endef files.groups ?= all files.default ?= all diff --git a/build-aux/Makefile.once.head/10-gnuconf.mk b/build-aux/Makefile.once.head/10-gnuconf.mk index c07cfb5..6d641bb 100644 --- a/build-aux/Makefile.once.head/10-gnuconf.mk +++ b/build-aux/Makefile.once.head/10-gnuconf.mk @@ -13,10 +13,21 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -# This file is based on §7.2 "Makefile Conventions" of the release of -# the GNU Coding Standards dated July 25, 2016. - mod.gnuconf.description = GNU standard configuration variables +define mod.gnuconf.doc +# Inputs: +# - Global variable: `gnuconf.pkgname` +# (Default: `$(firstword $(PACKAGE_TARNAME) $(PACKAGE) $(PACKAGE_NAME))`) +# Outputs: +# (see below) +# +# This module defines default values (using `?=`) a huge list of +# variables specified in the GNU Coding Standards that installing-users +# expect to be able to set. +# +# This is based on §7.2 "Makefile Conventions" of the July 25, 2016 +# release of the GNU Coding Standards. +endef gnuconf.pkgname ?= $(firstword $(PACKAGE_TARNAME) $(PACKAGE) $(PACKAGE_NAME)) ifeq ($(gnuconf.pkgname),) diff --git a/build-aux/Makefile.once.head/10-nested.mk b/build-aux/Makefile.once.head/10-nested.mk index af9fdf7..72e15ab 100644 --- a/build-aux/Makefile.once.head/10-nested.mk +++ b/build-aux/Makefile.once.head/10-nested.mk @@ -14,5 +14,31 @@ # along with this program. If not, see . mod.nested.description = Easy nested .PHONY targets +define mod.nested.doc +# Inputs: +# - Global variable : `nested.targets` +# - Directory variable : `nested.subdirs` +# Outputs: +# - .PHONY Targets : `$(addprefix $(outdir)/,$(nested.targets))` +# - Variable : `at.subdirs` +# +# The Autothing `at.subdirs` slates a subdirectory's Makefile for inclusion, +# but doesn't help with recursive targets like `all`, `install`, or `clean`, +# which one would expect to descend into subdirectories. Enter `nested`: +# Define a global list of targets that are recursive/nested, and then in each +# directory define a list of subdirectries that one would expect them to +# recurse into. +# +# Directories added to `nested.subdirs` are automatically added to `at.subdirs` +# during the each.tail phase. +# +# It may help to think of at.subdirs and nested.subdirs in terms of their +# Automake conterparts: +# +# | Autothing | GNU Automake | +# +----------------+--------------+ +# | at.subdirs | DIST_SUBDIRS | +# | nested.subdirs | SUBDIRS | +endef nested.targets ?= diff --git a/build-aux/Makefile.once.head/10-write-atomic.mk b/build-aux/Makefile.once.head/10-write-atomic.mk index f099ae2..ce6acd8 100644 --- a/build-aux/Makefile.once.head/10-write-atomic.mk +++ b/build-aux/Makefile.once.head/10-write-atomic.mk @@ -1,4 +1,22 @@ mod.write-atomic.description = `write-atomic` auxiliary build script mod.write-atomic.files += $(topsrcdir)/build-aux/write-atomic +define mod.write-atomic.doc +# User variables: +# - `WRITE_ATOMIC ?= $(topsrcdir)/build-aux/write-atomic` +# Inputs: +# (none) +# Outputs: +# (none) +# +# The $(WRITE_ATOMIC) program reads a file from stdin, and writes it to +# the file named in argv[1], but does so atomically. +# +# That is, the following lines are almost equivalient: +# +# ... > $@ +# ... | $(WRITE_ATOMIC) $@ +# +# The are only different in that one is atomic, while the other is not. +endef WRITE_ATOMIC ?= $(topsrcdir)/build-aux/write-atomic diff --git a/build-aux/Makefile.once.head/10-write-ifchanged.mk b/build-aux/Makefile.once.head/10-write-ifchanged.mk index b0a5ac4..5abb3ce 100644 --- a/build-aux/Makefile.once.head/10-write-ifchanged.mk +++ b/build-aux/Makefile.once.head/10-write-ifchanged.mk @@ -1,4 +1,22 @@ mod.write-ifchanged.description = `write-ifchanged` auxiliary build script mod.write-ifchanged.files += $(topsrcdir)/build-aux/write-ifchanged +define mod.write-ifchanged.doc +# User variables: +# - `WRITE_IFCHANGED ?= $(topsrcdir)/build-aux/write-ifchanged` +# Inputs: +# (none) +# Outputs: +# (none) +# +# The $(WRITE_IFCHANGED) program reads a file from stdin, and writes it to the +# file named in argv[1], but does so atomically, but more importantly, does so +# in a way that does not bump the file's ctime if the new content is the same +# as the old content. +# +# That is, the following lines are almost equivalient: +# +# ... > $@ +# ... | $(WRITE_ATOMIC) $@ +endef WRITE_IFCHANGED ?= $(topsrcdir)/build-aux/write-ifchanged diff --git a/build-aux/Makefile.once.head/zz-mod.mk b/build-aux/Makefile.once.head/zz-mod.mk index 732f1e1..1b12a2f 100644 --- a/build-aux/Makefile.once.head/zz-mod.mk +++ b/build-aux/Makefile.once.head/zz-mod.mk @@ -15,6 +15,28 @@ mod.mod.description = Display information about Autothing modules mod.mod.depends += quote +define mod.mod.doc +# Inputs: +# - Files : `$(topsrcdir)/build-aux/Makefile.*/??-*.mk` +# - Global variable : `mod.*.name` +# - Global variable : `mod.*.description` +# - Global variable : `mod.*.depends` +# - Global variable : `mod.*.files` +# - Global variable : `mod.*.doc` +# Outputs: +# - Directory variable : `at.targets` +# - .PHONY Target : `$(outdir)/at-variables-local` +# - .PHONY Target : `$(outdir)/at-variables-global` +# - .PHONY Target : `$(outdir)/at-variables` +# - .PHONY Target : `$(outdir)/at-variables/%` +# - .PHONY Target : `$(outdir)/at-values` +# - .PHONY Target : `$(outdir)/at-values/%` +# - .PHONY Target : `$(outdir)/at-modules` +# - .PHONY Target : `$(outdir)/at-modules/%` +# - .PHONY Target : `$(outdir)/at-noop` +# +# TODO: prose documentation +endef # The trickery that is _mod.empty/_mod.space is from §6.2 of the GNU Make # manual, "The Two Flavors of Variables". -- cgit v1.2.3 From 9384e763b00774603208b3d44977ed0e6762a09a Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 30 Oct 2016 19:27:23 -0400 Subject: (systemd) at: mod: don't call on .doc --- build-aux/Makefile.once.head/00-gitfiles.mk | 1 + build-aux/Makefile.once.head/00-quote.mk | 1 + build-aux/Makefile.once.head/00-var.mk | 1 + build-aux/Makefile.once.head/10-dist.mk | 1 + build-aux/Makefile.once.head/10-files.mk | 1 + build-aux/Makefile.once.head/10-gnuconf.mk | 1 + build-aux/Makefile.once.head/10-nested.mk | 1 + build-aux/Makefile.once.head/10-write-atomic.mk | 1 + build-aux/Makefile.once.head/10-write-ifchanged.mk | 1 + build-aux/Makefile.once.head/zz-mod.mk | 5 +++-- 10 files changed, 12 insertions(+), 2 deletions(-) (limited to 'build-aux/Makefile.once.head') diff --git a/build-aux/Makefile.once.head/00-gitfiles.mk b/build-aux/Makefile.once.head/00-gitfiles.mk index faae91d..1214e50 100644 --- a/build-aux/Makefile.once.head/00-gitfiles.mk +++ b/build-aux/Makefile.once.head/00-gitfiles.mk @@ -56,6 +56,7 @@ define mod.gitfiles.doc # 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 diff --git a/build-aux/Makefile.once.head/00-quote.mk b/build-aux/Makefile.once.head/00-quote.mk index 4c954b1..94bc943 100644 --- a/build-aux/Makefile.once.head/00-quote.mk +++ b/build-aux/Makefile.once.head/00-quote.mk @@ -32,6 +32,7 @@ define mod.quote.doc # whitespace), while `quote.shell` keeps them as one string (preserving # whitespace). endef +mod.quote.doc := $(value mod.quote.doc) _quote.backslash = $(if $1,$(call _quote.backslash,$(wordlist 2,$(words $1),$1),$(subst $(firstword $1),\$(firstword $1),$2)),$2) diff --git a/build-aux/Makefile.once.head/00-var.mk b/build-aux/Makefile.once.head/00-var.mk index 636bbb0..1f50f21 100644 --- a/build-aux/Makefile.once.head/00-var.mk +++ b/build-aux/Makefile.once.head/00-var.mk @@ -28,5 +28,6 @@ define mod.var.doc # With this module, to depend on the value of a variable, depend on # `$(outdir)/.var.VARNAME`. endef +mod.var.doc := $(value mod.var.doc) .PHONY: _var.FORCE diff --git a/build-aux/Makefile.once.head/10-dist.mk b/build-aux/Makefile.once.head/10-dist.mk index 8c68d04..831ca12 100644 --- a/build-aux/Makefile.once.head/10-dist.mk +++ b/build-aux/Makefile.once.head/10-dist.mk @@ -48,6 +48,7 @@ define mod.dist.doc # The tarball isn't reproducible. It uses file-system ordering of # files, and includes timestamps. endef +mod.dist.doc := $(value mod.dist.doc) # Developer configuration diff --git a/build-aux/Makefile.once.head/10-files.mk b/build-aux/Makefile.once.head/10-files.mk index 9d27ae9..e697a88 100644 --- a/build-aux/Makefile.once.head/10-files.mk +++ b/build-aux/Makefile.once.head/10-files.mk @@ -54,6 +54,7 @@ define mod.files.doc # # TODO: prose documentation endef +mod.files.doc := $(value mod.files.doc) files.groups ?= all files.default ?= all diff --git a/build-aux/Makefile.once.head/10-gnuconf.mk b/build-aux/Makefile.once.head/10-gnuconf.mk index 6d641bb..a4b7696 100644 --- a/build-aux/Makefile.once.head/10-gnuconf.mk +++ b/build-aux/Makefile.once.head/10-gnuconf.mk @@ -28,6 +28,7 @@ define mod.gnuconf.doc # This is based on §7.2 "Makefile Conventions" of the July 25, 2016 # release of the GNU Coding Standards. endef +mod.gnuconf.doc := $(value mod.gnuconf.doc) gnuconf.pkgname ?= $(firstword $(PACKAGE_TARNAME) $(PACKAGE) $(PACKAGE_NAME)) ifeq ($(gnuconf.pkgname),) diff --git a/build-aux/Makefile.once.head/10-nested.mk b/build-aux/Makefile.once.head/10-nested.mk index 72e15ab..4f181a9 100644 --- a/build-aux/Makefile.once.head/10-nested.mk +++ b/build-aux/Makefile.once.head/10-nested.mk @@ -40,5 +40,6 @@ define mod.nested.doc # | at.subdirs | DIST_SUBDIRS | # | nested.subdirs | SUBDIRS | endef +mod.nested.doc := $(value mod.nested.doc) nested.targets ?= diff --git a/build-aux/Makefile.once.head/10-write-atomic.mk b/build-aux/Makefile.once.head/10-write-atomic.mk index ce6acd8..c4aa808 100644 --- a/build-aux/Makefile.once.head/10-write-atomic.mk +++ b/build-aux/Makefile.once.head/10-write-atomic.mk @@ -18,5 +18,6 @@ define mod.write-atomic.doc # # The are only different in that one is atomic, while the other is not. endef +mod.write-atomic.doc := $(value mod.write-atomic.doc) WRITE_ATOMIC ?= $(topsrcdir)/build-aux/write-atomic diff --git a/build-aux/Makefile.once.head/10-write-ifchanged.mk b/build-aux/Makefile.once.head/10-write-ifchanged.mk index 5abb3ce..649aab9 100644 --- a/build-aux/Makefile.once.head/10-write-ifchanged.mk +++ b/build-aux/Makefile.once.head/10-write-ifchanged.mk @@ -18,5 +18,6 @@ define mod.write-ifchanged.doc # ... > $@ # ... | $(WRITE_ATOMIC) $@ endef +mod.write-ifchanged.doc := $(value mod.write-ifchanged.doc) WRITE_IFCHANGED ?= $(topsrcdir)/build-aux/write-ifchanged diff --git a/build-aux/Makefile.once.head/zz-mod.mk b/build-aux/Makefile.once.head/zz-mod.mk index 1b12a2f..95d251d 100644 --- a/build-aux/Makefile.once.head/zz-mod.mk +++ b/build-aux/Makefile.once.head/zz-mod.mk @@ -18,7 +18,6 @@ mod.mod.depends += quote define mod.mod.doc # Inputs: # - Files : `$(topsrcdir)/build-aux/Makefile.*/??-*.mk` -# - Global variable : `mod.*.name` # - Global variable : `mod.*.description` # - Global variable : `mod.*.depends` # - Global variable : `mod.*.files` @@ -37,6 +36,7 @@ define mod.mod.doc # # TODO: prose documentation endef +mod.mod.doc := $(value mod.mod.doc) # The trickery that is _mod.empty/_mod.space is from §6.2 of the GNU Make # manual, "The Two Flavors of Variables". @@ -55,4 +55,5 @@ undefine _mod.file2mod $(eval $(foreach _mod.tmp,$(_mod.modules),\ mod.$(_mod.tmp).description ?=$(at.nl)\ mod.$(_mod.tmp).depends ?=$(at.nl)\ - mod.$(_mod.tmp).files ?=$(at.nl))) + mod.$(_mod.tmp).files ?=$(at.nl)\ + mod.$(_mod.tmp).doc ?=$(at.nl))) -- cgit v1.2.3 From a5986ad30296a9138c7943298759526f71a510de Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 30 Oct 2016 19:28:47 -0400 Subject: (systemd) at: files: add missing things to documentaton --- build-aux/Makefile.once.head/10-files.mk | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'build-aux/Makefile.once.head') diff --git a/build-aux/Makefile.once.head/10-files.mk b/build-aux/Makefile.once.head/10-files.mk index e697a88..f6fcf30 100644 --- a/build-aux/Makefile.once.head/10-files.mk +++ b/build-aux/Makefile.once.head/10-files.mk @@ -36,14 +36,18 @@ define mod.files.doc # - Directory variable : `files.out.$(files.groups)` (well, $(addprefix...)) # - Directory variable : `files.sys.$(files.groups)` (well, $(addprefix...)) # Outputs: -# - Global variable : `nested.targets` -# - Global variable : `at.targets` -# - Global variable : `.DEFAULT_GOAL = $(files.default)` +# - Global variable : `nested.targets` +# - Global variable : `at.targets` +# - Global variable : `.DEFAULT_GOAL = $(files.default)` +# - Directory variable : `files.src` +# - Directory variable : `files.out` +# - Directory variable : `files.sys` # - Creative .PHONY targets: # - `$(outdir)/$(files.generate))` -# - `$(addprefix $(outdir)/,$(files.groups))` -# - `$(outdir)/installdirs` +# - `$(outdir)/$(group)` for `group` in `$(files.groups)` # - `$(outdir)/install` +# - `$(outdir)/install-$(group)` for `group` in `$(filter-out $(files.default),$(files.groups))` +# - `$(outdir)/installdirs` # - Destructive .PHONY targets: # - `$(outdir)/uninstall` # - `$(outdir)/mostlyclean` @@ -52,6 +56,9 @@ define mod.files.doc # - `$(outdir)/maintainer-clean` # - `$(outdir)/$(files.vcsclean)` # +# Basic `*` wildcards are supported. Use `*`, not `%`; it will automatically +# substitute `*`->`%` where appropriate. +# # TODO: prose documentation endef mod.files.doc := $(value mod.files.doc) -- cgit v1.2.3 From 33ab91cdc94926977f921c3a741df80d66ba6de9 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 14 Jan 2017 23:40:09 -0500 Subject: gnuconf: Was missing CPPFLAGS --- build-aux/Makefile.once.head/10-gnuconf.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'build-aux/Makefile.once.head') diff --git a/build-aux/Makefile.once.head/10-gnuconf.mk b/build-aux/Makefile.once.head/10-gnuconf.mk index a4b7696..e24dfa1 100644 --- a/build-aux/Makefile.once.head/10-gnuconf.mk +++ b/build-aux/Makefile.once.head/10-gnuconf.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 @@ -101,6 +101,8 @@ TEXI2DVIFLAGS ?= YACC ?= yacc YFLAGS ?= # YFLAGS instead of YACCFLAGS +CPPFLAGS ?= + LN_S ?= ln -s # TODO[2] CHGRP ?= chgrp -- cgit v1.2.3 From 6819ff36a37ceb091cb793875e6f4529c0bccc1a Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 15 Jan 2017 01:34:04 -0500 Subject: mod: gitfiles: doc: re-flow a paragraph --- build-aux/Makefile.once.head/00-gitfiles.mk | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'build-aux/Makefile.once.head') diff --git a/build-aux/Makefile.once.head/00-gitfiles.mk b/build-aux/Makefile.once.head/00-gitfiles.mk index 1214e50..dbb4ae9 100644 --- a/build-aux/Makefile.once.head/00-gitfiles.mk +++ b/build-aux/Makefile.once.head/00-gitfiles.mk @@ -51,10 +51,10 @@ define mod.gitfiles.doc # 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`. +# 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) -- cgit v1.2.3 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.once.head/10-gnudoc.mk | 53 +++++++++++++++++++++++++++ build-aux/Makefile.once.head/10-gnustuff.mk | 56 +++++++++++++++++++++++++++++ build-aux/Makefile.once.head/11-gnustuff.mk | 34 ------------------ 3 files changed, 109 insertions(+), 34 deletions(-) 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.once.head') 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 0000000..a53c89f --- /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 0000000..759e48a --- /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 800f6d2..0000000 --- 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 -- cgit v1.2.3 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.once.head/10-gnudoc.mk | 53 ------------------------------ build-aux/Makefile.once.head/10-texinfo.mk | 51 ++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 53 deletions(-) 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.once.head') 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 a53c89f..0000000 --- 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 0000000..aac2c28 --- /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 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.once.head/10-gnustuff.mk | 56 ----------------------------- 1 file changed, 56 deletions(-) delete mode 100644 build-aux/Makefile.once.head/10-gnustuff.mk (limited to 'build-aux/Makefile.once.head') 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 759e48a..0000000 --- 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 -- cgit v1.2.3 From 2d33bd2f34f011c4f025a073b50d536f6a66a4db Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 16 Jan 2017 19:27:20 -0500 Subject: Improve documentation. --- build-aux/Makefile.once.head/10-dist.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'build-aux/Makefile.once.head') diff --git a/build-aux/Makefile.once.head/10-dist.mk b/build-aux/Makefile.once.head/10-dist.mk index 831ca12..27b39ec 100644 --- a/build-aux/Makefile.once.head/10-dist.mk +++ b/build-aux/Makefile.once.head/10-dist.mk @@ -13,7 +13,7 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -mod.dist.description = `dist` target for distribution tarballs +mod.dist.description = `dist` target to create distribution tarballs define mod.dist.doc # User variables: # - `CP ?= cp` -- cgit v1.2.3 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.once.head/00-gitfiles.mk | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'build-aux/Makefile.once.head') diff --git a/build-aux/Makefile.once.head/00-gitfiles.mk b/build-aux/Makefile.once.head/00-gitfiles.mk index dbb4ae9..8566a7f 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)) -- cgit v1.2.3