eca6196cd9
Except when cross-compiling from Windows (yeah... not bloody likely anybody would be silly enough to do that...), then use the Cygwin gcc.
94 lines
2.5 KiB
Groff
Executable file
94 lines
2.5 KiB
Groff
Executable file
|
|
# executables are *.exe for WNT. This variable is necessary since Cygwin 1.5.x
|
|
# Use spawn instead of fork when building dmake on cygwin.
|
|
if test "$GUI" = "WNT"; then
|
|
EXEEXT=".exe"
|
|
DMAKE_CONF="--enable-spawn"
|
|
else
|
|
EXEEXT=""
|
|
DMAKE_CONF=""
|
|
fi
|
|
export EXEEXT
|
|
|
|
# ------------------------------------------------------------------------------
|
|
# Build dmake
|
|
|
|
if test "$BUILD_DMAKE" != "NO"; then
|
|
if test ! -x "$SRC_ROOT/dmake/dmake$EXEEXT"; then
|
|
cd "$SRC_ROOT/dmake" || exit
|
|
|
|
# If cross-compiling then don't use the cross compilers to build dmake.
|
|
if test "$CROSS_COMPILING" = "YES"; then
|
|
if test "$GUI_FOR_BUILD" = "WNT"; then
|
|
# Let the Cygwin gcc be found
|
|
CC=""
|
|
CXX=""
|
|
else
|
|
CC="$CC_FOR_BUILD"
|
|
CXX="$CXX_FOR_BUILD"
|
|
fi
|
|
export CC
|
|
export CXX
|
|
fi
|
|
|
|
# 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"; then
|
|
CC=""
|
|
CXX=""
|
|
export CC
|
|
export CXX
|
|
fi
|
|
|
|
# For normal unixy systems
|
|
if test -f "Makefile" ; then
|
|
$GNUMAKE distclean || exit
|
|
fi
|
|
|
|
./configure $DMAKE_CONF || exit
|
|
|
|
## invoke the gnu make command set by configure.
|
|
$GNUMAKE || exit
|
|
|
|
echo ""
|
|
echo "dmake has been successfully built"
|
|
|
|
cd ..
|
|
else
|
|
echo "dmake/dmake already built"
|
|
fi
|
|
fi
|
|
|
|
mkdir -p "$SOLARENV/$OUTPATH/bin"
|
|
if test "$BUILD_DMAKE" != "NO"; then
|
|
cp -f "$SRC_ROOT/dmake/dmake$EXEEXT" "$SOLARENV/$OUTPATH/bin" || exit
|
|
echo ""
|
|
echo "dmake copied to $SOLARENV/$OUTPATH/bin/dmake$EXEEXT"
|
|
fi
|
|
|
|
if test "$GUI" = "WNT" -a ! -x "$SOLARENV/$OUTPATH/bin/guw$EXEEXT"; then
|
|
echo ""
|
|
echo "Calling $GNUMAKE in guw"
|
|
cd "$SRC_ROOT/guw" || exit
|
|
$GNUMAKE || exit
|
|
echo ""
|
|
echo "guw has been successfully made"
|
|
cp -f "$SRC_ROOT/guw/guw$EXEEXT" "$SOLARENV/$OUTPATH/bin" || exit
|
|
echo ""
|
|
echo "guw copied to $SOLARENV/$OUTPATH/bin/guw$EXEEXT"
|
|
fi
|
|
|
|
#make sure build.pl is executable
|
|
|
|
chmod +x "$SRC_ROOT/solenv/bin/build.pl"
|
|
chmod +x "$SRC_ROOT/solenv/bin/build_client.pl"
|
|
chmod +x "$SRC_ROOT/solenv/bin/zipdep.pl"
|
|
chmod +x "$SRC_ROOT/solenv/bin/gccinstlib.pl"
|
|
|
|
# fetch or update external tarballs
|
|
if [ ! -d $SRC_ROOT/src ] ; then
|
|
mkdir $SRC_ROOT/src
|
|
fi
|
|
if [ "$DO_FETCH_TARBALLS" = "yes" ]; then
|
|
$SRC_ROOT/download $SRC_ROOT/ooo.lst
|
|
fi
|