X-Git-Url: http://git.ipfire.org/?p=oddments%2Fddns.git;a=blobdiff_plain;f=Makefile.am;h=0ee85ae48f0c4f8b9f3dc2a05a5ded34943cbd9b;hp=66c6a15cde62c5550f7113cc84a22cb2aa570df0;hb=2443dd94c6f45310878125aaf9a04f76116c20cf;hpb=f07a11538a0c9568b21f807691979932be648ddd diff --git a/Makefile.am b/Makefile.am index 66c6a15..0ee85ae 100644 --- a/Makefile.am +++ b/Makefile.am @@ -37,6 +37,7 @@ configsdir = $(sysconfdir)/ddns CLEANFILES = DISTCLEANFILES = EXTRA_DIST = +noinst_DATA = @INTLTOOL_POLICY_RULE@ @@ -46,16 +47,28 @@ update-po: # ------------------------------------------------------------------------------ +AM_V_XSLT = $(AM_V_XSLT_$(V)) +AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY)) +AM_V_XSLT_0 = @echo " XSLT " $@; + +# ------------------------------------------------------------------------------ + dist_doc_DATA = \ COPYING # ------------------------------------------------------------------------------ -dist_bin_SCRIPTS = \ +bin_SCRIPTS = \ + ddns + +EXTRA_DIST += \ + ddns.in + +CLEANFILES += \ ddns dist_configs_DATA = \ - ddns.conf + ddns.conf.sample ddns_PYTHON = \ src/ddns/__init__.py \ @@ -66,3 +79,70 @@ ddns_PYTHON = \ src/ddns/system.py ddnsdir = $(pythondir)/ddns + +# ------------------------------------------------------------------------------ + +if ENABLE_MANPAGES +MANPAGES = \ + man/ddns.1 \ + man/ddns.conf.5 + +MANPAGES_XML = $(patsubst %.1,%.xml,$(patsubst %.5,%.xml,$(MANPAGES))) +MANPAGES_HTML = $(patsubst %.xml,%.html,$(MANPAGES_XML)) + +man: $(MANPAGES) $(MANPAGES_HTML) + +man_MANS = \ + $(MANPAGES) + +noinst_DATA += \ + $(MANPAGES_HTML) + +CLEANFILES += \ + $(man_MANS) \ + $(MANPAGES_HTML) + +EXTRA_DIST += \ + $(MANPAGES_XML) \ + man/custom-html.xsl + +XSLTPROC_FLAGS = \ + --nonet \ + --stringparam man.output.quietly 1 \ + --stringparam funcsynopsis.style ansi \ + --stringparam man.th.extra1.suppress 1 \ + --stringparam man.authors.section.enabled 1 \ + --stringparam man.copyright.section.enabled 1 + +XSLTPROC_COMMAND_MAN = \ + $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) \ + http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< + +XSLTPROC_COMMAND_HTML = \ + $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $< + +man/%.1: man/%.xml + $(XSLTPROC_COMMAND_MAN) + +man/%.5: man/%.xml + $(XSLTPROC_COMMAND_MAN) + +man/%.html: man/%.xml man/custom-html.xsl + $(XSLTPROC_COMMAND_HTML) + +endif + +# ------------------------------------------------------------------------------ + +substitutions = \ + '|PACKAGE_NAME=$(PACKAGE_NAME)|' \ + '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \ + '|configsdir=$(configsdir)|' + +SED_PROCESS = \ + $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \ + $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \ + < $< > $@ + +ddns: ddns.in Makefile + $(SED_PROCESS)