URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [rtos/] [rtems/] [scripts-ada/] [buildall.in] - Rev 173
Compare with Previous | Blame | View Log
#! /bin/sh## Generate all the specs and then cycle through building them.#RTEMS_DIR=`dirname $0`CFG=./setup.cachedst=@RPM_SPECSdir@usage(){echo "$0 [options] <target_alias>"echo " options:"echo " -cfg <setup.cache>"echo " -o <rpm-spec-dir>"exit 1 ;}while test $# -ge 1; docase $1 in-cfg)test $# -ge 2 || usageshiftCFG=$1shift;;-o)test $# -ge 2 || usageshiftdst=$1shift;;-*)echo "invalid option $1";usage;;*)TARGETS="${TARGETS} $1"shift;;esacdone# This is the full list .. hppa1.1 does not build now.#ALL_TARGETS="hppa1.1-rtems i386-rtems i960-rtems m68k-rtems \# m68k-rtemself mips64orion-rtems \# powerpc-rtems sh-rtems sh-rtemself sparc-rtems"# This is the full buildable set.if [ "X${TARGETS}" = "X" ] ; thenTARGETS="i386-rtems i960-rtems m68k-rtems \mips64orion-rtems powerpc-rtems sh-rtems sparc-rtems"fi. $CFGbinutils=${binutils_version}gcc=${gcc_version}gnat=${gnat_version}gdb=${gdb_version}newlib=${newlib_version}# also use binutils_rpm_releasebuildroot=/tmptesting=nodo_binutils=no # binutils included in gnatnewlibdo_gnatnewlib=yesdo_gdb=yes## Now get started#start=`date`echo PATH=$PATHif [ ${testing} = yes ] ; thenECHO=echofiinstalled_count=`rpm -q -g gnatrtems | wc -l`if [ ${installed_count} -ne 0 ] ; thenecho This script should be run with NO rtems RPMs installed.echo It appears that the following rtems RPMs are installed:echorpm -qa | grep rtemsechoecho Please remove these and restart this script.exit 1fiecho Copying specs files.if [ ${testing} = no ] ; thencd ${RTEMS_DIR}# ./configure || exit 1make || exit 1# Now generate all the specsfor target in ${TARGETS}dotspecs=`find . -name "${target}*"`if [ "X${tspecs}" = "X" ] ; thenecho RPM specifications were not generated for ${tspec}.exit 1fi${ECHO} cp -r ${tspecs} ${dst}donefi# clean up a bit before we startcd ${dst}test -d log || mkdir log# do all the toolsfor target in ${TARGETS}doif [ ${do_binutils} = yes ] ; thenlogfile=log/${target}-binutilsspecfile=${dst}/${target}-gnat-${gnat}-binutils-${binutils}.spececho "rpm -ba ${specfile} >${logfile} 2>&1"if [ ${testing} = no ] ; thenrpm -ba ${specfile} >${logfile} 2>&1fi${ECHO} rm -rf ${dst}/../BUILD/${target}-binutils*${ECHO} rm -rf ${buildroot}/opt/gnatrtemselseecho Skipping binutils for ${target}fi## build gcc/newlib#if [ ${do_gnatnewlib} = yes ] ; then# now build gcc/newlib# NOTE: This requires having binutils installed and we immediately# remove it once finished.# base_binutils_rpm=${dst}/../RPMS/i386/rtems-base-binutils-${binutils}-${binutils_rpm_release}.i386.rpm# binutils_rpm=${dst}/../RPMS/i386/${target}-binutils-${binutils}-${binutils_rpm_release}.i386.rpm# if [ ! -f ${binutils_rpm} ] ; then# echo There is no RPM for binutils for ${target}.# echo Looked for ${binutils_rpm}.# fi# ${ECHO} rpm -i ${base_binutils_rpm}# ${ECHO} rpm -i ${binutils_rpm}logfile=log/${target}-gnatnewlibspecfile=${dst}/${target}-gnat-${gnat}-newlib-${newlib}.spececho "rpm -ba ${specfile} >${logfile} 2>&1"if [ ${testing} = no ] ; thenrpm -ba ${specfile} >${logfile} 2>&1fi${ECHO} rm -rf ${dst}/../BUILD/${target}-gcc*${ECHO} rm -rf ${buildroot}/opt/gnatrtems# echo uninstalling binutils for ${target}# if [ ${testing} = no ] ; then# rpm -e `rpm -qa | grep rtems`# rm -rf /opt/gnatrtems/*# fielseecho Skipping gcc/newlib for ${target}fi## build gdb#if [ ${do_gdb} = yes ] ; then# now build gdblogfile=log/${target}-gdbspecfile=${dst}/${target}-gnat-${gnat}-gdb-${gdb}.spececho "rpm -ba ${specfile} >${logfile} 2>&1"if [ ${testing} = no ] ; thenrpm -ba ${specfile} >${logfile} 2>&1fi${ECHO} rm -rf ${dst}/../BUILD/${target}-gdb*${ECHO} rm -rf ${buildroot}/opt/gnatrtemselseecho Skipping gdb for ${target}fidone# Now we are donestop=`date`echoecho "Started: " $startecho "Finished: " $stopexit 0
