summaryrefslogtreecommitdiffstats
path: root/Mac/OSX/Dist/build
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2003-06-16 15:12:16 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2003-06-16 15:12:16 (GMT)
commit7006fa14d8e6e79c8db27916fea7b6319796153a (patch)
tree958873c07a6cbfd2aacc4c5c6c44f10ac046992e /Mac/OSX/Dist/build
parente5370655dc769a23979a85c7e2790804171f71a3 (diff)
downloadcpython-7006fa14d8e6e79c8db27916fea7b6319796153a.zip
cpython-7006fa14d8e6e79c8db27916fea7b6319796153a.tar.gz
cpython-7006fa14d8e6e79c8db27916fea7b6319796153a.tar.bz2
Allow passing a build directory on the command line. Also, if the
build directory is found to exist we don't clean it up. We also use configure -C. All this lets us keep build directories, which graeatly speeds up the process of debugging installers.
Diffstat (limited to 'Mac/OSX/Dist/build')
-rwxr-xr-xMac/OSX/Dist/build32
1 files changed, 25 insertions, 7 deletions
diff --git a/Mac/OSX/Dist/build b/Mac/OSX/Dist/build
index 809f8ff..a3f3722 100755
--- a/Mac/OSX/Dist/build
+++ b/Mac/OSX/Dist/build
@@ -22,7 +22,6 @@ esac
TMPDIR=/tmp/_py
#TMPDIR=/projects/_py
-BUILDROOT=$TMPDIR/build
INSTALLROOT=$TMPDIR/install
DMGDIR=$TMPDIR/dmg
RESOURCEDIR=$PROGDIR/resources
@@ -30,9 +29,24 @@ DESTDIR=$TMPDIR/dist
PYTHONSRC=$PROGDIR/../../..
WASTEDIR=$PYTHONSRC/../waste
+case x$1 in
+x)
+ BUILDROOT=$TMPDIR/build
+ ;;
+*)
+ BUILDROOT=$1
+ ;;
+esac
+
# Setup
-mkdir -p $BUILDROOT
-mkdir -p $INSTALLROOT
+if [ -e $BUILDROOT ]; then
+ echo Using existing build directory $BUILDROOT
+ CLEANBUILD=no
+else
+ echo Creating clean build directory $BUILDROOT
+ CLEANBUILD=yes
+ mkdir -p $BUILDROOT
+fi
rm -rf $DMGDIR
mkdir -p $DMGDIR/root
@@ -68,9 +82,9 @@ if [ ! -e waste ]; then
ln -s $WASTEDIR waste
fi
-$PYTHONSRC/configure --enable-framework=$INSTALLROOT/Library/Frameworks LDFLAGS=-Wl,-x
+$PYTHONSRC/configure -C --enable-framework LDFLAGS=-Wl,-x
make
-make DIRMODE=775 EXEMODE=775 FILEMODE=664 frameworkinstall
+make DIRMODE=775 EXEMODE=775 FILEMODE=664 DESTDIR=$INSTALLROOT frameworkinstall
if [ "$builddocs" = "y" -o "$builddocs" = "Y" ]; then
./python.exe $PYTHONSRC/Mac/OSX/setupDocs.py build
@@ -122,12 +136,16 @@ mv $DMGDIR/MacPython-OSX-$PYVERSION-$BUILDNUM.dmg $DESTDIR
# Cleanup build/install dirs
if [ $DOCLEANUP = yes ]; then
echo "Cleaning up..."
- rm -rf $BUILDROOT
+ if [ $CLEANBUILD = yes ]; then
+ rm -rf $BUILDROOT
+ fi
rm -rf $INSTALLROOT
rm -rf $DMGDIR
else
echo "Cleanup is disabled. You should remove these dirs when done:"
- echo " $BUILDROOT"
+ if [ $CLEANBUILD = yes ]; then
+ echo " $BUILDROOT"
+ fi
echo " $INSTALLROOT"
echo " $DMGDIR"
fi