Make the README.cross a bit more copy&paste proof
[LibreOffice.git] / bootstrap
blob1bf5068f02b70aa078e30a1cb8db6116b0a94c47
1 #!/bin/sh
3 if test -z "${SOLARENV}"; then
4 if test -f ./Env.Build.sh ; then
5 . ./Env.Build.sh
6 else
7 if test -f ./Env.Host.sh ; then
8 . ./Env.Host.sh
9 fi
12 if test -z "${SOLARENV}"; then
13 echo "bootstrap: No environment set!"
14 exit 1
17 # remove aliases set by Env.Host.sh
18 unalias mkout 2> /dev/null
19 unalias deliver 2> /dev/null
20 unalias build 2> /dev/null
21 unalias zipdep 2> /dev/null
23 # executables are *.exe for WNT. This variable is necessary since Cygwin 1.5.x
24 # Use spawn instead of fork when building dmake on cygwin.
25 if test "$GUI_FOR_BUILD" = "WNT"; then
26 EXEEXT=".exe"
27 DMAKE_CONF="--enable-spawn"
28 else
29 EXEEXT=""
30 DMAKE_CONF=""
32 export EXEEXT
34 # ------------------------------------------------------------------------------
35 # Build dmake
37 if test "$BUILD_DMAKE" != "NO"; then
38 if test ! -x "$SRC_ROOT/dmake/dmake$EXEEXT"; then
39 cd "$SRC_ROOT/dmake" || exit
41 # If cross-compiling then don't use the cross compilers to build dmake.
42 if test "$GUI_FOR_BUILD" = "WNT"; then
43 # Let the Cygwin gcc be found
44 unset CC CXX AR NM OBJDUMP PKG_CONFIG RANLIB STRIP
45 elif test "$CROSS_COMPILING" = "YES"; then
46 export CC="$CC_FOR_BUILD"
47 export CXX="$CXX_FOR_BUILD"
48 unset AR NM OBJDUMP PKG_CONFIG RANLIB STRIP
51 # For normal unixy systems
52 if test -f "Makefile" ; then
53 $GNUMAKE distclean || exit
56 ./configure $DMAKE_CONF || exit
58 ## invoke the gnu make command set by configure.
59 $GNUMAKE || exit
61 echo ""
62 echo "dmake has been successfully built"
64 cd ..
65 else
66 echo "dmake/dmake already built"
70 mkdir -p "$SOLARENV/$OUTPATH_FOR_BUILD/bin"
71 if test "$BUILD_DMAKE" != "NO"; then
72 cp -f "$SRC_ROOT/dmake/dmake$EXEEXT" "$SOLARENV/$OUTPATH_FOR_BUILD/bin" || exit
73 echo ""
74 echo "dmake copied to $SOLARENV/$OUTPATH_FOR_BUILD/bin/dmake$EXEEXT"
77 #make sure build.pl is executable
79 chmod +x "$SRC_ROOT/solenv/bin/build.pl"
80 chmod +x "$SRC_ROOT/solenv/bin/zipdep.pl"
81 chmod +x "$SRC_ROOT/solenv/bin/gccinstlib.pl"
83 # Local Variables:
84 # mode: shell-script
85 # tab-width: 4
86 # indent-tabs-mode: nil
87 # End:
89 # vim:set shiftwidth=4 softtabstop=4 expandtab: