From c17baf9504ea4780d7a0adc38a4d443ecc6e09f8 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 31 Oct 2016 11:11:17 -0400 Subject: at: sd: clean up, document --- build-aux/Makefile.each.tail/50-sd.mk | 18 ----- build-aux/Makefile.each.tail/70-sdman.mk | 39 +++++------ build-aux/Makefile.once.head/00-amcfg.mk | 58 ---------------- build-aux/Makefile.once.head/20-amcfg.mk | 73 +++++++++++++++++++ build-aux/Makefile.once.head/20-sd.mk | 116 +++++++++++++++++++++---------- build-aux/Makefile.once.head/20-sdman.mk | 93 +++++++++++++++++++++++++ 6 files changed, 263 insertions(+), 134 deletions(-) delete mode 100644 build-aux/Makefile.once.head/00-amcfg.mk create mode 100644 build-aux/Makefile.once.head/20-amcfg.mk create mode 100644 build-aux/Makefile.once.head/20-sdman.mk (limited to 'build-aux') diff --git a/build-aux/Makefile.each.tail/50-sd.mk b/build-aux/Makefile.each.tail/50-sd.mk index 9de3a86e90..35b9168570 100644 --- a/build-aux/Makefile.each.tail/50-sd.mk +++ b/build-aux/Makefile.each.tail/50-sd.mk @@ -90,21 +90,3 @@ $(outdir)/%: $(srcdir)/%.m4 $(top_builddir)/config.status $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@ $(outdir)/%: $(outdir)/%.m4 $(top_builddir)/config.status $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@ - -$(outdir)/%.1: $(srcdir)/%.xml $(topsrcdir)/man/custom-man.xsl $(topoutdir)/man/custom-entities.ent - $(sd.XSLTPROC_PROCESS_MAN) - -$(outdir)/%.3: $(srcdir)/%.xml $(topsrcdir)/man/custom-man.xsl $(topoutdir)/man/custom-entities.ent - $(sd.XSLTPROC_PROCESS_MAN) - -$(outdir)/%.5: $(srcdir)/%.xml $(topsrcdir)/man/custom-man.xsl $(topoutdir)/man/custom-entities.ent - $(sd.XSLTPROC_PROCESS_MAN) - -$(outdir)/%.7: $(srcdir)/%.xml $(topsrcdir)/man/custom-man.xsl $(topoutdir)/man/custom-entities.ent - $(sd.XSLTPROC_PROCESS_MAN) - -$(outdir)/%.8: $(srcdir)/%.xml $(topsrcdir)/man/custom-man.xsl $(topoutdir)/man/custom-entities.ent - $(sd.XSLTPROC_PROCESS_MAN) - -$(outdir)/%.html: $(srcdir)/%.xml $(topsrcdir)/man/custom-html.xsl $(topoutdir)/man/custom-entities.ent - $(sd.XSLTPROC_PROCESS_HTML) diff --git a/build-aux/Makefile.each.tail/70-sdman.mk b/build-aux/Makefile.each.tail/70-sdman.mk index 0e4b35b6ce..ccbb1bd4e1 100644 --- a/build-aux/Makefile.each.tail/70-sdman.mk +++ b/build-aux/Makefile.each.tail/70-sdman.mk @@ -21,27 +21,6 @@ # You should have received a copy of the GNU Lesser General Public License # along with systemd; If not, see . -mod.sdman.description = (systemd) manpages -mod.sdman.depends += am files write-atomic -define mod.sdman.doc -# Inputs: -# - Global variable : `ENABLE_MANPAGES` -# - Directory variable : `files.src.src` -# Inputs (from `$(srcdir)/Makefile-man.mk`): -# - Directory variable : `sdman.MANPAGES` -# - Directory variable : `sdman.MANPAGES_ALIAS` -# Outputs: -# - File : `$(srcdir)/Makefile-man.mk` -# - Directory variable : `at.subdirs` -# - Directory variable : `files.src.gen` -# - Directory variable : `man_MANS` -# - Directory variable : `noinst_DATA` -# -# The `sdman.*` variables are the interface by which Makefile-man.mk may -# communicate up. They should not be used outside of the `sdman` module. -endef -mod.sdman.doc := $(value mod.sdman.doc) - _sdman.man_xml = $(foreach _sdman.tmp,$(filter %.xml,$(files.src.src)),$(if $(findstring /,$(_sdman.tmp)),,$(_sdman.tmp))) ifneq ($(_sdman.man_xml),) @@ -73,4 +52,22 @@ endif # ENABLE_MANPAGES at.subdirs += $(abspath $(topoutdir)/man) +$(outdir)/%.1: $(srcdir)/%.xml $(topsrcdir)/man/custom-man.xsl $(topoutdir)/man/custom-entities.ent + $(_sdman.XSLTPROC_PROCESS_MAN) + +$(outdir)/%.3: $(srcdir)/%.xml $(topsrcdir)/man/custom-man.xsl $(topoutdir)/man/custom-entities.ent + $(_sdman.XSLTPROC_PROCESS_MAN) + +$(outdir)/%.5: $(srcdir)/%.xml $(topsrcdir)/man/custom-man.xsl $(topoutdir)/man/custom-entities.ent + $(_sdman.XSLTPROC_PROCESS_MAN) + +$(outdir)/%.7: $(srcdir)/%.xml $(topsrcdir)/man/custom-man.xsl $(topoutdir)/man/custom-entities.ent + $(_sdman.XSLTPROC_PROCESS_MAN) + +$(outdir)/%.8: $(srcdir)/%.xml $(topsrcdir)/man/custom-man.xsl $(topoutdir)/man/custom-entities.ent + $(_sdman.XSLTPROC_PROCESS_MAN) + +$(outdir)/%.html: $(srcdir)/%.xml $(topsrcdir)/man/custom-html.xsl $(topoutdir)/man/custom-entities.ent + $(_sdman.XSLTPROC_PROCESS_HTML) + endif # _sdman.man_xml diff --git a/build-aux/Makefile.once.head/00-amcfg.mk b/build-aux/Makefile.once.head/00-amcfg.mk deleted file mode 100644 index e2610b4be5..0000000000 --- a/build-aux/Makefile.once.head/00-amcfg.mk +++ /dev/null @@ -1,58 +0,0 @@ -mod.amcfg.description = (systemd) Automake-to-Autothing configuration -mod.amcfg.depends += am -define mod.amcfg.doc -# User varaibles: -# - `V` -# - `AM_V_*` -endef -mod.amcfg.doc := $(value mod.amcfg.doc) - -am.sys2out_DATA = \ - $(notdir \ - $(patsubst $(pamconfdir)/%,%.pam,\ - $(patsubst $(tmpfilesdir)/%.conf,%.tmpfiles,\ - $(patsubst $(sysusersdir)/%.conf,%.sysusers,\ - $(patsubst $(sysctldir)/%.conf,%.sysctl,\ - $(patsubst $(bashcompletiondir)/%,%.completion.bash,\ - $(patsubst $(zshcompletiondir)/_%,%.completion.zsh,\ - $1))))))) -am.sys2out_HEADERS = $(abspath $(addprefix $(srcdir)/include/,$(notdir $1))) - -V ?= - -AM_V_PROG ?= $(AM_V_PROG_$(V)) -AM_V_PROG_ ?= $(AM_V_PROG_$(AM_DEFAULT_VERBOSITY)) -AM_V_PROG_0 ?= @echo " PROG " $@; -AM_V_PROG_1 ?= - -AM_V_SCRIPT ?= $(AM_V_SCRIPT_$(V)) -AM_V_SCRIPT_ ?= $(AM_V_SCRIPT_$(AM_DEFAULT_VERBOSITY)) -AM_V_SCRIPT_0 ?= @echo " SCRIPT " $@; -AM_V_SCRIPT_1 ?= - -AM_V_LIB ?= $(AM_V_LIB_$(V)) -AM_V_LIB_ ?= $(AM_V_LIB_$(AM_DEFAULT_VERBOSITY)) -AM_V_LIB_0 ?= @echo " LIB " $@; -AM_V_LIB_1 ?= - -AM_V_DATA ?= $(AM_V_DATA_$(V)) -AM_V_DATA_ ?= $(AM_V_DATA_$(AM_DEFAULT_VERBOSITY)) -AM_V_DATA_0 ?= @echo " DATA " $@; -AM_V_DATA_1 ?= - -AM_V_HEADER ?= $(AM_V_HEADER_$(V)) -AM_V_HEADER_ ?= $(AM_V_HEADER_$(AM_DEFAULT_VERBOSITY)) -AM_V_HEADER_0 ?= @echo " HEADER " $@; -AM_V_HEADER_1 ?= - -AM_V_MAN ?= $(AM_V_MAN_$(V)) -AM_V_MAN_ ?= $(AM_V_MAN_$(AM_DEFAULT_VERBOSITY)) -AM_V_MAN_0 ?= @echo " MAN " $@; -AM_V_MAN_1 ?= - -am.INSTALL_PROGRAMS = $(AM_V_PROG)$(LIBTOOL) $(AM_V_lt) --tag=CC $(sd.ALL_LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $< $@ -am.INSTALL_SCRIPTS = $(AM_V_SCRIPT)$(INSTALL_SCRIPT) $< $@ -am.INSTALL_LTLIBRARIES = $(AM_V_LIB)$(LIBTOOL) $(AM_V_lt) --tag=CC $(sd.ALL_LIBTOOLFLAGS) --mode=install $(INSTALL) $< $@ -am.INSTALL_DATA = $(AM_V_DATA)$(INSTALL_DATA) $< $@ -am.INSTALL_HEADERS = $(AM_V_HEADER)$(INSTALL_DATA) $< $@ -am.INSTALL_MANS = $(AM_V_MAN)$(INSTALL_DATA) $< $@ diff --git a/build-aux/Makefile.once.head/20-amcfg.mk b/build-aux/Makefile.once.head/20-amcfg.mk new file mode 100644 index 0000000000..0a16c148a2 --- /dev/null +++ b/build-aux/Makefile.once.head/20-amcfg.mk @@ -0,0 +1,73 @@ +mod.amcfg.description = (systemd) Automake-to-Autothing configuration +mod.amcfg.depends += am +define mod.amcfg.doc +# User variables: +# - `V` +# - `AM_V_*` +# - `pamconfdir` +# - `tmpfilesdir` +# - `sysusersdir` +# - `sysctldir` +# - `bashcompletiondir` +# - `zshcompletiondir` +# - `LIBTOOL` +# - `INSTALL_PROGRAM` +# - `INSTALL_SCRIPT` +# - `INSTALL_DATA` +# Inputs: +# - Global variable: `sd.ALL_LIBTOOLFLAGS` +# Outputs: +# - Global variable: `am.sys2out_*` +# - Global variable: `am.INSTALL_*` +endef +mod.amcfg.doc := $(value mod.amcfg.doc) + +am.sys2out_DATA = \ + $(notdir \ + $(patsubst $(pamconfdir)/%,%.pam,\ + $(patsubst $(tmpfilesdir)/%.conf,%.tmpfiles,\ + $(patsubst $(sysusersdir)/%.conf,%.sysusers,\ + $(patsubst $(sysctldir)/%.conf,%.sysctl,\ + $(patsubst $(bashcompletiondir)/%,%.completion.bash,\ + $(patsubst $(zshcompletiondir)/_%,%.completion.zsh,\ + $1))))))) +am.sys2out_HEADERS = $(abspath $(addprefix $(srcdir)/include/,$(notdir $1))) + +V ?= + +AM_V_PROG ?= $(AM_V_PROG_$(V)) +AM_V_PROG_ ?= $(AM_V_PROG_$(AM_DEFAULT_VERBOSITY)) +AM_V_PROG_0 ?= @echo " PROG " $@; +AM_V_PROG_1 ?= + +AM_V_SCRIPT ?= $(AM_V_SCRIPT_$(V)) +AM_V_SCRIPT_ ?= $(AM_V_SCRIPT_$(AM_DEFAULT_VERBOSITY)) +AM_V_SCRIPT_0 ?= @echo " SCRIPT " $@; +AM_V_SCRIPT_1 ?= + +AM_V_LIB ?= $(AM_V_LIB_$(V)) +AM_V_LIB_ ?= $(AM_V_LIB_$(AM_DEFAULT_VERBOSITY)) +AM_V_LIB_0 ?= @echo " LIB " $@; +AM_V_LIB_1 ?= + +AM_V_DATA ?= $(AM_V_DATA_$(V)) +AM_V_DATA_ ?= $(AM_V_DATA_$(AM_DEFAULT_VERBOSITY)) +AM_V_DATA_0 ?= @echo " DATA " $@; +AM_V_DATA_1 ?= + +AM_V_HEADER ?= $(AM_V_HEADER_$(V)) +AM_V_HEADER_ ?= $(AM_V_HEADER_$(AM_DEFAULT_VERBOSITY)) +AM_V_HEADER_0 ?= @echo " HEADER " $@; +AM_V_HEADER_1 ?= + +AM_V_MAN ?= $(AM_V_MAN_$(V)) +AM_V_MAN_ ?= $(AM_V_MAN_$(AM_DEFAULT_VERBOSITY)) +AM_V_MAN_0 ?= @echo " MAN " $@; +AM_V_MAN_1 ?= + +am.INSTALL_PROGRAMS = $(AM_V_PROG)$(LIBTOOL) $(AM_V_lt) --tag=CC $(sd.ALL_LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $< $@ +am.INSTALL_SCRIPTS = $(AM_V_SCRIPT)$(INSTALL_SCRIPT) $< $@ +am.INSTALL_LTLIBRARIES = $(AM_V_LIB)$(LIBTOOL) $(AM_V_lt) --tag=CC $(sd.ALL_LIBTOOLFLAGS) --mode=install $(INSTALL) $< $@ +am.INSTALL_DATA = $(AM_V_DATA)$(INSTALL_DATA) $< $@ +am.INSTALL_HEADERS = $(AM_V_HEADER)$(INSTALL_DATA) $< $@ +am.INSTALL_MANS = $(AM_V_MAN)$(INSTALL_DATA) $< $@ diff --git a/build-aux/Makefile.once.head/20-sd.mk b/build-aux/Makefile.once.head/20-sd.mk index 545071d233..4e44d2f7b3 100644 --- a/build-aux/Makefile.once.head/20-sd.mk +++ b/build-aux/Makefile.once.head/20-sd.mk @@ -23,8 +23,81 @@ mod.sd.description = (systemd) shared build rules mod.sd.depends += am +define mod.sd.doc +# User variables: +# (flags) +# - `CFLAGS` +# - `CPPFLAGS` +# - `LDFLAGS` +# - `LIBTOOLFLAGS` +# (programs) +# - `CC` +# - `CCLD` +# - `LIBTOOL` +# - `MKDIR_P` +# - `SED` +# (verbosity) +# - `V` +# - `AM_V_*` +# - `INTLTOOL_V_MERGE*` +# (substitutions)$(foreach v,$(sort $(sd.substitution_keys)),$(at.nl)# - $v) +# Inputs: +# - Global variable : `DEPDIR` +# - Global variable : `ENABLE_TESTS` +# - Global variable : `ENABLE_UNSAFE_TESTS` +# - Global variable : `OUR_CFLAGS` +# - Global variable : `OUR_CPPFLAGS` +# - Global variable : `OUR_LDFLAGS` +# - Global variable : `OUR_LIBTOOLFLAGS` +# (Makefiles) +# - Directory variable : `sd.CFLAGS` +# - Directory variable : `sd.CPPFLAGS` +# - Directory variable : `sd.LDFLAGS` +# - Directory variable : `sd.LIBTOOLFLAGS` +# - Directory variable : `sd.sed_files` (default based on `EXTRA_DIST`) +# (am) +# - Directory variable : `EXTRA_DIST` +# - Directory variable : `am.out_PROGRAMS` +# - Directory variable : `am.CFLAGS` +# - Directory variable : `am.CPPFLAGS` +# - Target variable : `am.LDFLAGS` +# Outputs: +# - Global variable : `SHELL` +# - Make setting : `.DELETE_ON_ERROR` +# - Make setting : `.SECONDARY` +# - Global variable : `sd.substitutions` +# - Global variable : `sd.substitution_keys` +# - Global variable : `sd.sed_process` +# - Directory variable : `files.out.int` +# - Target variable : `sd.ALL_CFLAGS` +# - Target variable : `sd.ALL_CPPFLAGS` +# - Target variable : `sd.ALL_LDFLAGS` +# - Target variable : `sd.ALL_LIBTOLFLAGS` +# - Target variable : `sd.COMPILE` +# - Target variable : `sd.LTCOMPILE` +# - Target variable : `sd.LINK` +# - Target : `$$(outdir)/%.o` +# - Target : `$$(outdir)/%.lo` +# - Target : `$$(outdir)/$$(DEPDIR)` +# - Target : `$$(outdir)/%.la` +# - Target : `$$(addprefix $$(outdir)/,$$(am.out_PROGRAMS))` +# - Target : `$$(outdir)/test-lib%-sym.c` +# - Target : `$$(outdir)/%-from-name.gperf` +# - Target : `$$(outdir)/%-from-name.h` +# - Target : `$$(addprefix $$(outdir)/,$$(sd.sed_files))` +# - Target : `$$(outdir)/%.c: $$(srcdir)/%.gperf` +# - Target : `$$(outdir)/%: $$(srcdir)/%.m4` +# ???: +# - tests +# - unsafe_tests +# - TESTS -TESTS ?= +endef + +tests ?= +unsafe_tests ?= +TESTS = $(if $(ENABLE_TESTS),$(tests) \ + $(if $(ENABLE_UNSAFE_TESTS),$(unsafe_tests))) # Make behavior SHELL = bash -o pipefail @@ -37,7 +110,6 @@ OUR_CPPFLAGS += -MT $@ -MD -MP -MF $(@D)/$(DEPDIR)/$(basename $(@F)).P$(patsubst OUR_CPPFLAGS += -include $(topoutdir)/config.h OUR_CPPFLAGS += $(sort -I$(@D) $(if $( $@ - -sd.XSLTPROC_FLAGS = \ - --nonet \ - --xinclude \ - --stringparam man.output.quietly 1 \ - --stringparam funcsynopsis.style ansi \ - --stringparam man.authors.section.enabled 0 \ - --stringparam man.copyright.section.enabled 0 \ - --stringparam systemd.version $(VERSION) \ - --path '$(outdir):$(srcdir):$(topoutdir)/man:$(topsrcdir)/man' - -sd.XSLT = $(if $(XSLTPROC), $(XSLTPROC), xsltproc) -sd.XSLTPROC_PROCESS_MAN = \ - $(AM_V_XSLT)$(sd.XSLT) -o $@ $(sd.XSLTPROC_FLAGS) $(srcdir)/man/custom-man.xsl $< - -sd.XSLTPROC_PROCESS_HTML = \ - $(AM_V_XSLT)$(sd.XSLT) -o $@ $(sd.XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $< - -sd.html-alias = \ - $(AM_V_LN)$(LN_S) -f $(notdir $<) $@ diff --git a/build-aux/Makefile.once.head/20-sdman.mk b/build-aux/Makefile.once.head/20-sdman.mk new file mode 100644 index 0000000000..558c60531d --- /dev/null +++ b/build-aux/Makefile.once.head/20-sdman.mk @@ -0,0 +1,93 @@ +# -*- Mode: makefile; indent-tabs-mode: t -*- +# +# This file is part of systemd. +# +# Copyright 2010-2012 Lennart Poettering +# Copyright 2010-2012 Kay Sievers +# Copyright 2013 Zbigniew Jędrzejewski-Szmek +# Copyright 2013 David Strauss +# Copyright 2016 Luke Shumaker +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. +# +# systemd 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 +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with systemd; If not, see . + +mod.sdman.description = (systemd) manpages +mod.sdman.depends += am files write-atomic +define mod.sdman.doc +# User variables: +# - `V` +# - `AM_V_LN*` +# - `AM_V_XSLT*` +# - `LN_S` +# - `XSLTPROC` +# Inputs: +# - Global variable : `ENABLE_MANPAGES` +# - Global variable : `VERSION` +# - Directory variable : `files.src.src` +# Outputs: +# - File : `$(srcdir)/Makefile-man.mk` +# - Directory variable : `at.subdirs` +# - Directory variable : `files.src.gen` +# - Directory variable : `man_MANS` +# - Directory variable : `noinst_DATA` (HTML) +# - Target : `$(outdir)/%.1` +# - Target : `$(outdir)/%.3` +# - Target : `$(outdir)/%.5` +# - Target : `$(outdir)/%.7` +# - Target : `$(outdir)/%.8` +# - Target : `$(outdir)/%.html` +# +# sdman -> Makefile-man.mk: +# - Global variable : `sdman.html-alias` +# Makefile-man.mk -> sdman: +# - Directory variable : `sdman.MANPAGES` +# - Directory variable : `sdman.MANPAGES_ALIAS` +# +# The `sdman.*` variables are the interface by which the module +# communicates with the genrated Makefile-man.mk file. They should not +# be used outside of the `sdman` module. +endef +mod.sdman.doc := $(value mod.sdman.doc) + +V ?= +LN_S ?= ln -s + +AM_V_LN ?= $(AM_V_LN_$(V)) +AM_V_LN_ ?= $(AM_V_LN_$(AM_DEFAULT_VERBOSITY)) +AM_V_LN_0 ?= @echo " LN " $@; +AM_V_LN_1 ?= + +AM_V_XSLT ?= $(AM_V_XSLT_$(V)) +AM_V_XSLT_ ?= $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY)) +AM_V_XSLT_0 ?= @echo " XSLT " $@; +AM_V_XSLT_1 ?= + +_sdman.XSLTPROC_FLAGS = \ + --nonet \ + --xinclude \ + --stringparam man.output.quietly 1 \ + --stringparam funcsynopsis.style ansi \ + --stringparam man.authors.section.enabled 0 \ + --stringparam man.copyright.section.enabled 0 \ + --stringparam systemd.version $(VERSION) \ + --path '$(outdir):$(srcdir):$(topoutdir)/man:$(topsrcdir)/man' + +_sdman.XSLT = $(if $(XSLTPROC), $(XSLTPROC), xsltproc) +_sdman.XSLTPROC_PROCESS_MAN = \ + $(AM_V_XSLT)$(_sdman.XSLT) -o $@ $(_sdman.XSLTPROC_FLAGS) $(srcdir)/man/custom-man.xsl $< + +_sdman.XSLTPROC_PROCESS_HTML = \ + $(AM_V_XSLT)$(_sdman.XSLT) -o $@ $(_sdman.XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $< + +sdman.html-alias = \ + $(AM_V_LN)$(LN_S) -f $(notdir $<) $@ -- cgit v1.2.3-54-g00ecf