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 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