2006-07-05 16:07:20 -05:00
|
|
|
|
2003-12-01 10:38:25 -06:00
|
|
|
# executables are *.exe for WNT. This variable is necessary since Cygwin 1.5.x
|
2006-09-15 05:18:41 -05:00
|
|
|
# Use spawn instead of fork when building dmake on cygwin.
|
2006-07-05 16:07:20 -05:00
|
|
|
if test "$GUI" = "WNT"; then
|
2006-09-27 04:25:09 -05:00
|
|
|
EXEEXT=".exe"
|
|
|
|
DMAKE_CONF="--enable-spawn"
|
2003-12-01 10:38:25 -06:00
|
|
|
else
|
2006-09-27 04:25:09 -05:00
|
|
|
EXEEXT=""
|
|
|
|
DMAKE_CONF=""
|
2006-07-05 16:07:20 -05:00
|
|
|
fi
|
2006-07-19 03:36:10 -05:00
|
|
|
export EXEEXT
|
2000-09-18 10:18:56 -05:00
|
|
|
|
2006-09-27 04:25:09 -05:00
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# Build dmake
|
|
|
|
|
2006-07-05 16:07:20 -05:00
|
|
|
if test "$BUILD_DMAKE" != "NO"; then
|
2010-12-02 11:03:33 -06:00
|
|
|
if test ! -x "$SRC_ROOT/dmake/dmake$EXEEXT"; then
|
2006-09-27 04:25:09 -05:00
|
|
|
cd "$SRC_ROOT/dmake" || exit
|
2003-01-20 08:00:18 -06:00
|
|
|
|
2006-09-27 04:25:09 -05:00
|
|
|
# Special case! The w32/tcsh build needs CC pointing to the MSVC++ compiler
|
|
|
|
# but we need a cygwin/gcc build dmake to understand the posix paths
|
2009-10-26 10:04:03 -05:00
|
|
|
if test "$GUI" = "WNT"; then
|
2006-09-27 04:25:09 -05:00
|
|
|
CC=""
|
|
|
|
CXX=""
|
|
|
|
export CC
|
|
|
|
export CXX
|
|
|
|
fi
|
2000-09-18 10:18:56 -05:00
|
|
|
|
2006-09-27 04:25:09 -05:00
|
|
|
# For normal unixy systems
|
|
|
|
if test -f "Makefile" ; then
|
|
|
|
$GNUMAKE distclean || exit
|
|
|
|
fi
|
2000-09-18 10:18:56 -05:00
|
|
|
|
2006-09-27 04:25:09 -05:00
|
|
|
./configure $DMAKE_CONF || exit
|
2002-10-09 07:17:17 -05:00
|
|
|
|
2006-09-27 04:25:09 -05:00
|
|
|
## invoke the gnu make command set by configure.
|
|
|
|
$GNUMAKE || exit
|
2000-09-18 10:18:56 -05:00
|
|
|
|
2006-09-27 04:25:09 -05:00
|
|
|
echo ""
|
|
|
|
echo "dmake has been successfully built"
|
2003-12-17 08:00:10 -06:00
|
|
|
|
2006-09-27 04:25:09 -05:00
|
|
|
cd ..
|
|
|
|
else
|
2010-12-01 14:58:53 -06:00
|
|
|
echo "dmake/dmake already built"
|
2006-09-27 04:25:09 -05:00
|
|
|
fi
|
2006-07-05 16:07:20 -05:00
|
|
|
fi
|
|
|
|
|
|
|
|
mkdir -p "$SOLARENV/$OUTPATH/bin"
|
|
|
|
if test "$BUILD_DMAKE" != "NO"; then
|
2006-09-27 04:25:09 -05:00
|
|
|
cp -f "$SRC_ROOT/dmake/dmake$EXEEXT" "$SOLARENV/$OUTPATH/bin" || exit
|
|
|
|
echo ""
|
|
|
|
echo "dmake copied to $SOLARENV/$OUTPATH/bin/dmake$EXEEXT"
|
2006-07-05 16:07:20 -05:00
|
|
|
fi
|
|
|
|
|
2006-09-15 05:18:41 -05:00
|
|
|
if test "$GUI" = "WNT" -a ! -x "$SOLARENV/$OUTPATH/bin/guw$EXEEXT"; then
|
|
|
|
echo ""
|
|
|
|
echo "Calling $GNUMAKE in guw"
|
2009-01-21 11:47:03 -06:00
|
|
|
cd "$SRC_ROOT/guw" || exit
|
2006-09-15 05:18:41 -05:00
|
|
|
$GNUMAKE || exit
|
|
|
|
echo ""
|
|
|
|
echo "guw has been successfully made"
|
2009-01-21 11:47:03 -06:00
|
|
|
cp -f "$SRC_ROOT/guw/guw$EXEEXT" "$SOLARENV/$OUTPATH/bin" || exit
|
2006-09-15 05:18:41 -05:00
|
|
|
echo ""
|
|
|
|
echo "guw copied to $SOLARENV/$OUTPATH/bin/guw$EXEEXT"
|
|
|
|
fi
|
|
|
|
|
2006-07-05 16:07:20 -05:00
|
|
|
#make sure build.pl is executable
|
2003-12-17 08:00:10 -06:00
|
|
|
|
2006-07-05 16:07:20 -05:00
|
|
|
chmod +x "$SRC_ROOT/solenv/bin/build.pl"
|
2007-05-09 07:26:54 -05:00
|
|
|
chmod +x "$SRC_ROOT/solenv/bin/build_client.pl"
|
2006-07-05 16:07:20 -05:00
|
|
|
chmod +x "$SRC_ROOT/solenv/bin/zipdep.pl"
|
|
|
|
chmod +x "$SRC_ROOT/solenv/bin/gccinstlib.pl"
|
2010-01-15 07:55:12 -06:00
|
|
|
|
|
|
|
# fetch or update external tarballs
|
2010-12-05 00:18:22 -06:00
|
|
|
if [ ! -d $SRC_ROOT/src ] ; then
|
|
|
|
mkdir $SRC_ROOT/src
|
|
|
|
fi
|
2010-01-15 07:55:12 -06:00
|
|
|
if [ "$DO_FETCH_TARBALLS" = "yes" ]; then
|
2010-11-28 17:45:45 -06:00
|
|
|
$SRC_ROOT/download $SRC_ROOT/ooo.lst
|
2010-01-15 07:55:12 -06:00
|
|
|
fi
|