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 jam if enabled. Grabbed from dmake build pieces
|
|
|
|
# BEWARE: this needs to be before the dmake build as we need the platform
|
|
|
|
# specific CC value ..
|
|
|
|
|
|
|
|
if test "$ENABLE_JAM" = "TRUE"; then
|
|
|
|
if test ! -e "$SOLARENV/$OUTPATH/bin/jam$EXEEXT"; then
|
|
|
|
cd "$SRC_ROOT/external/jam" || exit
|
|
|
|
|
|
|
|
# For normal unixy systems
|
|
|
|
if test -e "build_jam.sh" ; then
|
|
|
|
INCLUDE=$JAM_INCLUDE LIB=$JAM_LIB ./build_jam.sh || exit
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo ""
|
|
|
|
echo "jam has been successfully built"
|
|
|
|
|
|
|
|
cd ../..
|
|
|
|
|
|
|
|
# copy the jam executable into solenv
|
|
|
|
mkdir -p "$SOLARENV/$OUTPATH/bin"
|
|
|
|
cp "$SRC_ROOT/external/jam/src/jam$EXEEXT" "$SOLARENV/$OUTPATH/bin/jam$EXEEXT"
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Copy the dummy root Jamrules and Jamfile into $SRC_ROOT
|
|
|
|
# They just include the real ones in solenv/jaminc
|
|
|
|
cp "$SRC_ROOT/solenv/jaminc/Jamrules.1" "$SRC_ROOT/Jamrules"
|
|
|
|
if ! test -e "$SRC_ROOT/Jamrules" ; then
|
|
|
|
echo "Error in copying $SRC_ROOT/solenv/jaminc/Jamrules.1 to $SRC_ROOT/Jamrules"
|
|
|
|
exit 1;
|
|
|
|
fi
|
|
|
|
|
|
|
|
cp "$SRC_ROOT/solenv/jaminc/Jamfile.1" "$SRC_ROOT/Jamfile"
|
|
|
|
if ! test -e "$SRC_ROOT/Jamfile" ; then
|
|
|
|
echo "Error in copying $SRC_ROOT/solenv/jaminc/Jamfile.1 to $SRC_ROOT/Jamfile"
|
|
|
|
exit 1;
|
|
|
|
fi
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# Build dmake
|
|
|
|
|
2006-07-05 16:07:20 -05:00
|
|
|
if test "$BUILD_DMAKE" != "NO"; then
|
2001-05-04 13:01:39 -05:00
|
|
|
|
2006-09-27 04:25:09 -05:00
|
|
|
if test ! -x "$SOLARENV/$OUTPATH/bin/dmake$EXEEXT"; then
|
2000-09-18 10:18:56 -05:00
|
|
|
|
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
|
|
|
|
if test "$GUI" = "WNT" -a "$USE_SHELL" != "4nt"; then
|
|
|
|
CC=""
|
|
|
|
CXX=""
|
|
|
|
export CC
|
|
|
|
export CXX
|
|
|
|
fi
|
2000-09-18 10:18:56 -05:00
|
|
|
|
2006-09-27 04:25:09 -05:00
|
|
|
# For the W32/4nt case
|
|
|
|
rm -rf objects
|
2006-07-05 16:07:20 -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 ..
|
2001-05-04 13:01:39 -05:00
|
|
|
|
2006-09-27 04:25:09 -05:00
|
|
|
else
|
2006-07-05 16:07:20 -05:00
|
|
|
|
2006-09-27 04:25:09 -05:00
|
|
|
echo ""
|
|
|
|
echo "dmake present in $SOLARENV/$OUTPATH/bin/dmake$EXEEXT"
|
2006-07-05 16:07:20 -05:00
|
|
|
|
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"
|
|
|
|
cd "$SRC_ROOT/config_office/guw" || exit
|
|
|
|
$GNUMAKE || exit
|
|
|
|
echo ""
|
|
|
|
echo "guw has been successfully made"
|
|
|
|
cp -f "$SRC_ROOT/config_office/guw/guw$EXEEXT" "$SOLARENV/$OUTPATH/bin" || exit
|
|
|
|
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"
|
|
|
|
chmod +x "$SRC_ROOT/solenv/bin/zipdep.pl"
|
|
|
|
chmod +x "$SRC_ROOT/solenv/bin/gccinstlib.pl"
|