View | Details | Raw Unified | Return to issue 118604
Collapse All | Expand All

(-)a/main/bootstrap.1 (-2 / +100 lines)
Lines 3-12 Link Here
3
# Use spawn instead of fork when building dmake on cygwin. 
3
# Use spawn instead of fork when building dmake on cygwin. 
4
if test "$GUI" = "WNT"; then
4
if test "$GUI" = "WNT"; then
5
    EXEEXT=".exe"
5
    EXEEXT=".exe"
6
    DMAKE_CONF="--enable-spawn"
7
else
6
else
8
    EXEEXT=""
7
    EXEEXT=""
9
    DMAKE_CONF=""
10
fi
8
fi
11
export EXEEXT
9
export EXEEXT
12
10
Lines 14-19 export EXEEXT Link Here
14
# Build dmake
12
# Build dmake
15
13
16
if test "$BUILD_DMAKE" != "NO"; then
14
if test "$BUILD_DMAKE" != "NO"; then
15
    if test "$GUI" = "WNT"; then
16
        DMAKE_CONF="--enable-spawn"
17
    else
18
        DMAKE_CONF=""
19
    fi
20
17
21
18
    if test ! -x "$SOLARENV/$OUTPATH/bin/dmake$EXEEXT"; then
22
    if test ! -x "$SOLARENV/$OUTPATH/bin/dmake$EXEEXT"; then
19
23
Lines 52-64 if test "$BUILD_DMAKE" != "NO"; then Link Here
52
56
53
fi
57
fi
54
58
59
55
mkdir -p "$SOLARENV/$OUTPATH/bin"
60
mkdir -p "$SOLARENV/$OUTPATH/bin"
61
56
if test "$BUILD_DMAKE" != "NO"; then
62
if test "$BUILD_DMAKE" != "NO"; then
57
    cp -f "$SRC_ROOT/dmake/dmake$EXEEXT" "$SOLARENV/$OUTPATH/bin" || exit
63
    cp -f "$SRC_ROOT/dmake/dmake$EXEEXT" "$SOLARENV/$OUTPATH/bin" || exit
58
    echo ""
64
    echo ""
59
    echo "dmake copied to $SOLARENV/$OUTPATH/bin/dmake$EXEEXT"
65
    echo "dmake copied to $SOLARENV/$OUTPATH/bin/dmake$EXEEXT"
60
fi
66
fi
61
67
68
62
if test "$GUI" = "WNT" -a ! -x "$SOLARENV/$OUTPATH/bin/guw$EXEEXT"; then
69
if test "$GUI" = "WNT" -a ! -x "$SOLARENV/$OUTPATH/bin/guw$EXEEXT"; then
63
  echo ""
70
  echo ""
64
  echo "Calling $GNUMAKE in guw"
71
  echo "Calling $GNUMAKE in guw"
Lines 82-84 chmod +x "$SRC_ROOT/solenv/bin/gccinstlib.pl" Link Here
82
if [ "$DO_FETCH_TARBALLS" = "yes" ]; then
89
if [ "$DO_FETCH_TARBALLS" = "yes" ]; then
83
	$SRC_ROOT/fetch_tarballs.sh $SRC_ROOT/ooo.lst
90
	$SRC_ROOT/fetch_tarballs.sh $SRC_ROOT/ooo.lst
84
fi
91
fi
92
93
# ------------------------------------------------------------------------------
94
# Build dmake
95
96
if test -n "$DMAKE_URL" -a  ! -x "$SOLARENV/$OUTPATH/bin/dmake$EXEEXT"; then
97
98
    # Assume that the dmake archive has been downloaded by fetch_tarballs.sh
99
    # Determine the name of the downloaded file.
100
    dmake_package_name=`echo $DMAKE_URL | sed "s/^\(.*\/\)//"`
101
102
    tmp_build_dir="$SOLARENV/$OUTPATH/misc/build/"
103
    echo "making and entering $tmp_build_dir"
104
    # Clean up any residues from a previous and unsuccessful build.
105
    rm -rf "$tmp_build_dir"
106
    mkdir -p "$tmp_build_dir"
107
    cd "$tmp_build_dir" || exit
108
109
    dmake_full_package_name="$TARFILE_LOCATION/$dmake_package_name"
110
    if test "$GUI" = "WNT"; then
111
        dmake_full_package_name=`cygpath -u "$dmake_full_package_name"`
112
    fi
113
    echo "unpacking $dmake_full_package_name"
114
115
    # Unpack it.
116
    case $dmake_package_name in
117
        *.tar.gz)
118
            tar -xzf "$dmake_full_package_name"
119
            dmake_directory_name=`echo $dmake_package_name | sed "s/\(\.tar.gz\)//"`
120
            ;;
121
        *.tgz)
122
            tar -xzf "$dmake_full_package_name"
123
            dmake_directory_name=`echo $dmake_package_name | sed "s/\(\.tgz\)//"`
124
            ;;
125
        *.tar.bz2)
126
            tar -xjf "$dmake_full_package_name"
127
            dmake_directory_name=`echo $dmake_package_name | sed "s/\(\.tar.bz2\)//"`
128
            ;;
129
        *.zip)
130
            unzip "$dmake_full_package_name"
131
            dmake_directory_name=`echo $dmake_package_name | sed "s/\(\.zip\)//"`
132
            ;;
133
        *)
134
            echo "can not unpack the dmake source"
135
            dmake_directory_name=
136
            exit 1
137
            ;;        
138
    esac
139
140
    echo "entering $dmake_directory_name"
141
    cd "$dmake_directory_name" || exit
142
143
    # Special case! The w32/tcsh build needs CC pointing to the MSVC++ compiler
144
    # but we need a cygwin/gcc build dmake to understand the posix paths
145
    if test "$GUI" = "WNT"; then
146
        CC=""
147
        CXX=""
148
        export CC
149
        export CXX
150
        DMAKE_CONF="--enable-spawn"
151
    else
152
        DMAKE_CONF=""
153
    fi
154
155
    # For unixy systems
156
    if test -f "Makefile" ; then
157
        $GNUMAKE distclean || exit
158
    fi
159
160
    ./configure $DMAKE_CONF || exit
161
        
162
    ## invoke the gnu make command set by configure.
163
    $GNUMAKE || exit
164
165
166
    # Deploy the dmake executable to solenv
167
    cp -f "$tmp_build_dir/$dmake_directory_name/dmake$EXEEXT" "$SOLARENV/$OUTPATH/bin" || exit
168
    echo ""
169
    echo "dmake successfully built and copied to $SOLARENV/$OUTPATH/bin/dmake$EXEEXT"
170
    echo ""
171
172
    # Clean up.  Note that this is skipped when one of the exits is executed above.
173
    rm -rf "$tmp_build_dir"
174
175
else
176
177
    if test -x "$SOLARENV/$OUTPATH/bin/dmake$EXEEXT"; then
178
        echo ""
179
        echo "dmake present in $SOLARENV/$OUTPATH/bin/dmake$EXEEXT"
180
    fi
181
    
182
fi
(-)a/main/configure.in (-38 / +80 lines)
Lines 16-21 AC_REVISION( $Revision: 1.290 $ ) Link Here
16
AC_PREREQ(2.50)
16
AC_PREREQ(2.50)
17
AC_INIT()
17
AC_INIT()
18
echo "$@" >config.parms
18
echo "$@" >config.parms
19
AC_ARG_WITH(dmake-path,
20
[  --with-dmake-path=<PATH TO EXECUTABLE>   Specify the location of dmake ],
21
[  DMAKE_PATH="$withval"
22
])
23
AC_ARG_WITH(dmake-url,
24
[  --with-dmake-url=<URL>   Specify the location of downloadable dmake source code.
25
                          Note that dmake is under GPL license.],
26
[  DMAKE_URL="$withval"
27
])
19
AC_ARG_WITH(gnu-patch,
28
AC_ARG_WITH(gnu-patch,
20
[  --with-gnu-patch        Specify location of GNU patch on Solaris or FreeBSD
29
[  --with-gnu-patch        Specify location of GNU patch on Solaris or FreeBSD
21
],,)
30
],,)
Lines 1628-1633 fi Link Here
1628
AC_SUBST(GNUMAKE)
1637
AC_SUBST(GNUMAKE)
1629
1638
1630
dnl ===================================================================
1639
dnl ===================================================================
1640
dnl Search for a pre-installed dmake
1641
dnl ===================================================================
1642
AC_MSG_CHECKING([for dmake])
1643
AC_PATH_PROG(DMAKE, dmake, no)
1644
if test "$DMAKE" != "no"; then
1645
   AC_MSG_RESULT([using system dmake])
1646
else
1647
   # Did not find pre-installed dmake.
1648
   # Is it at a nonstandard location provided by --with-dmake-path ?
1649
   if test -n "$with_dmake_path" ; then
1650
      AC_PATH_PROG(DMAKE, dmake, no, "$with_dmake_path")
1651
      if test "$DMAKE" != "no"; then
1652
         AC_MSG_RESULT([using user provided dmake])
1653
      fi
1654
   fi
1655
fi
1656
1657
DMAKE_URL=
1658
BUILD_DMAKE=NO
1659
if test "$DMAKE" = "no"; then
1660
    AC_MSG_NOTICE([no system or user-provided dmake found])
1661
    # Check if a URL was supplied from which we can download the source and compile it.
1662
    if test -n "$with_dmake_url" ; then
1663
       # At this moment we can not verify the URL or the content that we want to download.
1664
       # Neither can we apply the test below for ruling out that it is the SunStudio dmake.
1665
       DMAKE_URL=$with_dmake_url
1666
       AC_MSG_RESULT([dmake will be downloaded and compiled in bootstrap])
1667
       DMAKE=
1668
    else
1669
       AC_MSG_WARN([no URL for dmake source code specified, either.])
1670
       BUILD_DMAKE=YES
1671
       AC_MSG_WARN([dmake will be built from internal sources but these will be removed in the future"])
1672
    fi
1673
else
1674
    AC_MSG_CHECKING([whether the found dmake is the right dmake])
1675
    # we need to find out whether that dmake we found is "our" dmake
1676
    # or the dmake from Sun's SunStudio Compiler which is something
1677
    # different
1678
    # This test _should_ work because the one accepts -V (ours) and one
1679
    # (the other) not...
1680
    $DMAKE -V 2>/dev/null | grep 'dmake .* Version .*' >/dev/null
1681
    if test $? -eq 0; then 
1682
       BUILD_DMAKE=NO
1683
       AC_MSG_RESULT([yes])
1684
       AC_MSG_CHECKING([the dmake version])
1685
       DMAKE_VERSION=`$DMAKE -V | $AWK '$3 == "Version" {print $4}'`
1686
       if test "`echo $DMAKE_VERSION | cut -d'.' -f1`" -gt "4"; then
1687
          AC_MSG_RESULT([OK, >= 4.11])
1688
       elif test "`echo $DMAKE_VERSION | cut -d'.' -f1`" = "4" && \
1689
	        test "`echo $DMAKE_VERSION | cut -d'.' -f2`" -ge "11"; then
1690
          AC_MSG_RESULT([OK, >= 4.11])
1691
       else
1692
          AC_MSG_ERROR([too old. >= 4.11 is needed])
1693
          DMAKE=no
1694
       fi
1695
    else
1696
       AC_MSG_WARN([no])
1697
       DMAKE=no
1698
       BUILD_DMAKE=YES
1699
       AC_MSG_WARN([dmake will be built from internal sources but these will be removed in the future"])
1700
    fi
1701
fi
1702
if test "$DMAKE" = "no"; then
1703
   AC_MSG_NOTICE([please use --with-dmake-path or --with-dmake-url to specify dmake executable or source])
1704
fi
1705
AC_SUBST(DMAKE_URL)
1706
AC_SUBST(DMAKE)
1707
AC_SUBST(BUILD_DMAKE)
1708
1709
1710
dnl ===================================================================
1631
dnl Search all the common names for GNU or BSD tar
1711
dnl Search all the common names for GNU or BSD tar
1632
dnl ===================================================================
1712
dnl ===================================================================
1633
AC_MSG_CHECKING([for GNU or BSD compatible tar])
1713
AC_MSG_CHECKING([for GNU or BSD compatible tar])
Lines 3234-3277 dnl =================================================================== Link Here
3234
dnl Checks for programs.
3314
dnl Checks for programs.
3235
dnl ===================================================================
3315
dnl ===================================================================
3236
3316
3237
dnl ===================================================================
3238
dnl Check whether we already have dmake
3239
dnl ===================================================================
3240
AC_PATH_PROG(DMAKE, dmake, no)
3241
if test "$DMAKE" = "no"; then
3242
    BUILD_DMAKE=YES
3243
    echo "dmake will be built on ./bootstrap"
3244
else
3245
    AC_MSG_CHECKING([whether the found dmake is the right dmake])
3246
    # we need to find out whether that dmake we found is "our" dmake
3247
    # or the dmake from Sun's SunStudio Compiler which is something
3248
    # different
3249
    # This test _should_ work because the one accepts -V (ours) and one
3250
    # (the other) not...
3251
    $DMAKE -V 2>/dev/null | grep 'dmake .* Version .*' >/dev/null
3252
    if test $? -eq 0; then 
3253
       BUILD_DMAKE=NO
3254
       AC_MSG_RESULT([yes])
3255
       AC_MSG_CHECKING([the dmake version])
3256
       DMAKE_VERSION=`$DMAKE -V | $AWK '$3 == "Version" {print $4}'`
3257
       if test "`echo $DMAKE_VERSION | cut -d'.' -f1`" -gt "4"; then
3258
	 AC_MSG_RESULT([OK, >= 4.11])
3259
       elif test "`echo $DMAKE_VERSION | cut -d'.' -f1`" = "4" && \
3260
	    test "`echo $DMAKE_VERSION | cut -d'.' -f2`" -ge "11"; then
3261
	 AC_MSG_RESULT([OK, >= 4.11])
3262
       else
3263
	 AC_MSG_RESULT([too old. >= 4.11 is needed])
3264
	 echo "A newer dmake will be built on ./bootstrap"
3265
	 BUILD_DMAKE=YES
3266
       fi
3267
    else
3268
       AC_MSG_RESULT([no])
3269
       echo "dmake will be built on ./bootstrap"
3270
       BUILD_DMAKE=YES
3271
    fi
3272
fi
3273
AC_SUBST(BUILD_DMAKE)
3274
3275
AC_MSG_CHECKING([whether to enable EPM for packing])
3317
AC_MSG_CHECKING([whether to enable EPM for packing])
3276
if test "$enable_epm" = "yes"; then
3318
if test "$enable_epm" = "yes"; then
3277
   AC_MSG_RESULT([yes])
3319
   AC_MSG_RESULT([yes])
(-)a/main/fetch_tarballs.sh (-1 / +37 lines)
Lines 106-114 start_dir=`pwd` Link Here
106
logfile=$TARFILE_LOCATION/fetch.log
106
logfile=$TARFILE_LOCATION/fetch.log
107
date >> $logfile
107
date >> $logfile
108
108
109
filelist=`cat $1`
109
# Create and go to a temporary directory under the tar file destination.
110
mkdir -p $TARFILE_LOCATION/tmp
110
mkdir -p $TARFILE_LOCATION/tmp
111
cd $TARFILE_LOCATION/tmp
111
cd $TARFILE_LOCATION/tmp
112
113
if [ -n "$DMAKE_URL" -a ! -x "$SOLARENV/$OUTPATH/bin/dmake$EXEEXT" ]; then
114
    # Determine the name of the downloaded file.
115
    dmake_package_name=`echo $DMAKE_URL | sed "s/^\(.*\/\)//"`
116
117
    if [ ! -f "../$dmake_package_name" ]; then
118
        # Fetch the dmake source
119
        if [ ! -z "$wget" ]; then
120
            echo fetching $DMAKE_URL with wget to $TARFILE_LOCATION/tmp
121
            $wget -nv -N $DMAKE_URL 2>&1 | tee -a $logfile
122
        else
123
            echo fetching $DMAKE_URL with curl to $TARFILE_LOCATION/tmp
124
            $curl $file_date_check -O $DMAKE_URL 2>&1 | tee -a $logfile
125
        fi
126
        wret=$?
127
128
        # When the download failed then remove the remains, otherwise
129
        # move the downloaded file up to TARFILE_LOCATION
130
        if [ $wret -ne 0 ]; then
131
            echo "download failed. removing $dmake_package_name"
132
            rm "$dmake_package_name"
133
            failed="$failed $i"
134
            wret=0
135
        else
136
            mv "$dmake_package_name" ..
137
            echo "successfully downloaded $dmake_package_name"
138
        fi
139
    else
140
        echo "found $dmake_package_name, no need to download it again"
141
    fi
142
fi
143
144
145
146
cd $TARFILE_LOCATION/tmp
147
filelist=`cat $1`
112
echo $$ > fetch-running
148
echo $$ > fetch-running
113
for i in $filelist ; do
149
for i in $filelist ; do
114
#    echo $i
150
#    echo $i
(-)a/main/set_soenv.in (+1 lines)
Lines 1976-1981 ToFile( "DISABLE_XAW", "@DISABLE_XAW@", "e" ); Link Here
1976
ToFile( "ENABLE_AGG",        "@ENABLE_AGG@",       "e" );
1976
ToFile( "ENABLE_AGG",        "@ENABLE_AGG@",       "e" );
1977
ToFile( "SYSTEM_AGG",	     "@SYSTEM_AGG@",       "e" );
1977
ToFile( "SYSTEM_AGG",	     "@SYSTEM_AGG@",       "e" );
1978
ToFile( "AGG_VERSION",	     "@AGG_VERSION@",      "e" );
1978
ToFile( "AGG_VERSION",	     "@AGG_VERSION@",      "e" );
1979
ToFile( "DMAKE_URL",         "@DMAKE_URL@",        "e" );
1979
ToFile( "BUILD_DMAKE",       "@BUILD_DMAKE@",      "e" );
1980
ToFile( "BUILD_DMAKE",       "@BUILD_DMAKE@",      "e" );
1980
ToFile( "BUILD_STAX",        "@BUILD_STAX@",       "e" );
1981
ToFile( "BUILD_STAX",        "@BUILD_STAX@",       "e" );
1981
ToFile( "BUILD_UNOWINREG",   "@BUILD_UNOWINREG@",  "e" );
1982
ToFile( "BUILD_UNOWINREG",   "@BUILD_UNOWINREG@",  "e" );

Return to issue 118604