From a59166b5a9815e18d83756fa957cd441667d992f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Anders=20F=20Bj=C3=B6rklund?= Date: Thu, 7 Jun 2018 21:20:19 +0200 Subject: [PATCH] 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 --- Makefile.in | 6 +++--- configure.ac | 8 ++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) 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" -- 2.47.2