diff options
Diffstat (limited to 'build-aux/Makefile.each.tail/70-man.mk')
-rw-r--r-- | build-aux/Makefile.each.tail/70-man.mk | 93 |
1 files changed, 24 insertions, 69 deletions
diff --git a/build-aux/Makefile.each.tail/70-man.mk b/build-aux/Makefile.each.tail/70-man.mk index 97a50bd352..c043674457 100644 --- a/build-aux/Makefile.each.tail/70-man.mk +++ b/build-aux/Makefile.each.tail/70-man.mk @@ -20,85 +20,40 @@ # # You should have received a copy of the GNU Lesser General Public License # along with systemd; If not, see <http://www.gnu.org/licenses/>. -include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk -include $(topsrcdir)/build-aux/Makefile.head.mk +mod.man.description = (systemd) manpages +mod.man.depends += am files write-atomic -MANPAGES = -MANPAGES_ALIAS = +_man.man_xml = $(foreach _man.tmp,$(filter %.xml,$(files.src.src)),$(if $(findstring /,$(_man.tmp)),,$(_man.tmp))) -include Makefile-man.am +ifneq ($(_man.man_xml),) +#$(info $(outdir)/_man.man_xml: «$(_man.man_xml)») -.PHONY: man update-man-list -man: $(MANPAGES) $(MANPAGES_ALIAS) $(HTML_FILES) $(HTML_ALIAS) +$(srcdir)/Makefile-man.mk: $(topsrcdir)/tools/make-man-rules.py $(topsrcdir)/tools/xml_helper.py $(topsrcdir)/man/custom-entities.ent.in $(outdir)/.var._man.man_xml $(call at.addprefix,$(srcdir),$(_man.man_xml)) + $(AM_V_GEN)$(PYTHON) $< $(filter %.xml,$^) | $(WRITE_ATOMIC) $@ +files.src.gen += Makefile-man.mk -XML_FILES = \ - ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,${patsubst %.8,%.xml,$(MANPAGES)}}}}} -HTML_FILES = \ - ${XML_FILES:.xml=.html} -HTML_ALIAS = \ - ${patsubst %.1,%.html,${patsubst %.3,%.html,${patsubst %.5,%.html,${patsubst %.7,%.html,${patsubst %.8,%.html,$(MANPAGES_ALIAS)}}}}} +man.MANPAGES = +man.MANPAGES_ALIAS = +-include $(srcdir)/Makefile-man.mk + +_man.XML_FILES = \ + ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,${patsubst %.8,%.xml,$(man.MANPAGES)}}}}} +man.HTML_FILES = \ + ${_man.XML_FILES:.xml=.html} +man.HTML_ALIAS = \ + ${patsubst %.1,%.html,${patsubst %.3,%.html,${patsubst %.5,%.html,${patsubst %.7,%.html,${patsubst %.8,%.html,$(man.MANPAGES_ALIAS)}}}}} ifneq ($(ENABLE_MANPAGES),) man_MANS = \ - $(MANPAGES) \ - $(MANPAGES_ALIAS) + $(man.MANPAGES) \ + $(man.MANPAGES_ALIAS) noinst_DATA += \ - $(HTML_FILES) \ - $(HTML_ALIAS) \ - docs/html/man + $(man.HTML_FILES) \ + $(man.HTML_ALIAS) endif # ENABLE_MANPAGES -CLEANFILES += \ - $(man_MANS) \ - $(HTML_FILES) \ - $(HTML_ALIAS) \ - docs/html/man - -$(outdir)/man: - $(AM_V_LN)$(LN_S) -f ../../man $@ - -$(outdir)/index.html: man/systemd.index.html - $(AM_V_LN)$(LN_S) -f systemd.index.html $@ - -ifneq ($(HAVE_PYTHON),) -noinst_DATA += \ - man/index.html -endif # HAVE_PYTHON - -CLEANFILES += \ - man/index.html - -XML_GLOB = $(wildcard $(top_srcdir)/man/*.xml) -NON_INDEX_XML_FILES = $(filter-out man/systemd.index.xml,$(XML_FILES)) -SOURCE_XML_FILES = ${patsubst %,$(top_srcdir)/%,$(filter-out man/systemd.directives.xml,$(NON_INDEX_XML_FILES))} - -# This target should only be run manually. It recreates Makefile-man.am -# file in the source directory based on all man/*.xml files. Run it after -# adding, removing, or changing the conditional in a man page. -update-man-list: $(top_srcdir)/tools/make-man-rules.py $(XML_GLOB) man/custom-entities.ent - $(AM_V_GEN)$(PYTHON) $< $(XML_GLOB) > $(top_srcdir)/Makefile-man.tmp - $(AM_V_at)mv $(top_srcdir)/Makefile-man.tmp $(top_srcdir)/Makefile-man.am - @echo "Makefile-man.am has been regenerated" - -$(outdir)/systemd.index.xml: $(top_srcdir)/tools/make-man-index.py $(NON_INDEX_XML_FILES) - $(AM_V_GEN)$(PYTHON) $< $@ $(filter-out $<,$^) - -$(outdir)/systemd.directives.xml: $(top_srcdir)/tools/make-directive-index.py man/custom-entities.ent $(SOURCE_XML_FILES) - $(AM_V_GEN)$(PYTHON) $< $@ $(SOURCE_XML_FILES) - -CLEANFILES += \ - man/systemd.index.xml \ - man/systemd.directives.xml - -EXTRA_DIST += \ - $(filter-out man/systemd.directives.xml man/systemd.index.xml,$(XML_FILES)) \ - tools/make-man-index.py \ - tools/make-man-rules.py \ - tools/make-directive-index.py \ - tools/xml_helper.py \ - man/glib-event-glue.c - +at.subdirs += $(abspath $(topoutdir)/man) -include $(topsrcdir)/build-aux/Makefile.tail.mk +endif # _man.man_xml |