Skip to content

Commit 177ea92

Browse files
yann-morin-1998sofar
authored andcommitted
configure: add option to not build manpages (#14)
Man pages are not always needed, especially on embedded systems. Add a configure option to not build them; by default, build them. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
1 parent 1d5fa8c commit 177ea92

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

Makefile.am

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,10 @@ EXTRA_DIST = \
7474
MANPAGES = man/bootchart.conf.5 man/systemd-bootchart.1
7575
MANPAGES_ALIAS = man/bootchart.conf.d.5
7676

77-
man_MANS = $(MANPAGES) $(MANPAGES_ALIAS)
77+
if COND_man
78+
MAYBE_MANPAGES = $(MANPAGES) $(MANPAGES_ALIAS)
79+
endif
80+
man_MANS = $(MAYBE_MANPAGES)
7881

7982
man/bootchart.conf.d.5: man/bootchart.conf.5
8083

configure.ac

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,16 @@ AC_ARG_WITH([rootlibdir],
167167
AC_SUBST([rootprefix], [$with_rootprefix])
168168
AC_SUBST([rootlibdir], [$with_rootlibdir])
169169

170+
AC_ARG_ENABLE([man],
171+
AS_HELP_STRING([--diable-man],[Build the man pages (default: yes)]),
172+
[build_man=$enableval],
173+
[build_man=yes])
174+
170175
AC_PATH_PROG([XSLTPROC], [xsltproc])
171-
AS_IF([test -z "$XSLTPROC"], AC_MSG_ERROR([*** xsltproc is required for man pages]))
176+
AS_IF([test -z "$XSLTPROC" -a "$build_man" = "yes"],
177+
[AC_MSG_ERROR([*** xsltproc is required for man pages])])
178+
179+
AM_CONDITIONAL([COND_man],[test "$build_man" = "yes"])
172180

173181
AC_CONFIG_FILES([
174182
Makefile

0 commit comments

Comments
 (0)