diff options
author | Jürgen Schmidt <jsc@apache.org> | 2011-11-21 08:25:07 +0000 |
---|---|---|
committer | Jürgen Schmidt <jsc@apache.org> | 2011-11-21 08:25:07 +0000 |
commit | 5a16c1cd4c14b2bd6ec5858a674b63617a9ca274 (patch) | |
tree | 2436616c79802cef3c411eb2ef4d1077e88751f8 /bootstrap.1 | |
parent | 6934954fb243a22698e800b7051d7090a711082d (diff) |
118604: remove license incompatible dmake, thanks to André Fischer (af)
Diffstat (limited to 'bootstrap.1')
-rw-r--r-- | bootstrap.1 | 142 |
1 files changed, 92 insertions, 50 deletions
diff --git a/bootstrap.1 b/bootstrap.1 index 156f5625557a..fb065db43bba 100644 --- a/bootstrap.1 +++ b/bootstrap.1 @@ -3,61 +3,12 @@ # 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 "$SOLARENV/$OUTPATH/bin/dmake$EXEEXT"; then - - cd "$SRC_ROOT/dmake" || exit - - # 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 "" - echo "dmake present in $SOLARENV/$OUTPATH/bin/dmake$EXEEXT" - - 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 "" @@ -66,7 +17,7 @@ if test "$GUI" = "WNT" -a ! -x "$SOLARENV/$OUTPATH/bin/guw$EXEEXT"; then $GNUMAKE || exit echo "" echo "guw has been successfully made" - cp -f "$SRC_ROOT/guw/guw$EXEEXT" "$SOLARENV/$OUTPATH/bin" || exit + cp -f "$SRC_ROOT/guw/guw$EXEEXT" "$SOLARENV/$OUTPATH/bin/guw$EXEEXT" || exit echo "" echo "guw copied to $SOLARENV/$OUTPATH/bin/guw$EXEEXT" fi @@ -82,3 +33,94 @@ chmod +x "$SRC_ROOT/solenv/bin/gccinstlib.pl" if [ "$DO_FETCH_TARBALLS" = "yes" ]; then $SRC_ROOT/fetch_tarballs.sh $SRC_ROOT/ooo.lst fi + +# ------------------------------------------------------------------------------ +# Build dmake + +if test -n "$DMAKE_URL" -a ! -x "$SOLARENV/$OUTPATH/bin/dmake$EXEEXT"; then + + # Assume that the dmake archive has been downloaded by fetch_tarballs.sh + # Determine the name of the downloaded file. + dmake_package_name=`echo $DMAKE_URL | sed "s/^\(.*\/\)//"` + + tmp_build_dir="$SOLARENV/$OUTPATH/misc/build/" + echo "making and entering $tmp_build_dir" + # Clean up any residues from a previous and unsuccessful build. + rm -rf "$tmp_build_dir" + mkdir -p "$tmp_build_dir" + cd "$tmp_build_dir" || exit + + dmake_full_package_name="$TARFILE_LOCATION/$dmake_package_name" + if test "$GUI" = "WNT"; then + dmake_full_package_name=`cygpath -u "$dmake_full_package_name"` + fi + echo "unpacking $dmake_full_package_name" + + # Unpack it. + case $dmake_package_name in + *.tar.gz) + tar -xzf "$dmake_full_package_name" + dmake_directory_name=`echo $dmake_package_name | sed "s/\(\.tar.gz\)//"` + ;; + *.tgz) + tar -xzf "$dmake_full_package_name" + dmake_directory_name=`echo $dmake_package_name | sed "s/\(\.tgz\)//"` + ;; + *.tar.bz2) + tar -xjf "$dmake_full_package_name" + dmake_directory_name=`echo $dmake_package_name | sed "s/\(\.tar.bz2\)//"` + ;; + *.zip) + unzip "$dmake_full_package_name" + dmake_directory_name=`echo $dmake_package_name | sed "s/\(\.zip\)//"` + ;; + *) + echo "can not unpack the dmake source" + dmake_directory_name= + exit 1 + ;; + esac + + echo "entering $dmake_directory_name" + cd "$dmake_directory_name" || exit + + # 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 + DMAKE_CONF="--enable-spawn" + else + DMAKE_CONF="" + fi + + # For 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 + + + # Deploy the dmake executable to solenv + cp -f "$tmp_build_dir/$dmake_directory_name/dmake$EXEEXT" "$SOLARENV/$OUTPATH/bin/dmake$EXEEXT" || exit + echo "" + echo "dmake successfully built and copied to $SOLARENV/$OUTPATH/bin/dmake$EXEEXT" + echo "" + + # Clean up. Note that this is skipped when one of the exits is executed above. + rm -rf "$tmp_build_dir" + +else + + if test -x "$SOLARENV/$OUTPATH/bin/dmake$EXEEXT"; then + echo "" + echo "dmake present in $SOLARENV/$OUTPATH/bin/dmake$EXEEXT" + fi + +fi |