configure: Add switch to disable manual pages (#413)
Code copied from i3 Fixes #377
This commit is contained in:
parent
ae49ec4bcb
commit
4bd07355ab
@ -5,6 +5,7 @@ echo-version:
|
|||||||
|
|
||||||
bin_PROGRAMS = i3status
|
bin_PROGRAMS = i3status
|
||||||
|
|
||||||
|
if BUILD_MANS
|
||||||
dist_man1_MANS = \
|
dist_man1_MANS = \
|
||||||
$(asciidoc_MANS)
|
$(asciidoc_MANS)
|
||||||
|
|
||||||
@ -17,6 +18,9 @@ $(asciidoc_MANS): man/%.1: man/%.xml man/$(dirstamp)
|
|||||||
|
|
||||||
man/%.xml: man/%.man man/asciidoc.conf man/$(dirstamp)
|
man/%.xml: man/%.man man/asciidoc.conf man/$(dirstamp)
|
||||||
$(AM_V_GEN) @PATH_ASCIIDOC@ -d manpage -b docbook -f $(top_builddir)/man/asciidoc.conf -o $@ $<
|
$(AM_V_GEN) @PATH_ASCIIDOC@ -d manpage -b docbook -f $(top_builddir)/man/asciidoc.conf -o $@ $<
|
||||||
|
else
|
||||||
|
asciidoc_MANS =
|
||||||
|
endif
|
||||||
|
|
||||||
AM_CPPFLAGS = \
|
AM_CPPFLAGS = \
|
||||||
-DSYSCONFDIR="\"$(sysconfdir)\"" \
|
-DSYSCONFDIR="\"$(sysconfdir)\"" \
|
||||||
|
20
configure.ac
20
configure.ac
@ -114,12 +114,20 @@ AC_PROG_MAKE_SET
|
|||||||
AC_PROG_RANLIB
|
AC_PROG_RANLIB
|
||||||
AC_PROG_LN_S
|
AC_PROG_LN_S
|
||||||
|
|
||||||
AC_PATH_PROG([PATH_ASCIIDOC], [asciidoc], [no])
|
AC_ARG_ENABLE(mans,
|
||||||
AS_IF([test x"$PATH_ASCIIDOC" = x"no"],
|
AS_HELP_STRING(
|
||||||
[AC_MSG_ERROR([asciidoc is required for generating man pages])])
|
[--disable-mans],
|
||||||
AC_PATH_PROG([PATH_XMLTO], [xmlto], [no])
|
[disable building manual pages]),
|
||||||
AS_IF([test x"$PATH_XMLTO" = x"no"],
|
[ax_mans=$enableval],
|
||||||
[AC_MSG_ERROR([xmlto is required for generating man pages])])
|
[ax_mans=yes])
|
||||||
|
AS_IF([test x$ax_mans = xyes], [
|
||||||
|
AC_PATH_PROG([PATH_ASCIIDOC], [asciidoc])
|
||||||
|
])
|
||||||
|
AS_IF([test x$ax_mans = xyes], [
|
||||||
|
AC_PATH_PROG([PATH_XMLTO], [xmlto])
|
||||||
|
AC_PATH_PROG([PATH_POD2MAN], [pod2man])
|
||||||
|
])
|
||||||
|
AM_CONDITIONAL([BUILD_MANS], [test x$ax_mans = xyes && test x$PATH_ASCIIDOC != x && test x$PATH_XMLTO != x && test x$PATH_POD2MAN != x])
|
||||||
|
|
||||||
AM_PROG_AR
|
AM_PROG_AR
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user