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/zz-mod.mk | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 build-aux/Makefile.once.head/zz-mod.mk (limited to 'build-aux/Makefile.once.head/zz-mod.mk') 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/zz-mod.mk') 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 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/zz-mod.mk | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) (limited to 'build-aux/Makefile.once.head/zz-mod.mk') 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/zz-mod.mk | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'build-aux/Makefile.once.head/zz-mod.mk') 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 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/zz-mod.mk | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'build-aux/Makefile.once.head/zz-mod.mk') 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/zz-mod.mk | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'build-aux/Makefile.once.head/zz-mod.mk') 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