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/10-files.mk | 37 ++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 build-aux/Makefile.once.head/10-files.mk (limited to 'build-aux/Makefile.once.head/10-files.mk') 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 -- 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/10-files.mk') 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-files.mk | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'build-aux/Makefile.once.head/10-files.mk') 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 -- 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/10-files.mk | 39 ++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'build-aux/Makefile.once.head/10-files.mk') 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 -- 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/10-files.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'build-aux/Makefile.once.head/10-files.mk') 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 -- 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/10-files.mk') 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 16e8d3b92b5e35a5eaee40a7b7fc0279c342886a Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 30 Jan 2017 01:33:24 -0500 Subject: (libretools) Fix bugs in autothing. Some of these are that I hadn't originally designed autothing v3 to work with --warn-undefined-variables. Others are just straight-up bugs from inadequate testing. --- build-aux/Makefile.once.head/10-files.mk | 37 +++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 12 deletions(-) (limited to 'build-aux/Makefile.once.head/10-files.mk') diff --git a/build-aux/Makefile.once.head/10-files.mk b/build-aux/Makefile.once.head/10-files.mk index f6fcf30..564f9d6 100644 --- a/build-aux/Makefile.once.head/10-files.mk +++ b/build-aux/Makefile.once.head/10-files.mk @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2016 Luke Shumaker +# Copyright (C) 2015-2017 Luke Shumaker # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by @@ -26,15 +26,15 @@ define mod.files.doc # - Global variable : `files.default ?= all` # - Global variable : `files.vcsclean ?= files.vcsclean` # - Global variable : `files.generate ?= files.generate` -# - Directory variable : `files.src.src` -# - Directory variable : `files.src.int` -# - Directory variable : `files.src.cfg` -# - Directory variable : `files.src.gen` -# - Directory variable : `files.out.slow` -# - Directory variable : `files.out.int` -# - Directory variable : `files.out.cfg` -# - Directory variable : `files.out.$(files.groups)` (well, $(addprefix...)) -# - Directory variable : `files.sys.$(files.groups)` (well, $(addprefix...)) +# - Directory variable : `files.src.src` # Sources +# - Directory variable : `files.src.int` # Intermediates; deletable +# - Directory variable : `files.src.cfg` # Outputs needed to run ./configure +# - Directory variable : `files.src.gen` # Other outputs +# - Directory variable : `files.out.slow` # Things to exclude from `make mostlyclean` +# - Directory variable : `files.out.int` # Intermediates +# - Directory variable : `files.out.cfg` # Outputs created by ./configure +# - Directory variable : `files.out.$(group)` for `group` in `$(files.groups)` +# - Directory variable : `files.sys.$(group)` for `group` in `$(files.groups)` # Outputs: # - Global variable : `nested.targets` # - Global variable : `at.targets` @@ -43,7 +43,7 @@ define mod.files.doc # - Directory variable : `files.out` # - Directory variable : `files.sys` # - Creative .PHONY targets: -# - `$(outdir)/$(files.generate))` +# - `$(outdir)/$(files.generate)` # - `$(outdir)/$(group)` for `group` in `$(files.groups)` # - `$(outdir)/install` # - `$(outdir)/install-$(group)` for `group` in `$(filter-out $(files.default),$(files.groups))` @@ -59,6 +59,10 @@ define mod.files.doc # Basic `*` wildcards are supported. Use `*`, not `%`; it will automatically # substitute `*`->`%` where appropriate. # +# Each of the destructive targets depends on `$(target)-hook`, which +# is defined to be a "double-colon rule" allowing you to add your own +# code. +# # TODO: prose documentation endef mod.files.doc := $(value mod.files.doc) @@ -76,7 +80,7 @@ nested.targets += install installdirs nested.targets += $(foreach g,$(files.groups),$g) nested.targets += $(foreach g,$(filter-out $(files.default),$(files.groups)),install-$g install-$gdirs) # Standard destructive PHONY targets -nested.targets += uninstall mostlyclean clean distclean maintainer-clean +nested.targets += uninstall mostlyclean clean distclean maintainer-clean $(files.vcsclean) # User configuration @@ -85,3 +89,12 @@ DESTDIR ?= RM ?= rm -f RMDIR_P ?= rmdir -p --ignore-fail-on-non-empty TRUE ?= true + +# Utility functions + +_files.XARGS = $(if $(strip $2),$1 $(strip $2)) + +_files.maintainer-clean-warning: + @echo 'This command is intended for maintainers to use; it' + @echo 'deletes files that may need special tools to rebuild.' +.PHONY: _files.maintainer-clean-warning -- cgit v1.2.3 From eaf336a9265399520e3cf71d4979446b98bdf48d Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 3 Feb 2017 02:47:24 -0500 Subject: mod: files: handling of directories for the clean rule --- build-aux/Makefile.once.head/10-files.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'build-aux/Makefile.once.head/10-files.mk') diff --git a/build-aux/Makefile.once.head/10-files.mk b/build-aux/Makefile.once.head/10-files.mk index 564f9d6..55c41cb 100644 --- a/build-aux/Makefile.once.head/10-files.mk +++ b/build-aux/Makefile.once.head/10-files.mk @@ -92,7 +92,7 @@ TRUE ?= true # Utility functions -_files.XARGS = $(if $(strip $2),$1 $(strip $2)) +_files.XARGS = $(if $(strip $2),$(subst {},$(strip $2),$1)) _files.maintainer-clean-warning: @echo 'This command is intended for maintainers to use; it' -- cgit v1.2.3