aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--Makefile.am2
-rw-r--r--configure.ac20
-rw-r--r--man/Makefile.am34
4 files changed, 42 insertions, 15 deletions
diff --git a/.gitignore b/.gitignore
index 1de66bca..225fd801 100644
--- a/.gitignore
+++ b/.gitignore
@@ -52,6 +52,7 @@ libkms.pc
52libtool 52libtool
53ltmain.sh 53ltmain.sh
54mach64.kld 54mach64.kld
55man/.man_fixup
55mga.kld 56mga.kld
56missing 57missing
57mkinstalldirs 58mkinstalldirs
diff --git a/Makefile.am b/Makefile.am
index 9f106d39..8ecd9d93 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -49,7 +49,7 @@ if HAVE_EXYNOS
49EXYNOS_SUBDIR = exynos 49EXYNOS_SUBDIR = exynos
50endif 50endif
51 51
52SUBDIRS = . $(LIBKMS_SUBDIR) $(INTEL_SUBDIR) $(NOUVEAU_SUBDIR) $(RADEON_SUBDIR) $(OMAP_SUBDIR) $(EXYNOS_SUBDIR) tests include 52SUBDIRS = . $(LIBKMS_SUBDIR) $(INTEL_SUBDIR) $(NOUVEAU_SUBDIR) $(RADEON_SUBDIR) $(OMAP_SUBDIR) $(EXYNOS_SUBDIR) tests include man
53 53
54libdrm_la_LTLIBRARIES = libdrm.la 54libdrm_la_LTLIBRARIES = libdrm.la
55libdrm_ladir = $(libdir) 55libdrm_ladir = $(libdir)
diff --git a/configure.ac b/configure.ac
index 10cc9a42..9ee79409 100644
--- a/configure.ac
+++ b/configure.ac
@@ -226,8 +226,26 @@ if test "x$HAVE_LIBUDEV" = xyes; then
226fi 226fi
227AM_CONDITIONAL(HAVE_LIBUDEV, [test "x$HAVE_LIBUDEV" = xyes]) 227AM_CONDITIONAL(HAVE_LIBUDEV, [test "x$HAVE_LIBUDEV" = xyes])
228 228
229# xsltproc for docbook manpages
230AC_ARG_ENABLE([manpages],
231 AS_HELP_STRING([--disable-manpages], [disable manpages @<:@default=enabled@:>@]),
232 [MANS=$enableval], [MANS=auto])
229AC_PATH_PROG(XSLTPROC, xsltproc) 233AC_PATH_PROG(XSLTPROC, xsltproc)
230AM_CONDITIONAL([HAVE_XSLTPROC], [test "x$XSLTPROC" != "x"]) 234AM_CONDITIONAL([BUILD_MANPAGES], [test "x$XSLTPROC" != "x" -a "x$MANS" != "xno"])
235
236# check for offline man-pages stylesheet
237AC_MSG_CHECKING([for docbook manpages stylesheet])
238MANPAGES_STYLESHEET="http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl"
239AC_PATH_PROGS_FEATURE_CHECK([XSLTPROC_TMP], [xsltproc],
240 AS_IF([`"$ac_path_XSLTPROC_TMP" --nonet "$MANPAGES_STYLESHEET" > /dev/null 2>&1`],
241 [HAVE_MANPAGES_STYLESHEET=yes]))
242if test "x$HAVE_MANPAGES_STYLESHEET" = "xyes"; then
243 AC_SUBST(MANPAGES_STYLESHEET)
244 AC_MSG_RESULT([yes])
245else
246 AC_MSG_RESULT([no])
247fi
248AM_CONDITIONAL([HAVE_MANPAGES_STYLESHEET], [test "x$HAVE_MANPAGES_STYLESHEET" = "xyes"])
231 249
232if test "x$INTEL" != "xno" -o "x$RADEON" != "xno" -o "x$NOUVEAU" != "xno" -o "x$OMAP" != "xno"; then 250if test "x$INTEL" != "xno" -o "x$RADEON" != "xno" -o "x$NOUVEAU" != "xno" -o "x$OMAP" != "xno"; then
233 # Check for atomic intrinsics 251 # Check for atomic intrinsics
diff --git a/man/Makefile.am b/man/Makefile.am
index 32acd076..25202e28 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -18,37 +18,45 @@ MANPAGES_ALIASES = \
18 18
19XML_FILES = \ 19XML_FILES = \
20 ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubs %.7,%.xml,$(MANPAGES)}}}} 20 ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubs %.7,%.xml,$(MANPAGES)}}}}
21CLEANFILES = 21EXTRA_DIST = $(XML_FILES)
22EXTRA_DIST = 22CLEANFILES = $(MANPAGES) $(MANPAGES_ALIASES) .man_fixup
23man_MANS = 23man_MANS =
24 24
25if HAVE_XSLTPROC 25if BUILD_MANPAGES
26if HAVE_MANPAGES_STYLESHEET
26 27
27CLEANFILES += $(MANPAGES) $(MANPAGES_ALIASES)
28EXTRA_DIST += $(MANPAGES) $(MANPAGES_ALIASES) $(XML_FILES)
29man_MANS += $(MANPAGES) $(MANPAGES_ALIASES) 28man_MANS += $(MANPAGES) $(MANPAGES_ALIASES)
30 29
31XSLTPROC_FLAGS = \ 30XSLTPROC_FLAGS = \
32 --stringparam man.authors.section.enabled 0 \ 31 --stringparam man.authors.section.enabled 0 \
33 --stringparam man.copyright.section.enabled 0 \ 32 --stringparam man.copyright.section.enabled 0 \
34 --stringparam funcsynopsis.style ansi \ 33 --stringparam funcsynopsis.style ansi \
35 --stringparam man.output.quietly 1 34 --stringparam man.output.quietly 1 \
35 --nonet
36 36
37XSLTPROC_PROCESS_MAN = \ 37XSLTPROC_PROCESS_MAN = \
38 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \ 38 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
39 $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< && \ 39 $(XSLTPROC) -o "$@" $(XSLTPROC_FLAGS) $(MANPAGES_STYLESHEET) "$<" && \
40 $(SED) -i -e 's/^\.so \(.*\)\.\(.\)$$/\.so man\2\/\1\.\2/' $(MANPAGES_ALIASES) 40 touch .man_fixup
41 41
42%.1: %.xml 42# Force .man_fixup if $(MANPAGES) are not built
43.man_fixup: | $(MANPAGES)
44 @touch .man_fixup
45
46$(MANPAGES_ALIASES): $(MANPAGES) .man_fixup
47 $(AM_V_GEN)if test -n "$@" ; then $(SED) -i -e 's/^\.so \([a-z_]\+\)\.\([0-9]\)$$/\.so man\2\/\1\.\2/' "$@" ; fi
48
49%.1: $(top_srcdir)/man/%.xml
43 $(XSLTPROC_PROCESS_MAN) 50 $(XSLTPROC_PROCESS_MAN)
44 51
45%.3: %.xml 52%.3: $(top_srcdir)/man/%.xml
46 $(XSLTPROC_PROCESS_MAN) 53 $(XSLTPROC_PROCESS_MAN)
47 54
48%.5: %.xml 55%.5: $(top_srcdir)/man/%.xml
49 $(XSLTPROC_PROCESS_MAN) 56 $(XSLTPROC_PROCESS_MAN)
50 57
51%.7: %.xml 58%.7: $(top_srcdir)/man/%.xml
52 $(XSLTPROC_PROCESS_MAN) 59 $(XSLTPROC_PROCESS_MAN)
53 60
54endif # HAVE_XSLTPROC 61endif # HAVE_MANPAGES_STYLESHEET
62endif # BUILD_MANPAGES