Merged revisions 143552,143554,143557,143560,143562,143564-143567,143570-143573,14357...
[official-gcc.git] / contrib / reghunt / bin / gcc-build-full
blob21e6d684fedeb1873fa7bfa78b3ee21ee78e28fa
1 #! /bin/sh
3 # Perform a simple build of GCC for a particular language, using several
4 # environment variables defined by reghunt scripts and config files.
6 # Copyright (C) 2007 Free Software Foundation.
8 # This file is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 3 of the License, or
11 # (at your option) any later version.
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # For a copy of the GNU General Public License, write the the
19 # Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 # Boston, MA 02111-1301, USA.
22 abort() {
23 echo "`date` $1"
24 exit 1
27 ID=$1
28 LOGDIR=${REG_BUILDDIR}/logs/${BUGID}/${ID}
29 mkdir -p $LOGDIR
31 echo "`date` building GCC ($REG_LANGS) for id ${ID}"
33 cd $REG_BUILDDIR
34 rm -rf obj
35 mkdir obj
36 cd obj
38 echo "REG_CONFOPTS = $REG_CONFOPTS" > ${LOGDIR}/configure.log
39 echo "REG_PREFIX = $REG_PREFIX" >> ${LOGDIR}/configure.log
40 echo "REG_LANGS = $REG_LANGS" >> ${LOGDIR}/configure.log
41 echo >> ${LOGDIR}/configure.log
43 ${REG_GCCSRC}/configure \
44 --prefix=$REG_PREFIX \
45 $REG_CONFOPTS \
46 --enable-languages=$REG_LANGS \
47 >> ${LOGDIR}/configure.log 2>&1 || abort " configure failed"
49 make $REG_MAKE_J > ${LOGDIR}/make.log 2>&1 || abort " make failed"
50 make install > ${LOGDIR}/make.install.log 2>&1 || abort " make install failed"
52 exit 0