adding more build targets and build variables
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 20 Jul 2005 14:44:39 +0000 (14:44 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 20 Jul 2005 14:44:39 +0000 (14:44 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@1304 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/Makefile
Open-ILS/src/extras/marcdumper/Makefile
config.sh
install.conf.default
install.sh

index b80fee8..2a6e1fc 100644 (file)
@@ -1,10 +1,25 @@
 all: extras
 
-extras:
-       make -C extras
+install:       perl-install javascript-install web-templates-install string-templates-install
+
+marcdumper:
+       make -C extras/marcdumper
+
+marcdumper-install:
+       make -C extras/marcdumper install
 
 perl-install:
-       cp -r perlmods/* $(PERLDIR);
+       cp -r perlmods/* $(PERLDIR)
+
+javascript-install:
+       cp -r javascript/* $(WEBDIR)
+
+web-templates-install:
+       cp -r templates/opac $(TEMPLATEDIR)
+       cp -r templates/html $(TEMPLATEDIR)
+
+string-templates-install:
+       cp -r templates/strings $(TEMPLATEDIR)
 
 clean:
        @echo "Cleaning..."
index c1158be..3fdf45c 100644 (file)
@@ -11,6 +11,9 @@ all: marcdumper
 marcdumper:  marcdumper.c
        $(CC) marcdumper.c $(COMP) $(LD) -o $@
 
+install: 
+       cp marcdumper $(BINDIR)
+
 clean:
        /bin/rm -f *.o marcdumper
 
index d662698..69e2c77 100755 (executable)
--- a/config.sh
+++ b/config.sh
@@ -47,8 +47,7 @@ function buildConfig {
        echo "-----------------------------------------------------------------------";
 
        prompt "Temporary files directory [$TMP] "
-       read X;
-       if [ ! -z "$X" ]; then TMP="$X"; fi;
+       read X; if [ ! -z "$X" ]; then TMP="$X"; fi;
 
        prompt "Install prefix [$PREFIX] ";
        read X;
@@ -61,69 +60,37 @@ function buildConfig {
        fi
 
        prompt "Executables directory [$BINDIR] "
-       read X;
-       if [ ! -z "$X" ]; then BINDIR="$X"; fi;
+       read X; if [ ! -z "$X" ]; then BINDIR="$X"; fi;
 
        prompt "Lib directory [$LIBDIR] "
-       read X;
-       if [ ! -z "$X" ]; then LIBDIR="$X"; fi;
+       read X; if [ ! -z "$X" ]; then LIBDIR="$X"; fi;
 
        prompt "Perl directory [$PERLDIR] "
-       read X;
-       if [ ! -z "$X" ]; then PERLDIR="$X"; fi;
+       read X; if [ ! -z "$X" ]; then PERLDIR="$X"; fi;
 
        prompt "Include files directory [$INCLUDEDIR] "
-       read X;
-       if [ ! -z "$X" ]; then INCLUDEDIR="$X"; fi;
+       read X; if [ ! -z "$X" ]; then INCLUDEDIR="$X"; fi;
 
        prompt "Config files directory [$ETCDIR] "
-       read X;
-       if [ ! -z "$X" ]; then ETCDIR="$X"; fi;
+       read X; if [ ! -z "$X" ]; then ETCDIR="$X"; fi;
 
-       prompt "Web Root Directory [$WEB] "
-       read X;
-       if [ ! -z "$X" ]; then WEB="$X"; fi;
+       prompt "Web Root Directory [$WEBDIR] "
+       read X; if [ ! -z "$X" ]; then WEBDIR="$X"; fi;
+
+       prompt "Templates directory [$TEMPLATEDIR] "
+       read X; if [ ! -z "$X" ]; then TEMPLATEDIR="$X"; fi;
 
-       
        prompt "Apache2 apxs binary [$APXS2] "
-       read X;
-       if [ ! -z "$X" ]; then APXS2="$X"; fi;
+       read X; if [ ! -z "$X" ]; then APXS2="$X"; fi;
 
        prompt "Apache2 headers directory [$APACHE2_HEADERS] "
-       read X;
-       if [ ! -z "$X" ]; then APACHE2_HEADERS="$X"; fi;
+       read X; if [ ! -z "$X" ]; then APACHE2_HEADERS="$X"; fi;
 
        prompt "Libxml2 headers directory [$LIBXML2_HEADERS] "
-       read X;
-       if [ ! -z "$X" ]; then LIBXML2_HEADERS="$X"; fi;
+       read X; if [ ! -z "$X" ]; then LIBXML2_HEADERS="$X"; fi;
 
        prompt "Build targets [${TARGETS[@]:0}] "
-       read X;
-       if [ ! -z "$X" ]; then TARGETS=("$X"); fi;
-
-
-       cat <<-WORDS
-
-       -----------------------------------------------------------------------
-       Verify the following install directories are sane.
-       Note: * indicates that you must have write privelages for the location
-       -----------------------------------------------------------------------
-
-       -----------------------------------------------------------------------
-       Install prefix             [$PREFIX]*
-       Temporary files directory  [$TMP]*
-       Apache2 apxs binary        [$APXS2]
-       Apache2 headers directory  [$APACHE2_HEADERS]
-       Libxml2 headers directory  [$LIBXML2_HEADERS]
-       Build targets              [${TARGETS[@]:0}]
-       -----------------------------------------------------------------------
-
-       If these are not OK, use control-c to break out rerun this script.
-       Otherwise, type enter.
-
-       WORDS
-
-       read OK;
+       read X; if [ ! -z "$X" ]; then TARGETS=("$X"); fi;
 
        writeConfig;
 }
@@ -146,6 +113,9 @@ function writeConfig {
        _write "APACHE2_HEADERS=\"$APACHE2_HEADERS\"";
        _write "LIBXML2_HEADERS=\"$LIBXML2_HEADERS\"";
 
+       _write "WEBDIR=\"$WEBDIR\"";
+       _write "TEMPLATEDIR=\"$TEMPLATEDIR\"";
+
        # print out the targets
        STR="TARGETS=(";
        for target in ${TARGETS[@]:0}; do
@@ -158,6 +128,9 @@ function writeConfig {
        _write "OPENILS_DIR=\"Open-ILS/src/\"";
        _write "EVERGREEN_DIR=\"Evergreen/\"";
 
+       prompt "To write a new config, run 'make config'";
+       sleep 2;
+
 }
 
 function _write {
index 44b3a96..f9dd420 100644 (file)
 # --------------------------------------------------------------------
 # Build targets.  Options include:
 # 
+# opensrf_all          - builds all OpenSRF compenents
 # opensrf_jserver - custom 'single-domain' jabber server which may be used in place of jabberd2
 # opensrf_router  - jabber router.  
 # opensrf_gateway - mod_ils_gateway, Apache module for proxying API calls
 # opensrf_srfsh   - diagnostic shell interface to OpenSRF
-# opensrf_perl         - install the OpenSRF perl modules
-# opensrf_all          - builds all OpenSRF compenents
+# opensrf_core         - install the OpenSRF perl modules and core files for running opensrf
 #
-# openils_marcdumper - utility code for converting MARC to MARCXML
-# openils_perl                 - install the Open-ILS perl modules
 # openils_all                  - builds all OpenILS compenents
-# openils_web                  - copies over the javascript and html templates to the web root directory
+# openils_core                 - install the Open-ILS perl modules, and core files for running and openils server
+# openils_web                  - copies over the javascript and html templates to the web root directory for running the OPAC
+# openils_marcdumper - utility code for converting MARC to MARCXML
 #
-# evergreen_xul_client   - client XUL application
 # evergreen_all        - builds all Evergreen components
+# evergreen_xul_client   - client XUL application
 #
 # When running the server components of OpenSRF/OpenILS, the simplest
 # thing is to build 'opensrf' even if you 
index 2e438c8..2e9e92f 100755 (executable)
@@ -109,20 +109,6 @@ function loadConfig {
 
 
 
-# install targets
-#
-# opensrf_jserver - custom 'single-domain' jabber server which may be used in place of jabberd2
-# opensrf_router  - jabber router.  
-# opensrf_gateway - mod_ils_gateway, Apache module for proxying API calls
-# opensrf_srfsh   - diagnostic shell interface to OpenSRF
-# opensrf_perl         - install the OpenSRF perl modules
-# opensrf_all          - builds all OpenSRF compenents
-# openils_marcdumper - utility code for converting MARC to MARCXML
-# openils_perl                 - install the Open-ILS perl modules
-# openils_all                  - builds all OpenILS compenents
-# openils_web                  - copies over the javascript and html templates to the web root directory
-# evergreen_xul_client   - client XUL application
-# evergreen_all        - builds all Evergreen components
 function runInstall {
 
 
@@ -140,7 +126,8 @@ function runInstall {
 
                MAKE="make APXS2=$APXS2 PREFIX=$PREFIX TMP=$TMP \
                        APACHE2_HEADERS=$APACHE2_HEADERS LIBXML2_HEADERS=$LIBXML2_HEADERS \
-                       BINDIR=$BINDIR LIBDIR=$LIBDIR PERLDIR=$PERLDIR INCLUDEDIR=$INCLUDEDIR";
+                       BINDIR=$BINDIR LIBDIR=$LIBDIR PERLDIR=$PERLDIR INCLUDEDIR=$INCLUDEDIR \
+                       WEBDIR=$WEBDIR TEMPLATEDIR=$TEMPLATEDIR";
 
                case "$target" in
        
@@ -171,7 +158,7 @@ function runInstall {
                                if installing; then $MAKE -C "$OPENSRF_DIR" "srfsh-install"; fi;
                                ;;
 
-                       "opensrf_perl")
+                       "opensrf_core")
                                if installing; then $MAKE -C "$OPENSRF_DIR" "perl-install"; fi;
                                ;;
 
@@ -183,10 +170,24 @@ function runInstall {
                                if installing; then $MAKE -C "$OPENILS_DIR" install; fi;
                                ;;
 
-                       "openils_perl")
-                               if installing; then $MAKE -C "$OPENILS_DIR" "perl-install"; fi;
+                       "openils_core")
+                               if installing; then 
+                                       $MAKE -C "$OPENILS_DIR" "perl-install"; 
+                                       $MAKE -C "$OPENILS_DIR" "string-templates-install"; 
+                               fi;
+                               ;;
+
+                       "openils_web")
+                               if installing; then 
+                                       $MAKE -C "$OPENILS_DIR" "javascript-install"; 
+                                       $MAKE -C "$OPENILS_DIR" "web-templates-install"; 
+                               fi;
                                ;;
 
+                       "openils_marcdumper")
+                               if building;    then $MAKE -C "$OPENILS_DIR" "marcdumper"; fi;
+                               if installing; then $MAKE -C "$OPENILS_DIR" "marcdumper-install"; fi;
+
 
                        # Evergreen ---