diff options
author | Christian Pointner <equinox@anytun.org> | 2009-11-14 16:35:20 +0000 |
---|---|---|
committer | Christian Pointner <equinox@anytun.org> | 2009-11-14 16:35:20 +0000 |
commit | a6b86141782ac05c3660906f181d22186b7a9492 (patch) | |
tree | eab446897dcce305ce3dffd4e011cc992bc88ec9 | |
parent | installing example configs in seperater example dir now (diff) |
added --no-examples to configure
-rw-r--r-- | src/Makefile | 14 | ||||
-rwxr-xr-x | src/configure | 18 |
2 files changed, 25 insertions, 7 deletions
diff --git a/src/Makefile b/src/Makefile index 522ba7c..fbc97c3 100644 --- a/src/Makefile +++ b/src/Makefile @@ -198,7 +198,15 @@ clean: manpage: @cd man ; $(MAKE) -install: all install-bin install-etc install-examples install-man +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 := +endif + +install: all $(INSTALL_TARGETS) install-bin: $(EXECUTABLES) $(INSTALL) -d $(DESTDIR)$(SBINDIR) @@ -255,7 +263,7 @@ install-man: manpage uninstall: remove -remove: +remove: $(REMOVE_TARGETS) rm -f $(DESTDIR)$(SBINDIR)/anytun rm -f $(DESTDIR)$(BINDIR)/anytun-config rm -f $(DESTDIR)$(BINDIR)/anytun-controld @@ -265,6 +273,8 @@ remove: rm -f $(DESTDIR)$(MANDIR)/man8/anytun-controld.8 rm -f $(DESTDIR)$(MANDIR)/man8/anytun-showtables.8 rm -f $(DESTDIR)$(ETCDIR)/init.d/anytun + +remove-examples: rm -rf $(DESTDIR)$(EXAMPLESDIR)/anytun/ purge: remove diff --git a/src/configure b/src/configure index cfffbe7..63d97d2 100755 --- a/src/configure +++ b/src/configure @@ -48,6 +48,7 @@ SBINDIR='' ETCDIR='' MANDIR='' EXAMPLESDIR='' +INSTALLEXAMPLES=1 print_usage() { echo "configure --help print this" @@ -58,6 +59,7 @@ print_usage() { 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 " --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" echo " --no-crypto disable crypto at all (only NULL cipher)" echo " --disable-passphrase disable master key and salt passphrase" @@ -90,6 +92,9 @@ do --examplesdir=*) EXAMPLESDIR=${arg#--examplesdir=} ;; + --no-examples) + INSTALLEXAMPLES=0 + ;; --use-ssl-crypto) CRYPTO_LIB='ssl' ;; @@ -179,19 +184,19 @@ if [ $ROUTING -eq 0 ]; then fi if [ -z "$BINDIR" ]; then - BINDIR=$PREFIX/bin + BINDIR=$PREFIX/bin fi if [ -z "$SBINDIR" ]; then - SBINDIR=$PREFIX/sbin + SBINDIR=$PREFIX/sbin fi if [ -z "$ETCDIR" ]; then - ETCDIR=$PREFIX/etc + ETCDIR=$PREFIX/etc fi if [ -z "$MANDIR" ]; then - MANDIR=$PREFIX/share/man + MANDIR=$PREFIX/share/man fi if [ -z "$EXAMPLESDIR" ]; then @@ -216,7 +221,10 @@ BINDIR := $BINDIR SBINDIR := $SBINDIR ETCDIR := $ETCDIR MANDIR := $MANDIR -EXAMPLESDIR := $EXAMPLESDIR EOF +if [ $INSTALLEXAMPLES -eq 1 ]; then + echo "EXAMPLESDIR := $EXAMPLESDIR" >> include.mk +fi + exit 0 |