adding targets, etc.
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 6 Jul 2005 16:36:15 +0000 (16:36 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 6 Jul 2005 16:36:15 +0000 (16:36 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@1078 dcc99617-32d9-48b4-a31d-7c20da2025e4

Makefile
config.sh
install.sh

index f0f31e4..a6601d4 100644 (file)
--- a/Makefile
+++ b/Makefile
 # GNU General Public License for more details.
 # --------------------------------------------------------------------
 
-all: config build
+all: build
 
-config:
+
+config:        
+       ./config.sh
+
+oldconfig:     install.conf
+
+install.conf:  
        ./config.sh
 
-build:
+build: oldconfig
        ./install.sh build
 
 install:
index 971c5cb..7949d31 100755 (executable)
--- a/config.sh
+++ b/config.sh
@@ -26,14 +26,14 @@ DEFAULT_CONFIG_FILE="install.conf.default";
 
 function buildConfig {
 
-       if [ -f "$CONFIG_FILE" ]; then
-               echo "";
-               echo "Using existing config file \"$CONFIG_FILE\""; 
-               echo "To generate a new config, remove \"$CONFIG_FILE\"";
-               echo "";
-               sleep 3;        
-               exit 0;
-       fi
+#      if [ -f "$CONFIG_FILE" ]; then
+#              echo "";
+#              echo "Using existing config file \"$CONFIG_FILE\""; 
+#              echo "To generate a new config, remove \"$CONFIG_FILE\"";
+#              echo "";
+#              sleep 3;        
+#              exit 0;
+#      fi
 
 
        if [ -f "$DEFAULT_CONFIG_FILE" ]; then
@@ -48,7 +48,29 @@ function buildConfig {
 
        prompt "Install prefix [$PREFIX] ";
        read X;
-       if [ ! -z "$X" ]; then PREFIX="$X"; fi;
+       if [ ! -z "$X" ]; then 
+               PREFIX="$X"; 
+               BINDIR="$PREFIX/bin/";
+               LIBDIR="$PREFIX/lib/";
+               PERLDIR="$LIBDIR/perl5/";
+               INCLUDEDIR="$PREFIX/include/";
+       fi
+
+       prompt "Executables directory [$BINDIR] "
+       read X;
+       if [ ! -z "$X" ]; then BINDIR="$X"; fi;
+
+       prompt "Lib directory [$LIBDIR] "
+       read X;
+       if [ ! -z "$X" ]; then LIBDIR="$X"; fi;
+
+       prompt "Perl directory [$PERLDIR] "
+       read X;
+       if [ ! -z "$X" ]; then PERLDIR="$X"; fi;
+
+       prompt "Include files directory [$INCLUDEDIR] "
+       read X;
+       if [ ! -z "$X" ]; then INCLUDEDIR="$X"; fi;
 
        prompt "Temporary files directory [$TMP] "
        read X;
@@ -105,6 +127,11 @@ function writeConfig {
        echo "Writing config to $CONFIG_FILE...";
 
        _write "PREFIX=\"$PREFIX\"";
+       _write "BINDIR=\"$BINDIR\"";
+       _write "LIBDIR=\"$LIBDIR\"";
+       _write "PERLDIR=\"$PERLDIR\"";
+       _write "INCLUDEDIR=\"$INCLUDEDIR\"";
+
        _write "TMP=\"$TMP\"";
        _write "APXS2=\"$APXS2\"";
        _write "APACHE2_HEADERS=\"$APACHE2_HEADERS\"";
index af63220..b13ae70 100755 (executable)
@@ -150,9 +150,11 @@ function runInstall {
 
                MSG
 
-               MAKE="make APXS2=$APXS2 PREFIX=$PREFIX TMP=$TMP APACHE2_HEADERS=$APACHE2_HEADERS LIBXML2_HEADERS=$LIBXML2_HEADERS"; 
+               MAKE="make APXS2=$APXS2 PREFIX=$PREFIX TMP=$TMP \
+                       APACHE2_HEADERS=$APACHE2_HEADERS LIBXML2_HEADERS=$LIBXML2_HEADERS \
+                       BINDIR=$BINDIR LIBDIR=$LIBDIR PERLDIR=$PERLDIR INCLUDEDIR=$INCLUDEDIR";
 
-               echo "Passing to sub-makes: $VARS"
+               echo "Passing to sub-makes: $MAKE"
                        
                case "$target" in
                        
@@ -161,6 +163,14 @@ function runInstall {
                                if installing; then $MAKE -C "$OPENSRF_DIR" "$target-install"; fi;
                                ;;
 
+                       "opensrf_perl")
+                               if installing; then $MAKE -C "$OPENSRF_DIR" "perl-install"; fi;
+                               ;;
+
+                       "openils_perl")
+                               if installing; then $MAKE -C "$OPENILS_DIR" "perl-install"; fi;
+                               ;;
+
                        *) fail "Unknown target: $target";;
 
                esac