man: Allow building HTML man pages
Add a --enable-man-html configure option to build HTML man pages using a different stylesheet. The HTML pages aren't installed as I don't know what purpose they'd serve on an actual installation.
This commit is contained in:
parent
f396873d36
commit
61deb167da
|
|
@ -52,9 +52,23 @@ man5_files = ostree.repo.5 ostree.repo-config.5
|
||||||
man1_MANS = $(addprefix man/,$(man1_files))
|
man1_MANS = $(addprefix man/,$(man1_files))
|
||||||
man5_MANS = $(addprefix man/,$(man5_files))
|
man5_MANS = $(addprefix man/,$(man5_files))
|
||||||
|
|
||||||
|
manhtml_files = \
|
||||||
|
$(addprefix man/html/,$(man1_files:.1=.html)) \
|
||||||
|
$(addprefix man/html/,$(man5_files:.5=.html)) \
|
||||||
|
$(NULL)
|
||||||
|
|
||||||
|
if ENABLE_MAN_HTML
|
||||||
|
noinst_DATA += $(manhtml_files)
|
||||||
|
|
||||||
|
# Convenience target for building the just the HTML man pages
|
||||||
|
manhtml: $(manhtml_files)
|
||||||
|
.PHONY: manhtml
|
||||||
|
endif
|
||||||
|
|
||||||
EXTRA_DIST += $(man1_MANS:.1=.xml) $(man5_MANS:.5=.xml)
|
EXTRA_DIST += $(man1_MANS:.1=.xml) $(man5_MANS:.5=.xml)
|
||||||
|
|
||||||
XSLT_STYLESHEET = http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
|
XSLT_MAN_STYLESHEET = http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
|
||||||
|
XSLT_HTML_STYLESHEET = http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl
|
||||||
|
|
||||||
XSLTPROC_FLAGS = \
|
XSLTPROC_FLAGS = \
|
||||||
--nonet \
|
--nonet \
|
||||||
|
|
@ -67,14 +81,19 @@ XSLTPROC_FLAGS = \
|
||||||
XSLTPROC_MAN = $(XSLTPROC) $(XSLTPROC_FLAGS)
|
XSLTPROC_MAN = $(XSLTPROC) $(XSLTPROC_FLAGS)
|
||||||
|
|
||||||
%.1: %.xml
|
%.1: %.xml
|
||||||
$(AM_V_GEN) $(XSLTPROC_MAN) --output $@ $(XSLT_STYLESHEET) $<
|
$(AM_V_GEN) $(XSLTPROC_MAN) --output $@ $(XSLT_MAN_STYLESHEET) $<
|
||||||
|
|
||||||
%.5: %.xml
|
%.5: %.xml
|
||||||
$(AM_V_GEN) $(XSLTPROC_MAN) --output $@ $(XSLT_STYLESHEET) $<
|
$(AM_V_GEN) $(XSLTPROC_MAN) --output $@ $(XSLT_MAN_STYLESHEET) $<
|
||||||
|
|
||||||
|
man/html/%.html: man/%.xml
|
||||||
|
@mkdir -p man/html
|
||||||
|
$(AM_V_GEN) $(XSLTPROC_MAN) --output $@ $(XSLT_HTML_STYLESHEET) $<
|
||||||
|
|
||||||
CLEANFILES += \
|
CLEANFILES += \
|
||||||
$(man1_MANS) \
|
$(man1_MANS) \
|
||||||
$(man5_MANS) \
|
$(man5_MANS) \
|
||||||
|
$(manhtml_files) \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
|
||||||
10
configure.ac
10
configure.ac
|
|
@ -292,6 +292,16 @@ AS_IF([test "$enable_man" != no], [
|
||||||
])
|
])
|
||||||
AM_CONDITIONAL(ENABLE_MAN, test "$enable_man" != no)
|
AM_CONDITIONAL(ENABLE_MAN, test "$enable_man" != no)
|
||||||
|
|
||||||
|
AC_ARG_ENABLE([man-html],
|
||||||
|
[AS_HELP_STRING([--enable-man-html],
|
||||||
|
[generate man HTML pages [default=no]])],,
|
||||||
|
enable_man_html=no)
|
||||||
|
|
||||||
|
AS_IF([test "$enable_man_html" = yes && test "$enable_man" = no], [
|
||||||
|
AC_MSG_ERROR([--enable-man is required for --enable-man-html])
|
||||||
|
])
|
||||||
|
AM_CONDITIONAL(ENABLE_MAN_HTML, test "$enable_man_html" = yes)
|
||||||
|
|
||||||
AC_ARG_WITH(libarchive,
|
AC_ARG_WITH(libarchive,
|
||||||
AS_HELP_STRING([--without-libarchive], [Do not use libarchive]),
|
AS_HELP_STRING([--without-libarchive], [Do not use libarchive]),
|
||||||
:, with_libarchive=maybe)
|
:, with_libarchive=maybe)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue