X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=Makefile.am;h=92bd542767cb2fbd7ea25f1eca79ee56820d7663;hp=2eae8773fc18770b7221382bb28b5268777261a0;hb=7db293c4a05ec22909841b90b9ab172cb56a44a2;hpb=844ec79b3c2f246114ea316ebe1f36044bdb688e diff --git a/Makefile.am b/Makefile.am index 2eae8773f..92bd54276 100644 --- a/Makefile.am +++ b/Makefile.am @@ -97,6 +97,7 @@ rootbindir=$(rootprefix)/bin rootlibexecdir=$(rootprefix)/lib/systemd CLEANFILES = $(BUILT_SOURCES) +DISTCLEANFILES = EXTRA_DIST = BUILT_SOURCES = INSTALL_EXEC_HOOKS = @@ -556,9 +557,10 @@ noinst_DATA += \ 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 = $(filter-out man/systemd.directives.xml,$(NON_INDEX_XML_FILES)) -XML_GLOB = $(wildcard $(top_srcdir)/man/*.xml $(top_srcdir)/man/*.xml.in $(top_builddir)/man/*.xml) update-man-list: make-man-rules.py $(XML_GLOB) $(AM_V_GEN)$(PYTHON) $^ > $(top_srcdir)/Makefile-man.tmp $(AM_V_at)mv $(top_srcdir)/Makefile-man.tmp $(top_srcdir)/Makefile-man.am @@ -566,11 +568,11 @@ update-man-list: make-man-rules.py $(XML_GLOB) man/systemd.index.xml: make-man-index.py $(NON_INDEX_XML_FILES) $(AM_V_at)$(MKDIR_P) $(dir $@) - $(AM_V_GEN)$(PYTHON) $^ > $@ + $(AM_V_GEN)$(PYTHON) $< $@ $(filter-out $<,$^) -man/systemd.directives.xml: make-directive-index.py $(filter-out man/systemd.directives.xml,$(NON_INDEX_XML_FILES)) +man/systemd.directives.xml: make-directive-index.py $(SOURCE_XML_FILES) $(AM_V_at)$(MKDIR_P) $(dir $@) - $(AM_V_GEN)$(PYTHON) $^ > $@ + $(AM_V_GEN)$(PYTHON) $< $@ $(filter-out $<,$^) EXTRA_DIST += \ man/systemd.index.xml \ @@ -591,7 +593,8 @@ EXTRA_DIST += \ $(HTML_ALIAS) \ $(dist_MANS) \ make-man-index.py \ - make-directive-index.py + make-directive-index.py \ + xml_helper.py # ------------------------------------------------------------------------------ noinst_LTLIBRARIES += \ @@ -1071,6 +1074,7 @@ noinst_tests += \ test-env-replace \ test-strbuf \ test-strv \ + test-path-util \ test-strxcpyx \ test-unit-name \ test-unit-file \ @@ -1259,6 +1263,12 @@ test_strv_LDADD = \ libsystemd-units.la \ libsystemd-id128-internal.la +test_path_util_SOURCES = \ + src/test/test-path-util.c + +test_path_util_LDADD = \ + libsystemd-shared.la + test_strxcpyx_SOURCES = \ src/test/test-strxcpyx.c @@ -3705,48 +3715,51 @@ clean-sphinx: -rm -rf docs/html/python-systemd/ # ------------------------------------------------------------------------------ +substitutions = \ + '|rootlibexecdir=$(rootlibexecdir)|' \ + '|rootbindir=$(rootbindir)|' \ + '|bindir=$(bindir)|' \ + '|SYSTEMCTL=$(rootbindir)/systemctl|' \ + '|SYSTEMD_NOTIFY=$(rootbindir)/systemd-notify|' \ + '|pkgsysconfdir=$(pkgsysconfdir)|' \ + '|SYSTEM_CONFIG_UNIT_PATH=$(pkgsysconfdir)/system|' \ + '|USER_CONFIG_UNIT_PATH=$(pkgsysconfdir)/user|' \ + '|pkgdatadir=$(pkgdatadir)|' \ + '|systemunitdir=$(systemunitdir)|' \ + '|userunitdir=$(userunitdir)|' \ + '|systempresetdir=$(systempresetdir)|' \ + '|userpresetdir=$(userpresetdir)|' \ + '|udevhwdbdir=$(udevhwdbdir)|' \ + '|udevrulesdir=$(udevrulesdir)|' \ + '|catalogdir=$(catalogdir)|' \ + '|tmpfilesdir=$(tmpfilesdir)|' \ + '|sysctldir=$(sysctldir)|' \ + '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \ + '|PACKAGE_NAME=$(PACKAGE_NAME)|' \ + '|PACKAGE_URL=$(PACKAGE_URL)|' \ + '|RANDOM_SEED=$(localstatedir)/lib/random-seed|' \ + '|prefix=$(prefix)|' \ + '|exec_prefix=$(exec_prefix)|' \ + '|libdir=$(libdir)|' \ + '|includedir=$(includedir)|' \ + '|VERSION=$(VERSION)|' \ + '|rootprefix=$(rootprefix)|' \ + '|udevlibexecdir=$(udevlibexecdir)|' \ + '|SUSHELL=$(SUSHELL)|' \ + '|DEBUGTTY=$(DEBUGTTY)|' \ + '|KILL=$(KILL)|' \ + '|QUOTAON=$(QUOTAON)|' \ + '|QUOTACHECK=$(QUOTACHECK)|' \ + '|SYSTEM_SYSVINIT_PATH=$(sysvinitdir)|' \ + '|VARLOGDIR=$(varlogdir)|' \ + '|RC_LOCAL_SCRIPT_PATH_START=$(RC_LOCAL_SCRIPT_PATH_START)|' \ + '|RC_LOCAL_SCRIPT_PATH_STOP=$(RC_LOCAL_SCRIPT_PATH_STOP)|' \ + '|PYTHON=$(PYTHON)|' \ + '|PYTHON_BINARY=$(PYTHON_BINARY)|' + SED_PROCESS = \ $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \ - $(SED) -e 's,@rootlibexecdir\@,$(rootlibexecdir),g' \ - -e 's,@rootbindir\@,$(rootbindir),g' \ - -e 's,@bindir\@,$(bindir),g' \ - -e 's,@SYSTEMCTL\@,$(rootbindir)/systemctl,g' \ - -e 's,@SYSTEMD_NOTIFY\@,$(rootbindir)/systemd-notify,g' \ - -e 's,@pkgsysconfdir\@,$(pkgsysconfdir),g' \ - -e 's,@SYSTEM_CONFIG_UNIT_PATH\@,$(pkgsysconfdir)/system,g' \ - -e 's,@USER_CONFIG_UNIT_PATH\@,$(pkgsysconfdir)/user,g' \ - -e 's,@pkgdatadir\@,$(pkgdatadir),g' \ - -e 's,@systemunitdir\@,$(systemunitdir),g' \ - -e 's,@userunitdir\@,$(userunitdir),g' \ - -e 's,@systempresetdir\@,$(systempresetdir),g' \ - -e 's,@userpresetdir\@,$(userpresetdir),g' \ - -e 's,@udevhwdbdir\@,$(udevhwdbdir),g' \ - -e 's,@udevrulesdir\@,$(udevrulesdir),g' \ - -e 's,@catalogdir\@,$(catalogdir),g' \ - -e 's,@tmpfilesdir\@,$(tmpfilesdir),g' \ - -e 's,@sysctldir\@,$(sysctldir),g' \ - -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \ - -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \ - -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' \ - -e 's,@RANDOM_SEED\@,$(localstatedir)/lib/random-seed,g' \ - -e 's,@prefix\@,$(prefix),g' \ - -e 's,@exec_prefix\@,$(exec_prefix),g' \ - -e 's,@libdir\@,$(libdir),g' \ - -e 's,@includedir\@,$(includedir),g' \ - -e 's,@VERSION\@,$(VERSION),g' \ - -e 's,@rootprefix\@,$(rootprefix),g' \ - -e 's,@udevlibexecdir\@,$(udevlibexecdir),g' \ - -e 's,@SUSHELL\@,$(SUSHELL),g' \ - -e 's,@DEBUGTTY\@,$(DEBUGTTY),g' \ - -e 's,@KILL\@,$(KILL),g' \ - -e 's,@QUOTAON\@,$(QUOTAON),g' \ - -e 's,@QUOTACHECK\@,$(QUOTACHECK),g' \ - -e 's,@SYSTEM_SYSVINIT_PATH\@,$(sysvinitdir),g' \ - -e 's,@VARLOGDIR\@,$(varlogdir),g' \ - -e 's,@RC_LOCAL_SCRIPT_PATH_START\@,$(RC_LOCAL_SCRIPT_PATH_START),g' \ - -e 's,@RC_LOCAL_SCRIPT_PATH_STOP\@,$(RC_LOCAL_SCRIPT_PATH_STOP),g' \ - -e 's,@PYTHON\@,$(PYTHON),g' \ - -e 's,@PYTHON_BINARY\@,$(PYTHON_BINARY),g' \ + $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \ < $< > $@ units/%: units/%.in Makefile @@ -3809,38 +3822,46 @@ CLEANFILES += \ # ------------------------------------------------------------------------------ if ENABLE_MANPAGES +man/custom-entities.ent: Makefile + $(AM_V_GEN)$(MKDIR_P) $(dir $@) + $(AM_V_GEN)(echo '' && \ + echo '$(subst '|,,$(substitutions))))') \ + > $@ # ' + +DISTCLEANFILES += \ + man/custom-entities.ent + XSLTPROC_FLAGS = \ --nonet \ --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) + --stringparam systemd.version $(VERSION) \ + --path '$(builddir)/man:$(srcdir)/man' XSLTPROC_PROCESS_MAN = \ - $(AM_V_XSLT)$(MKDIR_P) $(dir $@) && \ - $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-man.xsl $< + $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-man.xsl $< XSLTPROC_PROCESS_HTML = \ - $(AM_V_XSLT)$(MKDIR_P) $(dir $@) && \ - $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $< + $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $< -man/%.1: man/%.xml man/custom-man.xsl +man/%.1: man/%.xml man/custom-man.xsl man/custom-entities.ent $(XSLTPROC_PROCESS_MAN) -man/%.3: man/%.xml man/custom-man.xsl +man/%.3: man/%.xml man/custom-man.xsl man/custom-entities.ent $(XSLTPROC_PROCESS_MAN) -man/%.5: man/%.xml man/custom-man.xsl +man/%.5: man/%.xml man/custom-man.xsl man/custom-entities.ent $(XSLTPROC_PROCESS_MAN) -man/%.7: man/%.xml man/custom-man.xsl +man/%.7: man/%.xml man/custom-man.xsl man/custom-entities.ent $(XSLTPROC_PROCESS_MAN) -man/%.8: man/%.xml man/custom-man.xsl +man/%.8: man/%.xml man/custom-man.xsl man/custom-entities.ent $(XSLTPROC_PROCESS_MAN) -man/%.html: man/%.xml man/custom-html.xsl +man/%.html: man/%.xml man/custom-html.xsl man/custom-entities.ent $(XSLTPROC_PROCESS_HTML) define html-alias