[mapguide-commits] r8663 - sandbox/jng/diet

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Wed May 13 07:05:30 PDT 2015


Author: jng
Date: 2015-05-13 07:05:30 -0700 (Wed, 13 May 2015)
New Revision: 8663

Added:
   sandbox/jng/diet/prebuild.sh
Log:
The old build_oem.sh here is now known as prebuild.sh as we still have to build agg and fusion in Oem before the main configure script can be run

Added: sandbox/jng/diet/prebuild.sh
===================================================================
--- sandbox/jng/diet/prebuild.sh	                        (rev 0)
+++ sandbox/jng/diet/prebuild.sh	2015-05-13 14:05:30 UTC (rev 8663)
@@ -0,0 +1,152 @@
+#
+#! /bin/bash
+#
+
+#
+# MapGuide Open Source build script.
+#
+
+#**********************************************************
+# Initialization
+#**********************************************************
+
+echo "MapGuide Open Source build script for OEM components"
+INSTALLDIR=/usr/local/mapguideopensource
+CLEAN_FLAG=0
+BUILD_CPU=32
+BUILD_CONFIG=release
+while [ $# -gt 0 ]; do    # Until you run out of parameters...
+    case "$1" in
+        -prefix|--prefix)
+            INSTALLDIR="$2"
+            shift
+            ;;
+        -clean|--clean)
+            CLEAN_FLAG=1
+            shift
+            ;;
+        -build|--build)
+            BUILD_CPU=$2
+            shift
+            ;;
+        -config|--config)
+            BUILD_CONFIG=$2
+            shift
+            ;;
+        -help|--help)
+            echo "Usage: $0 (options)"
+            echo "Options:"
+            echo "  --prefix [installation directory]"
+            echo "  --clean [clean all objects and binaries in Oem]"
+            echo "  --build [32(default)|64]"
+            echo "  --config [release(default)|debug]"
+            echo "  --help [Display usage]"
+            exit
+            ;;
+    esac
+    shift   # Check next set of parameters.
+done
+
+echo "OEM Build Initialization ............................"
+echo "Oem Libraries will be installed at: ${INSTALLDIR}"
+
+LIB_NAME=""
+
+#**********************************************************
+# Generic Functions
+#**********************************************************
+
+check_build()
+{
+    error=$?
+    if [ $error -ne 0 ]; then
+        echo "$LIB_NAME: Error build failed ($error)................."
+        exit $error
+    fi
+}
+
+check_clean()
+{
+    error=$?
+    if [ $error -ne 0 ]; then
+        echo "$LIB_NAME: Error clean failed ($error)................."
+        exit $error
+    fi
+}
+
+#**********************************************************
+# Build AGG 2.4
+# Notes: none
+#**********************************************************
+
+init_agg()
+{
+    LIB_NAME="AGG 2.4"
+}
+
+build_agg()
+{
+    pushd agg-2.4
+    if [ $BUILD_CPU -eq 64 ]; then
+        make EXTRACXXFLAGS="-fPIC -m64"
+    else
+        make
+    fi
+    check_build
+    popd
+}
+
+clean_agg()
+{
+    pushd agg-2.4
+    make clean
+    check_clean
+    popd
+}
+
+#**********************************************************
+# Build Fusion
+# Notes: requires Apache Ant
+#**********************************************************
+
+init_fusion()
+{
+    LIB_NAME="Fusion"
+}
+
+build_fusion()
+{
+    pushd fusion
+    ant prepare
+    ant compress
+    popd
+}
+
+clean_fusion()
+{
+    pushd fusion
+    ant clean
+    popd
+}
+
+#**********************************************************
+# Script loop
+#**********************************************************
+
+pushd Oem
+for lib in fusion agg;
+do
+    echo "$lib: Initialization..........................."
+    init_"$lib"
+
+    if test "$CLEAN_FLAG" = "1"; then
+        echo "$lib: Clean ....................................."
+        clean_"$lib"
+        echo "$lib: Clean Successful .........................."
+    else
+        echo "$lib: Configure/Build ..........................."
+        build_"$lib"
+        echo "$lib: Build Successful .........................."
+    fi
+done
+popd



More information about the mapguide-commits mailing list