build-sys: build man pages
authorLucas De Marchi <lucas.demarchi@profusion.mobi>
Thu, 12 Jan 2012 13:48:21 +0000 (11:48 -0200)
committerLucas De Marchi <lucas.demarchi@profusion.mobi>
Thu, 12 Jan 2012 16:21:22 +0000 (14:21 -0200)
Makefile.am
configure.ac
man/.gitignore [new file with mode: 0644]
man/Makefile.am [new file with mode: 0644]

index 42818ea..daf6144 100644 (file)
@@ -1,4 +1,4 @@
-SUBDIRS = . libkmod/docs
+SUBDIRS = . libkmod/docs man
 
 EXTRA_DIST =
 CLEANFILES =
index dcb8795..fe2e8f1 100644 (file)
@@ -27,6 +27,7 @@ AC_C_BIGENDIAN
 
 AC_PROG_SED
 AC_PROG_MKDIR_P
+AC_PATH_PROG([XSLTPROC], [xsltproc])
 PKG_PROG_PKG_CONFIG
 
 AC_ARG_WITH([rootprefix],
@@ -128,6 +129,7 @@ CC_CHECK_CFLAGS_APPEND([ \
 AC_CONFIG_HEADERS(config.h)
 AC_CONFIG_FILES([
        Makefile
+       man/Makefile
        libkmod/docs/Makefile
        libkmod/docs/version.xml
 ])
diff --git a/man/.gitignore b/man/.gitignore
new file mode 100644 (file)
index 0000000..bc0cce8
--- /dev/null
@@ -0,0 +1,2 @@
+*.5
+*.8
diff --git a/man/Makefile.am b/man/Makefile.am
new file mode 100644 (file)
index 0000000..c689178
--- /dev/null
@@ -0,0 +1,13 @@
+MAN5 = depmod.d.5
+MAN8 =
+
+dist_man_MANS = $(MAN5) $(MAN8)
+
+EXTRA_DIST = $(MAN5:%.5=%.xml) $(MAN8:%.8=%.xml)
+XSLTPROC_FLAGS = \
+       --nonet \
+       --param funcsynopsis.style "'ansi'"
+
+%.5 %.8: %.xml
+       $(AM_V_GEN)$(XSLTPROC) $(XSLTPROC_FLAGS) \
+               http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<