From: Anders F Björklund Date: Thu, 7 Jun 2018 19:20:19 +0000 (+0200) Subject: Add configure option to disable man pages X-Git-Tag: v3.5~58 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a59166b5a9815e18d83756fa957cd441667d992f;p=thirdparty%2Fccache.git Add configure option to disable man pages Building the man page requires asciidoc, if building from the source repository. Add option to only install the program, but not the man. When building from the release tarball, the man page is already built. So we can still default to installing it, and requiring asciidoc/a2x. Closes #264 --- diff --git a/Makefile.in b/Makefile.in index dd0fc571f..6f94fb015 100644 --- a/Makefile.in +++ b/Makefile.in @@ -101,11 +101,11 @@ ccache.1: doc/ccache.1 cp $< $@ .PHONY: install -install: ccache$(EXEEXT) ccache.1 +install: ccache$(EXEEXT) @disable_man@ccache.1 $(installcmd) -d $(DESTDIR)$(bindir) $(installcmd) -m 755 ccache$(EXEEXT) $(DESTDIR)$(bindir) - $(installcmd) -d $(DESTDIR)$(mandir)/man1 - -$(installcmd) -m 644 ccache.1 $(DESTDIR)$(mandir)/man1/ +@disable_man@ $(installcmd) -d $(DESTDIR)$(mandir)/man1 +@disable_man@ -$(installcmd) -m 644 ccache.1 $(DESTDIR)$(mandir)/man1/ .PHONY: clean clean: diff --git a/configure.ac b/configure.ac index e2a348d97..ae2c208bc 100644 --- a/configure.ac +++ b/configure.ac @@ -19,6 +19,7 @@ esac AC_SUBST(extra_libs) AC_SUBST(include_dev_mk) AC_SUBST(test_suites) +AC_SUBST(disable_man) m4_include(m4/feature_macros.m4) @@ -126,6 +127,13 @@ else LIBS="$LIBS -lz" fi +AC_ARG_ENABLE(man, + [AS_HELP_STRING([--disable-man], + [disable installing man pages])]) +if test x${enable_man} = xno; then + disable_man='#' +fi + dnl Linking on Windows needs ws2_32 if test x${windows_os} = xyes; then LIBS="$LIBS -lws2_32"