From 225a789bf9fe4d65d063198165a6465442ecc387 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Thu, 9 Oct 2014 01:50:14 +0200 Subject: add installer for example scripts --- src/configure | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'src/configure') diff --git a/src/configure b/src/configure index 01970d6..af3caf5 100755 --- a/src/configure +++ b/src/configure @@ -43,6 +43,8 @@ PREFIX='/usr/local' BINDIR='' MANDIR='' INSTALLMANPAGE=1 +EXAMPLESDIR='' +INSTALLEXAMPLES=1 print_usage() { echo "configure --help print this" @@ -51,6 +53,8 @@ print_usage() { echo " --bindir= the path to the bin directory (default: \$PREFIX/bin)" echo " --mandir= the path to the system man pages (default: \$PREFIX/share/man)" echo " --no-manpage dont't install manpages" + echo " --examplesdir= the path to the examples files (default: \$PREFIX/share/examples)" + echo " --no-examples dont't install example files" echo " --use-clang use clang/llvm as compiler/linker" } @@ -72,6 +76,12 @@ do --no-manpage) INSTALLMANPAGE=0 ;; + --examplesdir=*) + EXAMPLESDIR=${arg#--examplesdir=} + ;; + --no-examples) + INSTALLEXAMPLES=0 + ;; --use-clang) USE_CLANG=1 ;; @@ -133,6 +143,10 @@ if [ -z "$MANDIR" ]; then MANDIR=$PREFIX/share/man fi +if [ -z "$EXAMPLESDIR" ]; then + EXAMPLESDIR=$PREFIX/share/examples +fi + cat > include.mk <> include.mk + echo "installing example files" +else + echo "not installing example files" +fi + VERSION=`cat ../version` if which git >/dev/null; then GIT_HASH=`git rev-parse HEAD 2> /dev/null` @@ -213,6 +235,11 @@ if [ $INSTALLMANPAGE -eq 1 ]; then echo "#define MANDIR \"$MANDIR\"" >> config-rtp.h fi +if [ $INSTALLEXAMPLES -eq 1 ]; then + echo "#define EXAMPLESDIR \"$EXAMPLESDIR\"" >> config-launch.h + echo "#define EXAMPLESDIR \"$EXAMPLESDIR\"" >> config-rtp.h +fi + cat >> config-rtp.h <