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.each.tail/10-files.mk | 55 ++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 build-aux/Makefile.each.tail/10-files.mk (limited to 'build-aux/Makefile.each.tail/10-files.mk') diff --git a/build-aux/Makefile.each.tail/10-files.mk b/build-aux/Makefile.each.tail/10-files.mk new file mode 100644 index 0000000..4607c43 --- /dev/null +++ b/build-aux/Makefile.each.tail/10-files.mk @@ -0,0 +1,55 @@ +# 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 . +# Add some more defaults to the *_files variables + +$(foreach _files.var,$(patsubst files.%,%,files.src $(filter files.src.%,$(.VARIABLES))),\ + $(eval _files.$(_files.var) = $$(call at.addprefix,$$(srcdir),$$(files.$(_files.var))))) +$(foreach _files.var,$(patsubst files.%,%,files.out $(filter files.out.%,$(.VARIABLES))),\ + $(eval _files.$(_files.var) = $$(call at.addprefix,$$(outdir),$$(files.$(_files.var))))) +$(foreach _files.var,$(patsubst files.%,%,files.sys $(filter files.sys.%,$(.VARIABLES))),\ + $(eval _files.$(_files.var) = $$(addprefix $$(DESTDIR),$$(files.$(_files.var))))) + +_files.all = $(_files.src) $(_files.out) $(_files.sys) + +at.targets += $(subst *,%,$(_files.all)) + +# Creative targets +$(outdir)/$(files.generate): $(_files.src.gen) $(_files.src.cfg) +$(outdir)/install: $(_files.sys.$(files.default)) +$(outdir)/installdirs: $(sort $(dir $(_files.sys))) +$(foreach _files.g,$(files.groups),\ + $(eval $$(outdir)/$(_files.g): $$(_files.out.$(_files.g)))) +$(foreach _files.g,$(filter-out $(files.default),$(files.groups)),\ + $(eval $$(outdir)/install-$(_files.g): $$(_files.sys.$(_files.g)))) + +# Destructive targets +_files.uninstall = $(_files.sys) +_files.mostlyclean = $(filter-out $(_files.out.slow) $(_files.out.cfg),$(_files.out)) +_files.clean = $(filter-out $(_files.out.cfg),$(_files.out)) +_files.distclean = $(_files.out) +$(addprefix $(outdir)/,uninstall mostlyclean clean distclean): %: %-hook + $(RM) -- $(sort $(filter-out %/,$(_files.$(@F)))) + $(RM) -r -- $(sort $(filter %/,$(_files.$(@F)))) + $(RMDIR_P) -- $(sort $(dir $(_files.$(@F)))) +_files.maintainer-clean = $(filter-out $(_files.src.cfg) $(_files.src.src),$(_files.src)) +_files.$(files.vcsclean) = $(filter-out $(_files.src.src),$(_files.src)) +$(addprefix $(outdir)/,maintainer-clean $(files.vcsclean)): $(outdir)/%: $(outdir)/distclean $(outdir)/%-hook + @echo 'This command is intended for maintainers to use; it' + @echo 'deletes files that may need special tools to rebuild.' + $(RM) -- $(sort $(filter-out %/,$(_files.$(@F)))) + $(RM) -r -- $(sort $(filter %/,$(_files.$(@F)))) + $(RMDIR_P) -- $(sort $(dir $(_files.$(@F)))) +$(foreach t,uninstall mostlyclean clean distclean maintainer-clean $(files.vcsclean), $(outdir)/$t-hook):: +.PHONY: $(foreach t,uninstall mostlyclean clean distclean maintainer-clean $(files.vcsclean), $(outdir)/$t-hook) -- 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.each.tail/10-files.mk | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'build-aux/Makefile.each.tail/10-files.mk') diff --git a/build-aux/Makefile.each.tail/10-files.mk b/build-aux/Makefile.each.tail/10-files.mk index 4607c43..8ab187b 100644 --- a/build-aux/Makefile.each.tail/10-files.mk +++ b/build-aux/Makefile.each.tail/10-files.mk @@ -14,12 +14,13 @@ # along with this program. If not, see . # Add some more defaults to the *_files variables -$(foreach _files.var,$(patsubst files.%,%,files.src $(filter files.src.%,$(.VARIABLES))),\ - $(eval _files.$(_files.var) = $$(call at.addprefix,$$(srcdir),$$(files.$(_files.var))))) -$(foreach _files.var,$(patsubst files.%,%,files.out $(filter files.out.%,$(.VARIABLES))),\ - $(eval _files.$(_files.var) = $$(call at.addprefix,$$(outdir),$$(files.$(_files.var))))) -$(foreach _files.var,$(patsubst files.%,%,files.sys $(filter files.sys.%,$(.VARIABLES))),\ - $(eval _files.$(_files.var) = $$(addprefix $$(DESTDIR),$$(files.$(_files.var))))) +$(eval \ + $(foreach _files.var,$(filter files.src files.src.%,$(.VARIABLES)),\ + _$(_files.var) = $$(call at.addprefix,$$(srcdir),$$($(_files.var)))$(at.nl))\ + $(foreach _files.var,$(filter files.out files.out.%,$(.VARIABLES)),\ + _$(_files.var) = $$(call at.addprefix,$$(outdir),$$($(_files.var)))$(at.nl))\ + $(foreach _files.var,$(filter files.sys files.sys.%,$(.VARIABLES)),\ + _$(_files.var) = $$(addprefix $$(DESTDIR),$$($(_files.var)))$(at.nl))) _files.all = $(_files.src) $(_files.out) $(_files.sys) @@ -29,10 +30,11 @@ at.targets += $(subst *,%,$(_files.all)) $(outdir)/$(files.generate): $(_files.src.gen) $(_files.src.cfg) $(outdir)/install: $(_files.sys.$(files.default)) $(outdir)/installdirs: $(sort $(dir $(_files.sys))) -$(foreach _files.g,$(files.groups),\ - $(eval $$(outdir)/$(_files.g): $$(_files.out.$(_files.g)))) -$(foreach _files.g,$(filter-out $(files.default),$(files.groups)),\ - $(eval $$(outdir)/install-$(_files.g): $$(_files.sys.$(_files.g)))) +$(eval \ + $(foreach _files.g,$(files.groups),\ + $$(outdir)/$(_files.g): $$(_files.out.$(_files.g))$(at.nl))\ + $(foreach _files.g,$(filter-out $(files.default),$(files.groups)),\ + $$(outdir)/install-$(_files.g): $$(_files.sys.$(_files.g)))$(at.nl)) # Destructive targets _files.uninstall = $(_files.sys) -- cgit v1.2.3 From 5eb6e559d6665f4210be95fe46f1d0a6007dd734 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 15 Jan 2017 01:44:18 -0500 Subject: mod: files: fix a misplaced paren --- build-aux/Makefile.each.tail/10-files.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'build-aux/Makefile.each.tail/10-files.mk') diff --git a/build-aux/Makefile.each.tail/10-files.mk b/build-aux/Makefile.each.tail/10-files.mk index 8ab187b..3bb3bc2 100644 --- a/build-aux/Makefile.each.tail/10-files.mk +++ b/build-aux/Makefile.each.tail/10-files.mk @@ -34,7 +34,7 @@ $(eval \ $(foreach _files.g,$(files.groups),\ $$(outdir)/$(_files.g): $$(_files.out.$(_files.g))$(at.nl))\ $(foreach _files.g,$(filter-out $(files.default),$(files.groups)),\ - $$(outdir)/install-$(_files.g): $$(_files.sys.$(_files.g)))$(at.nl)) + $$(outdir)/install-$(_files.g): $$(_files.sys.$(_files.g))$(at.nl))) # Destructive targets _files.uninstall = $(_files.sys) -- cgit v1.2.3