]> git.saurik.com Git - wxWidgets.git/commitdiff
Factoring out redundant steps in the build process to their own function.
authorKevin Ollivier <kevino@theolliviers.com>
Wed, 5 Jul 2006 04:09:40 +0000 (04:09 +0000)
committerKevin Ollivier <kevino@theolliviers.com>
Wed, 5 Jul 2006 04:09:40 +0000 (04:09 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40001 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

distrib/scripts/mac/dobuilds
distrib/scripts/mac/mac_options.inc

index 51552768ad803393a20a77e0161453c6e988ec10..9ec9c9915cdf358e759e51665e863f260b5c7316 100755 (executable)
@@ -4,41 +4,31 @@ HOMEDIR="$PWD"
 
 BUILDDIR_ROOT="$PWD/builds"
 
-BUILDDIR_CARBON="$BUILDDIR_ROOT/carbon"
-BUILDDIR_COCOA="$BUILDDIR_ROOT/cocoa"
-
-mkdir -p $BUILDDIR_CARBON
-mkdir -p $BUILDDIR_COCOA
-
-cd $BUILDDIR_CARBON
-BUILDDIR=$BUILDDIR_CARBON
-
 export WXROOT="$HOMEDIR/../../.."
-export INSTALLDIR="$BUILDDIR/install-ansi"
-$HOMEDIR/macbuild
-
-export INSTALLDIR="$BUILDDIR/install-unicode"
-$HOMEDIR/macbuild unicode
-
-export INSTALLDIR="$BUILDDIR/install-static-ansi"
-$HOMEDIR/macbuild static
-
-export INSTALLDIR="$BUILDDIR/install-static-unicode"
-$HOMEDIR/macbuild static unicode
-
-cd $BUILDDIR_COCOA
-BUILDDIR=$BUILDDIR_COCOA
-
-export INSTALLDIR="$BUILDDIR/install-ansi"
-$HOMEDIR/macbuild cocoa
-
-export INSTALLDIR="$BUILDDIR/install-unicode"
-$HOMEDIR/macbuild cocoa unicode
-
-export INSTALLDIR="$BUILDDIR/install-static-ansi"
-$HOMEDIR/macbuild cocoa static
-
-export INSTALLDIR="$BUILDDIR/install-static-unicode"
-$HOMEDIR/macbuild cocoa static unicode
 
-cd $HOMEDIR
\ No newline at end of file
+do_builds {
+    PORT=$1
+    BUILDDIR=$BUILDDIR_ROOT/$PORT
+    mkdir -p $BUILDDIR
+    pushd $BUILDDIR
+    
+    # TODO: add the lipo universal builds to this
+    export WXROOT="$HOMEDIR/../../.."
+    export INSTALLDIR="$BUILDDIR/install-ansi"
+    $HOMEDIR/macbuild $PORT
+    
+    export INSTALLDIR="$BUILDDIR/install-unicode"
+    $HOMEDIR/macbuild $PORT unicode
+    
+    export INSTALLDIR="$BUILDDIR/install-static-ansi"
+    $HOMEDIR/macbuild $PORT static
+    
+    export INSTALLDIR="$BUILDDIR/install-static-unicode"
+    $HOMEDIR/macbuild $PORT static unicode
+    
+    popd
+}
+
+do_builds "carbon"
+
+do_builds "cocoa"
\ No newline at end of file
index 629f969dd92ee181ae1d8787b0debe65abe8bae7..a810a43836d9b059ee18dec09f25bc322e688685 100644 (file)
@@ -4,7 +4,7 @@ WXPYTHON=0
 UNICODE=0
 DEBUG=0
 CARBON=1
-COCOA=0
+PORT="mac"
 STATIC=0
 
 # Process command line options.
@@ -15,8 +15,8 @@ for i in "$@"; do
     debug)         DEBUG=1 ;;
     wxpython)      WXPYTHON=1 ;;
        universal)     UNIVERSAL=1 ;;
-       carbon)        CARBON=1 ;;
-       cocoa)         COCOA=1 ;;
+       carbon)        PORT="mac" ;;
+       cocoa)         PORT="cocoa" ;;
        static)        STATIC=1 ;;
        *)
            usage
@@ -25,6 +25,4 @@ for i in "$@"; do
     esac
 done
 
-if [ "$COCOA" = "1" ]; then
-  OTHER_OPTS="--with-cocoa "
-fi
\ No newline at end of file
+OTHER_OPTS="--with-$PORT "
\ No newline at end of file