diff options
author | Christian Pointner <equinox@anytun.org> | 2009-11-15 15:11:50 +0000 |
---|---|---|
committer | Christian Pointner <equinox@anytun.org> | 2009-11-15 15:11:50 +0000 |
commit | 30a65f4e0e64336f5a9ae311e3ca050c52e7e867 (patch) | |
tree | da4580a011410c11bab8d3fcd1add73aaa0a3182 /src | |
parent | no in-place sed at make install (diff) |
added --no-manpage to configure and make
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile | 23 | ||||
-rwxr-xr-x | src/configure | 13 |
2 files changed, 29 insertions, 7 deletions
diff --git a/src/Makefile b/src/Makefile index 6efbe7b..4124575 100644 --- a/src/Makefile +++ b/src/Makefile @@ -104,12 +104,17 @@ manpage: $(MAKE) --directory="../doc/" manpage +INSTALL_TARGETS := install-bin install-etc +REMOVE_TARGETS := remove-bin remove-etc + +ifdef MANDIR +INSTALL_TARGETS += install-man +REMOVE_TARGETS += remove-man +endif + ifdef EXAMPLESDIR -INSTALL_TARGETS := install-bin install-etc install-examples install-man -REMOVE_TARGETS := remove-examples -else -INSTALL_TARGETS := install-bin install-etc install-man -REMOVE_TARGETS := +INSTALL_TARGETS += install-examples +REMOVE_TARGETS += remove-examples endif install: all $(INSTALL_TARGETS) @@ -152,12 +157,18 @@ install-man: manpage uninstall: remove remove: $(REMOVE_TARGETS) + +remove-bin: rm -f $(DESTDIR)$(SBINDIR)/$(EXECUTABLE) - rm -f $(DESTDIR)$(MANDIR)/man8/$(EXECUTABLE).8 + +remove-etc: rm -f $(DESTDIR)$(ETCDIR)/init.d/$(EXECUTABLE) remove-examples: rm -rf $(DESTDIR)$(EXAMPLESDIR)/$(EXECUTABLE)/ +remove-man: + rm -f $(DESTDIR)$(MANDIR)/man8/$(EXECUTABLE).8 + purge: remove rm -rf $(DESTDIR)$(ETCDIR)/$(EXECUTABLE)/ diff --git a/src/configure b/src/configure index 0d4434f..f4ed32d 100755 --- a/src/configure +++ b/src/configure @@ -49,6 +49,7 @@ PREFIX='/usr/local' SBINDIR='' ETCDIR='' MANDIR='' +INSTALLMANPAGE=1 EXAMPLESDIR='' INSTALLEXAMPLES=1 @@ -59,6 +60,7 @@ print_usage() { echo " --sbindir=<DIR> the path to the sbin directory (default: $PREFIX/sbin)" echo " --sysconfdir=<DIR> the path to the system configuration directory (default: $PREFIX/etc" echo " --mandir=<DIR> the path to the system man pages (default: $PREFIX/share/man)" + echo " --no-manpage dont't install manpage" echo " --examplesdir=<DIR> the path to the examples files (default: $PREFIX/share/examples)" echo " --no-examples dont't install example files" echo " --use-ssl-crypto use ssl crypto library instead of libgcrypt" @@ -88,6 +90,9 @@ do --mandir=*) MANDIR=${arg#--mandir=} ;; + --no-manpage) + INSTALLMANPAGE=0 + ;; --examplesdir=*) EXAMPLESDIR=${arg#--examplesdir=} ;; @@ -217,9 +222,15 @@ INSTALL := install PREFIX := $PREFIX SBINDIR := $SBINDIR ETCDIR := $ETCDIR -MANDIR := $MANDIR EOF +if [ $INSTALLMANPAGE -eq 1 ]; then + echo "MANDIR := $MANDIR" >> include.mk + echo "installing manpage" +else + echo "not installing manpage" +fi + if [ $INSTALLEXAMPLES -eq 1 ]; then echo "EXAMPLESDIR := $EXAMPLESDIR" >> include.mk echo "installing example files" |