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