summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2009-11-14 17:00:54 +0000
committerChristian Pointner <equinox@anytun.org>2009-11-14 17:00:54 +0000
commit3a63abd4e3509e6eadd84b32f100d83f17531937 (patch)
treecf997f8f6e4b893c19e7d5a9ab77d059ea6e058b
parentsmall fix at configure (diff)
added --no-examples to configure script
-rw-r--r--src/Makefile15
-rwxr-xr-xsrc/configure10
2 files changed, 22 insertions, 3 deletions
diff --git a/src/Makefile b/src/Makefile
index b83e0c6..911de28 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -103,7 +103,16 @@ cleanall: clean
manpage:
$(MAKE) --directory="../doc/" manpage
-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: $(EXECUTABLE)
$(INSTALL) -d $(DESTDIR)$(SBINDIR)
@@ -141,10 +150,12 @@ install-man: manpage
uninstall: remove
-remove:
+remove: $(REMOVE_TARGETS)
rm -f $(DESTDIR)$(SBINDIR)/$(EXECUTABLE)
rm -f $(DESTDIR)$(MANDIR)/man8/$(EXECUTABLE).8
rm -f $(DESTDIR)$(ETCDIR)/init.d/$(EXECUTABLE)
+
+remove-examples:
rm -rf $(DESTDIR)$(EXAMPLESDIR)/$(EXECUTABLE)/
purge: remove
diff --git a/src/configure b/src/configure
index 69798b0..6b77ae2 100755
--- a/src/configure
+++ b/src/configure
@@ -50,6 +50,7 @@ SBINDIR=''
ETCDIR=''
MANDIR=''
EXAMPLESDIR=''
+INSTALLEXAMPLES=1
print_usage() {
echo "configure --help print this"
@@ -59,6 +60,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"
@@ -89,6 +91,9 @@ do
--examplesdir=*)
EXAMPLESDIR=${arg#--examplesdir=}
;;
+ --no-examples)
+ INSTALLEXAMPLES=0
+ ;;
--use-ssl-crypto)
CRYPTO_LIB='ssl'
;;
@@ -213,7 +218,10 @@ PREFIX := $PREFIX
SBINDIR := $SBINDIR
ETCDIR := $ETCDIR
MANDIR := $MANDIR
-EXAMPLESDIR := $EXAMPLESDIR
EOF
+if [ $INSTALLEXAMPLES -eq 1 ]; then
+ echo "EXAMPLESDIR := $EXAMPLESDIR" >> include.mk
+fi
+
exit 0