]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Add configure option to disable man pages
authorAnders F Björklund <anders.f.bjorklund@gmail.com>
Thu, 7 Jun 2018 19:20:19 +0000 (21:20 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Wed, 8 Aug 2018 12:26:16 +0000 (14:26 +0200)
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
configure.ac

index dd0fc571ff97802ae7e7c3295b717d38be75a2e3..6f94fb015f8bde54b02f6a95952dda3fc0ca3341 100644 (file)
@@ -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:
index e2a348d97044f8a01bd0c7b456d163bf865277c0..ae2c208bc034e44876797de8a99f0d7e4176664c 100644 (file)
@@ -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"