Changeset 5f7b118 in rtems


Ignore:
Timestamp:
Oct 20, 1999, 3:29:35 PM (21 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
36b6704e
Parents:
10629f7
Message:

Restored joel's changes after merging old version from Ralf.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • scripts/buildall

    r10629f7 r5f7b118  
    33#  Generate all the specs and then cycle through building them.
    44#
     5
     6RTEMS_DIR=`dirname $0`
    57
    68# This is the full list .. hppa1.1 does not build now.
     
    1618# This is what we are building this time
    1719#TARGETS=${ALL_TARGETS}
    18 TARGETS="i386-rtems m68k-rtems powerpc-rtems sh-rtems"
     20TARGETS="sh-rtems"
     21
     22testing=no
     23
     24binutils=990901
     25gcc=2.95.1
     26gdb=4.18
     27newlib=1.8.2
     28buildroot=/opt/tmp
     29
     30#
     31#  Now get started
     32#
     33start=`date`
     34
     35
     36echo PATH=$PATH
     37
     38if [ ${testing} = yes ] ; then
     39  ECHO=echo
     40fi
     41
     42installed_count=`rpm -qa | grep rtems | wc -l`
     43if [ ${installed_count} -ne 0 ] ; then
     44  echo This script should be run with NO rtems RPMs installed.
     45  echo It appears that the following rtems RPMs are installed:
     46  echo
     47  rpm -qa | grep rtems
     48  echo
     49  echo Please remove these and restart this script.
     50  exit 1
     51fi
    1952
    2053# Some linux distributions use /usr/src/packages
     
    3568for target in ${TARGETS}
    3669do
    37   ./mkspec ${target}
     70  ${ECHO} ${RTEMS_DIR}/mkspec ${target}
    3871done
    3972
     
    4275test -d log || mkdir log
    4376
    44 #  do all the binutils
     77
     78#  do all the tools
    4579for target in ${TARGETS}
    4680do
    47   rpm -ba --buildroot=/opt/tmp \
    48      ${dst}/${target}-binutils.spec >log/${target}-binutils 2>&1
    49   rm -rf ${dst}/../BUILD/${target}-binutils
    50   rm -rf /opt/tmp/opt
     81  logfile=log/${target}-binutils
     82  specfile=${dst}/${target}-binutils-${binutils}.spec
     83  echo "rpm -ba --buildroot=${buildroot} ${specfile} >${logfile} 2>&1"
     84  if [ ${testing} = no ] ; then
     85    rpm -ba --buildroot=${buildroot} ${specfile} >${logfile} 2>&1
     86  fi
     87  ${ECHO} rm -rf ${dst}/../BUILD/${target}-binutils*
     88  ${ECHO} rm -rf ${buildroot}/opt
    5189
    5290  # now build gdb
    53   rpm -ba --buildroot=/opt/tmp \
    54      ${dst}/${target}-gdb.spec >log/${target}-gdb 2>&1
    55   rm -rf ${dst}/../BUILD/${target}-gdb
    56   rm -rf /opt/tmp/opt
     91  logfile=log/${target}-gdb
     92  specfile=${dst}/${target}-gdb-${gdb}.spec
     93  echo "rpm -ba --buildroot=${buildroot} ${specfile} >${logfile} 2>&1"
     94  if [ ${testing} = no ] ; then
     95    rpm -ba --buildroot=${buildroot} ${specfile} >${logfile} 2>&1
     96  fi
     97  ${ECHO} rm -rf ${dst}/../BUILD/${target}-gdb*
     98  ${ECHO} rm -rf ${buildroot}/opt
    5799
    58100  # now build gcc/newlib
    59101  #    NOTE: This requires having binutils installed and we immediately
    60102  #          remove it once finished.
    61   rpm -i ${dst}/../RPMS/i386/${target}-binutils-19991011-0.i386.rpm
     103  ${ECHO} rpm -i ${dst}/../RPMS/i386/${target}-binutils-${binutils}-0.i386.rpm
    62104
    63   rpm -ba --buildroot=/opt/tmp \
    64      ${dst}/${target}-gcc_newlib.spec >log/${target}-gccnewlib 2>&1
    65   rm -rf ${dst}/../BUILD/${target}-gcc_newlib
    66   rm -rf /opt/tmp/opt
     105  logfile=log/${target}-gccnewlib
     106  specfile=${dst}/${target}-gcc-${gcc}-newlib-${newlib}.spec
     107  echo "rpm -ba --buildroot=${buildroot} ${specfile} >${logfile} 2>&1"
     108  if [ ${testing} = no ] ; then
     109    rpm -ba --buildroot=${buildroot} ${specfile} >${logfile} 2>&1
     110  fi
     111  ${ECHO} rm -rf ${dst}/../BUILD/${target}-gcc*
     112  ${ECHO} rm -rf ${buildroot}/opt
    67113
    68   rpm -e `rpm -qa | grep rtems`
     114  echo uninstalling binutils for ${target}
     115  if [ ${testing} = no ] ; then
     116    rpm -e `rpm -qa | grep rtems`
     117  fi
    69118done
    70119
    71 mv ${dst}/../RPMS/i386/*.rpm /usr3/rtems_cds/test_cd/RPMS
    72 mv ${dst}/../SRPMS/*.rpm /usr3/rtems_cds/test_cd/SRPMS
     120staging_dir=/usr3/rtems_cds/test_cd/linux
    73121
     122${ECHO} mkdir ${staging_dir}
     123${ECHO} mkdir ${staging_dir}/RPMS
     124${ECHO} mkdir ${staging_dir}/SRPMS
     125
     126echo Moving RPMs to CD staging directory
     127for file in `ls -1 ${dst}/../RPMS/i386/*.rpm 2>/dev/null`
     128do
     129  ${ECHO} mv ${file} ${staging_dir}/RPMS
     130done
     131
     132echo Moving SRPMs to CD staging directory
     133for file in `ls -1 ${dst}/../SRPMS/*.rpm 2>/dev/null`
     134do
     135  ${ECHO} mv ${file} ${staging_dir}/SRPMS
     136done
     137
     138# Now we are done
     139
     140stop=`date`
     141
     142echo
     143echo "Started:  " $start
     144echo "Finished: " $stop
    74145exit 0
Note: See TracChangeset for help on using the changeset viewer.