diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-09-07 10:52:52 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-09-07 10:52:52 -0400 |
commit | f53192b8ac8806fabea46a71ccee94b0c2afc2a7 (patch) | |
tree | 243cba83847ecd5ed1b1dc6e2d6fe478bca593ee /build-aux | |
parent | 90333657d3c090677a924d6c41377a2922a7186b (diff) |
Build+install manpages
Diffstat (limited to 'build-aux')
-rw-r--r-- | build-aux/Makefile.each.tail/50-sd.mk | 18 | ||||
-rw-r--r-- | build-aux/Makefile.each.tail/60-am.mk | 16 | ||||
-rw-r--r-- | build-aux/Makefile.each.tail/70-sd.mk | 58 | ||||
-rw-r--r-- | build-aux/Makefile.once.head/20-sd.mk | 78 | ||||
-rw-r--r-- | build-aux/Makefile.once.head/30-am.mk | 12 |
5 files changed, 153 insertions, 29 deletions
diff --git a/build-aux/Makefile.each.tail/50-sd.mk b/build-aux/Makefile.each.tail/50-sd.mk index 35b9168570..9de3a86e90 100644 --- a/build-aux/Makefile.each.tail/50-sd.mk +++ b/build-aux/Makefile.each.tail/50-sd.mk @@ -90,3 +90,21 @@ $(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/60-am.mk b/build-aux/Makefile.each.tail/60-am.mk index fda38d8877..a843c01779 100644 --- a/build-aux/Makefile.each.tail/60-am.mk +++ b/build-aux/Makefile.each.tail/60-am.mk @@ -8,6 +8,22 @@ zshcompletion_DATA ?= dist_bashcompletion_DATA := $(sort $(bashcompletion_DATA) $(rootbin_PROGRAMS) $(bin_PROGRAMS) $(bin_SCRIPTS)) dist_zshcompletion_DATA := $(sort $(zshcompletion_DATA) $(addprefix _,$(rootbin_PROGRAMS) $(bin_PROGRAMS) $(bin_SCRIPTS))) +man_MANS ?= +_am.man_MANS := $(man_MANS) +undefine man_MANS +man0_MANS += $(foreach _am.tmp,$(_am.man_MANS),$(if $(findstring .0,$(suffix $(_am.tmp))),$(_am.tmp))) +man1_MANS += $(foreach _am.tmp,$(_am.man_MANS),$(if $(findstring .1,$(suffix $(_am.tmp))),$(_am.tmp))) +man2_MANS += $(foreach _am.tmp,$(_am.man_MANS),$(if $(findstring .2,$(suffix $(_am.tmp))),$(_am.tmp))) +man3_MANS += $(foreach _am.tmp,$(_am.man_MANS),$(if $(findstring .3,$(suffix $(_am.tmp))),$(_am.tmp))) +man4_MANS += $(foreach _am.tmp,$(_am.man_MANS),$(if $(findstring .4,$(suffix $(_am.tmp))),$(_am.tmp))) +man5_MANS += $(foreach _am.tmp,$(_am.man_MANS),$(if $(findstring .5,$(suffix $(_am.tmp))),$(_am.tmp))) +man6_MANS += $(foreach _am.tmp,$(_am.man_MANS),$(if $(findstring .6,$(suffix $(_am.tmp))),$(_am.tmp))) +man7_MANS += $(foreach _am.tmp,$(_am.man_MANS),$(if $(findstring .7,$(suffix $(_am.tmp))),$(_am.tmp))) +man8_MANS += $(foreach _am.tmp,$(_am.man_MANS),$(if $(findstring .8,$(suffix $(_am.tmp))),$(_am.tmp))) +man9_MANS += $(foreach _am.tmp,$(_am.man_MANS),$(if $(findstring .9,$(suffix $(_am.tmp))),$(_am.tmp))) +manl_MANS += $(foreach _am.tmp,$(_am.man_MANS),$(if $(findstring .l,$(suffix $(_am.tmp))),$(_am.tmp))) +mann_MANS += $(foreach _am.tmp,$(_am.man_MANS),$(if $(findstring .n,$(suffix $(_am.tmp))),$(_am.tmp))) + $(eval \ $(foreach p,$(am.primaries) ,$(call _am.per_primary,$p)$(at.nl))) $(eval \ diff --git a/build-aux/Makefile.each.tail/70-sd.mk b/build-aux/Makefile.each.tail/70-sd.mk new file mode 100644 index 0000000000..9acce2f55a --- /dev/null +++ b/build-aux/Makefile.each.tail/70-sd.mk @@ -0,0 +1,58 @@ +# -*- 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 <http://www.gnu.org/licenses/>. + +mod.sd.depends += files write-atomic + +_sd.man_xml = $(foreach _sd.tmp,$(filter %.xml,$(files.src.src)),$(if $(findstring /,$(_sd.tmp)),,$(_sd.tmp))) + +ifneq ($(_sd.man_xml),) +#$(info $(outdir)/_sd.man_xml: «$(_sd.man_xml)») + +$(srcdir)/Makefile-man.mk: $(topsrcdir)/tools/make-man-rules.py $(topsrcdir)/tools/xml_helper.py $(topsrcdir)/man/custom-entities.ent.in $(outdir)/.var._sd.man_xml $(call at.addprefix,$(srcdir),$(_sd.man_xml)) + $(AM_V_GEN)$(PYTHON) $< $(filter %.xml,$^) | $(WRITE_ATOMIC) $@ +files.src.gen += Makefile-man.mk + +sd.MANPAGES = +sd.MANPAGES_ALIAS = +-include $(srcdir)/Makefile-man.mk + +_sd.XML_FILES = \ + ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,${patsubst %.8,%.xml,$(sd.MANPAGES)}}}}} +sd.HTML_FILES = \ + ${_sd.XML_FILES:.xml=.html} +sd.HTML_ALIAS = \ + ${patsubst %.1,%.html,${patsubst %.3,%.html,${patsubst %.5,%.html,${patsubst %.7,%.html,${patsubst %.8,%.html,$(sd.MANPAGES_ALIAS)}}}}} + +ifneq ($(ENABLE_MANPAGES),) +man_MANS = \ + $(sd.MANPAGES) \ + $(sd.MANPAGES_ALIAS) + +noinst_DATA += \ + $(sd.HTML_FILES) \ + $(sd.HTML_ALIAS) +endif # ENABLE_MANPAGES + +at.subdirs += $(abspath $(topoutdir)/man) + +endif # _sd.man_xml diff --git a/build-aux/Makefile.once.head/20-sd.mk b/build-aux/Makefile.once.head/20-sd.mk index 7ee0b62ea6..3c4d6bfd5c 100644 --- a/build-aux/Makefile.once.head/20-sd.mk +++ b/build-aux/Makefile.once.head/20-sd.mk @@ -47,18 +47,17 @@ sd.COMPILE = $(CC) $(sd.ALL_CPPFLAGS) $(sd.ALL_CFLAGS) sd.LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(sd.ALL_LIBTOOLFLAGS) --mode=compile $(CC) $(sd.ALL_CPPFLAGS) $(sd.ALL_CFLAGS) sd.LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(sd.ALL_LIBTOOLFLAGS) --mode=link $(CCLD) $(sd.ALL_CFLAGS) $(sd.ALL_LDFLAGS) -o $@ -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) $< $@ - CC ?= c99 CCLD ?= c99 LIBTOOL ?= libtool V ?= +AM_V_at ?= $(AM_V_at_$(V)) +AM_V_at_ ?= $(AM_V_at_$(AM_DEFAULT_VERBOSITY)) +AM_V_at_0 ?= @ +AM_V_at_1 ?= + AM_V_M4 ?= $(AM_V_M4_$(V)) AM_V_M4_ ?= $(AM_V_M4_$(AM_DEFAULT_VERBOSITY)) AM_V_M4_0 ?= @echo " M4 " $@; @@ -114,10 +113,23 @@ AM_V_GEN_ ?= $(AM_V_GEN_$(AM_DEFAULT_VERBOSITY)) AM_V_GEN_0 ?= @echo " GEN " $@; AM_V_GEN_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 ?= +INTLTOOL_V_MERGE ?= $(INTLTOOL_V_MERGE_$(V)) +INTLTOOL_V_MERGE_OPTIONS ?= $(intltool_v_merge_options_$(V)) +INTLTOOL_V_MERGE_ ?= $(INTLTOOL_V_MERGE_$(AM_DEFAULT_VERBOSITY)) +INTLTOOL_V_MERGE_0 ?= @echo " ITMRG " $@; +INTLTOOL_V_MERGE_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) $< $@ + +AM_V_lt ?= $(AM_V_lt_$(V)) +AM_V_lt_ ?= $(AM_V_lt_$(AM_DEFAULT_VERBOSITY)) +AM_V_lt_0 ?= --silent +AM_V_lt_1 ?= AM_V_PROG ?= $(AM_V_PROG_$(V)) AM_V_PROG_ ?= $(AM_V_PROG_$(AM_DEFAULT_VERBOSITY)) @@ -134,26 +146,20 @@ 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_at ?= $(AM_V_at_$(V)) -AM_V_at_ ?= $(AM_V_at_$(AM_DEFAULT_VERBOSITY)) -AM_V_at_0 ?= @ -AM_V_at_1 ?= - -AM_V_lt ?= $(AM_V_lt_$(V)) -AM_V_lt_ ?= $(AM_V_lt_$(AM_DEFAULT_VERBOSITY)) -AM_V_lt_0 ?= --silent -AM_V_lt_1 ?= - -INTLTOOL_V_MERGE ?= $(INTLTOOL_V_MERGE_$(V)) -INTLTOOL_V_MERGE_OPTIONS ?= $(intltool_v_merge_options_$(V)) -INTLTOOL_V_MERGE_ ?= $(INTLTOOL_V_MERGE_$(AM_DEFAULT_VERBOSITY)) -INTLTOOL_V_MERGE_0 ?= @echo " ITMRG " $@; -INTLTOOL_V_MERGE_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 ?= sd.substitutions = \ '|rootlibexecdir=$(rootlibexecdir)|' \ @@ -217,7 +223,29 @@ sd.substitutions = \ '|binfmtdir=$(binfmtdir)|' \ '|modulesloaddir=$(modulesloaddir)|' +sd.substitution_keys := $(subst |,,$(shell printf '%s\n' $(sd.substitutions) | cut -d= -f1)) + sd.SED_PROCESS = \ $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \ $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(sd.substitutions)))) \ < $< > $@ + +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/30-am.mk b/build-aux/Makefile.once.head/30-am.mk index dcccca6da4..3663e07093 100644 --- a/build-aux/Makefile.once.head/30-am.mk +++ b/build-aux/Makefile.once.head/30-am.mk @@ -15,10 +15,14 @@ am.sys2out_HEADERS = $(abspath $(addprefix $(srcdir)/include/,$(notdir $1))) am.var_PROGRAMS = $1_SOURCES nodist_$1_SOURCES $1_CFLAGS $1_CPPFLAGS $1_LDFLAGS $1_LDADD am.var_LTLIBRARIES = $1_SOURCES nodist_$1_SOURCES $1_CFLAGS $1_CPPFLAGS $1_LDFLAGS $1_LIBADD -am.INSTALL_PROGRAM ?= $(INSTALL_PROGRAM) $< $@ -am.INSTALL_SCRIPT ?= $(INSTALL) $< $@ -am.INSTALL_LTLIBRARY ?= $(INSTALL) $< $@ -am.INSTALL_DATA ?= $(INSTALL_DATA) $< $@ +# So these are reasonable defaults, to keep my sanity. They get overridden by +# `libtool`/`AM_V_*`-aware versions in `*-sd.mk` +am.INSTALL_PROGRAMS ?= $(INSTALL_PROGRAM) $< $@ +am.INSTALL_SCRIPTS ?= $(INSTALL) $< $@ +am.INSTALL_LTLIBRARIES ?= $(INSTALL) $< $@ +am.INSTALL_DATA ?= $(INSTALL_DATA) $< $@ +am.INSTALL_HEADERS ?= $(INSTALL_DATA) $< $@ +am.INSTALL_MANS ?= $(INSTALL_DATA) $< $@ am.LDFLAGS = |