diff options
author | cvs2git <rtems-devel@rtems.org> | 2007-03-05 20:53:28 +0000 |
---|---|---|
committer | cvs2git <rtems-devel@rtems.org> | 2007-03-05 20:53:28 +0000 |
commit | 5728225e7709ff3195b00215ecff50359c71070b (patch) | |
tree | c112a1ceeaf2cd3b28946e6e4ff20494da8d2fcf /contrib/mingw/build-rpms.sh | |
parent | 2007-03-05 Joel Sherrill <joel@OARcorp.com> (diff) | |
download | rtems-5728225e7709ff3195b00215ecff50359c71070b.tar.bz2 |
This commit was manufactured by cvs2svn to create tag 'rtems-4-7-0'.4.7.0
Sprout from rtems-4-7-branch 2007-03-05 20:53:27 UTC Joel Sherrill <joel.sherrill@OARcorp.com> '2007-03-05 Joel Sherrill <joel@OARcorp.com>'
Delete:
Makefile.maint
contrib/apt-conf/.cvsignore
contrib/apt-conf/COPYING
contrib/apt-conf/ChangeLog
contrib/apt-conf/INSTALL
contrib/apt-conf/Makefile.am
contrib/apt-conf/README
contrib/apt-conf/configure.ac
contrib/apt-conf/gpg/gpg-pubkey-eac29b6f-3fe1f458
contrib/apt-conf/rtems-apt-conf.spec.in
contrib/apt-conf/sources.list.d/rtems-4.6.list
contrib/apt-conf/sources.list.d/rtems-4.7.list
contrib/apt-conf/vendors.list.d/rtems.list
contrib/crossrpms/.cvsignore
contrib/crossrpms/AUTHORS
contrib/crossrpms/COPYING
contrib/crossrpms/ChangeLog
contrib/crossrpms/Makefile.am
contrib/crossrpms/NEWS
contrib/crossrpms/README
contrib/crossrpms/TODO
contrib/crossrpms/acinclude.m4
contrib/crossrpms/autotools/.cvsignore
contrib/crossrpms/autotools/Makefile.am
contrib/crossrpms/autotools/autoconf.add
contrib/crossrpms/autotools/autoconf.am
contrib/crossrpms/autotools/automake.add
contrib/crossrpms/autotools/automake.am
contrib/crossrpms/autotools/target-autoconf.add
contrib/crossrpms/autotools/target-automake.add
contrib/crossrpms/binutils/.cvsignore
contrib/crossrpms/binutils/base-binutils.add
contrib/crossrpms/binutils/binutils.add
contrib/crossrpms/binutils/build.add
contrib/crossrpms/binutils/install.add
contrib/crossrpms/binutils/prep.add
contrib/crossrpms/binutils/rpm-install.add
contrib/crossrpms/binutils/target-binutils.add
contrib/crossrpms/bootstrap
contrib/crossrpms/common/clean.add
contrib/crossrpms/common/common.add
contrib/crossrpms/configure.ac
contrib/crossrpms/gcc/base-g77.add
contrib/crossrpms/gcc/base-gcc.add
contrib/crossrpms/gcc/base-gcj.add
contrib/crossrpms/gcc/base-gfortran.add
contrib/crossrpms/gcc/base-gnat.add
contrib/crossrpms/gcc/base-newlib.add
contrib/crossrpms/gcc/build.add
contrib/crossrpms/gcc/gccnewlib.add
contrib/crossrpms/gcc/install.add
contrib/crossrpms/gcc/prep.add
contrib/crossrpms/gcc/rpm-install.add
contrib/crossrpms/gcc/target-c++.add
contrib/crossrpms/gcc/target-g77.add
contrib/crossrpms/gcc/target-gcc.add
contrib/crossrpms/gcc/target-gcj.add
contrib/crossrpms/gcc/target-gfortran.add
contrib/crossrpms/gcc/target-gnat.add
contrib/crossrpms/gcc/target-newlib.add
contrib/crossrpms/gcc/target-objc.add
contrib/crossrpms/gdb/base-gdb.add
contrib/crossrpms/gdb/build.add
contrib/crossrpms/gdb/gdb.add
contrib/crossrpms/gdb/install.add
contrib/crossrpms/gdb/prep.add
contrib/crossrpms/gdb/rpm-install.add
contrib/crossrpms/gdb/target-gdb.add
contrib/crossrpms/mkspec.am
contrib/crossrpms/patches/binutils-2.16.1-rtems-20050708.diff
contrib/crossrpms/patches/binutils-2.17-rtems4.7-20061021.diff
contrib/crossrpms/patches/gcc-core-4.0.3-rtems-20060822.diff
contrib/crossrpms/patches/gcc-core-4.1.1-rtems-20060720.diff
contrib/crossrpms/patches/gcc-core-4.1.1-rtems-20060908.diff
contrib/crossrpms/patches/gcc-core-4.1.1-rtems-20060909.diff
contrib/crossrpms/patches/gcc-core-4.1.1-rtems4.7-20070102.diff
contrib/crossrpms/patches/gcc-core-4.1.2-rtems4.7-20070216.diff
contrib/crossrpms/patches/gdb-6.4-rtems-20060311.diff
contrib/crossrpms/patches/gdb-6.4-rtems-20060712.diff
contrib/crossrpms/patches/gdb-6.5-rtems-20060713.diff
contrib/crossrpms/patches/gdb-6.6-rtems4.7-20070218.diff
contrib/crossrpms/patches/gdb-6.6-rtems4.7-20070222.diff
contrib/crossrpms/patches/newlib-1.14.0-rtems4.7-20061019.diff
contrib/crossrpms/patches/newlib-1.15.0-rtems4.7-20070208.diff
contrib/crossrpms/rtems4.7/.cvsignore
contrib/crossrpms/rtems4.7/Makefile.am
contrib/crossrpms/rtems4.7/arm/.cvsignore
contrib/crossrpms/rtems4.7/arm/Makefile.am
contrib/crossrpms/rtems4.7/arm/binutils-sources.add
contrib/crossrpms/rtems4.7/arm/gcc-sources.add
contrib/crossrpms/rtems4.7/arm/gdb-sources.add
contrib/crossrpms/rtems4.7/avr/.cvsignore
contrib/crossrpms/rtems4.7/avr/Makefile.am
contrib/crossrpms/rtems4.7/avr/binutils-sources.add
contrib/crossrpms/rtems4.7/avr/gcc-sources.add
contrib/crossrpms/rtems4.7/avr/gdb-sources.add
contrib/crossrpms/rtems4.7/binutils.am
contrib/crossrpms/rtems4.7/gcc-prep.add
contrib/crossrpms/rtems4.7/gcc.am
contrib/crossrpms/rtems4.7/gdb.am
contrib/crossrpms/rtems4.7/h8300/.cvsignore
contrib/crossrpms/rtems4.7/h8300/Makefile.am
contrib/crossrpms/rtems4.7/h8300/binutils-sources.add
contrib/crossrpms/rtems4.7/h8300/gcc-sources.add
contrib/crossrpms/rtems4.7/h8300/gdb-sources.add
contrib/crossrpms/rtems4.7/i386/.cvsignore
contrib/crossrpms/rtems4.7/i386/Makefile.am
contrib/crossrpms/rtems4.7/i386/binutils-sources.add
contrib/crossrpms/rtems4.7/i386/gcc-sources.add
contrib/crossrpms/rtems4.7/i386/gdb-sources.add
contrib/crossrpms/rtems4.7/m68k/.cvsignore
contrib/crossrpms/rtems4.7/m68k/Makefile.am
contrib/crossrpms/rtems4.7/m68k/binutils-sources.add
contrib/crossrpms/rtems4.7/m68k/gcc-sources.add
contrib/crossrpms/rtems4.7/m68k/gdb-sources.add
contrib/crossrpms/rtems4.7/mips/.cvsignore
contrib/crossrpms/rtems4.7/mips/Makefile.am
contrib/crossrpms/rtems4.7/mips/binutils-sources.add
contrib/crossrpms/rtems4.7/mips/gcc-sources.add
contrib/crossrpms/rtems4.7/mips/gdb-sources.add
contrib/crossrpms/rtems4.7/mipstx39/.cvsignore
contrib/crossrpms/rtems4.7/mipstx39/Makefile.am
contrib/crossrpms/rtems4.7/mipstx39/gdb-sources.add
contrib/crossrpms/rtems4.7/powerpc/.cvsignore
contrib/crossrpms/rtems4.7/powerpc/Makefile.am
contrib/crossrpms/rtems4.7/powerpc/binutils-sources.add
contrib/crossrpms/rtems4.7/powerpc/gcc-sources.add
contrib/crossrpms/rtems4.7/powerpc/gdb-sources.add
contrib/crossrpms/rtems4.7/sh/.cvsignore
contrib/crossrpms/rtems4.7/sh/Makefile.am
contrib/crossrpms/rtems4.7/sh/binutils-sources.add
contrib/crossrpms/rtems4.7/sh/gcc-sources.add
contrib/crossrpms/rtems4.7/sh/gdb-sources.add
contrib/crossrpms/rtems4.7/sparc/.cvsignore
contrib/crossrpms/rtems4.7/sparc/Makefile.am
contrib/crossrpms/rtems4.7/sparc/binutils-sources.add
contrib/crossrpms/rtems4.7/sparc/gcc-sources.add
contrib/crossrpms/rtems4.7/sparc/gdb-sources.add
contrib/crossrpms/specstrip
contrib/mingw/.cvsignore
contrib/mingw/AUTHORS
contrib/mingw/COPYING
contrib/mingw/ChangeLog
contrib/mingw/README
contrib/mingw/build-exes.sh
contrib/mingw/build-rpms.sh
contrib/mingw/build.sh
contrib/mingw/rtems-license.rtf
contrib/mingw/rtems-tools.nsi
contrib/mingw/rtems.ini
contrib/mingw/rtems_logo.bmp
contrib/mingw/targets
contrib/repo-conf/.cvsignore
contrib/repo-conf/AUTHORS
contrib/repo-conf/COPYING
contrib/repo-conf/ChangeLog
contrib/repo-conf/INSTALL
contrib/repo-conf/Makefile.am
contrib/repo-conf/NEWS
contrib/repo-conf/README
contrib/repo-conf/aclocal/version.m4
contrib/repo-conf/apt/sources.list.d/.cvsignore
contrib/repo-conf/apt/sources.list.d/rtems.list.in
contrib/repo-conf/apt/vendors.list.d/rtems.list
contrib/repo-conf/configure.ac
contrib/repo-conf/gpg/gpg-pubkey-69ce4a83-44cc2b30
contrib/repo-conf/gpg/gpg-pubkey-eac29b6f-3fe1f458
contrib/repo-conf/rtems-repo-conf.spec.in
contrib/repo-conf/yum.repos.d/.cvsignore
contrib/repo-conf/yum.repos.d/rtems.repo.in
contrib/rtemsrpms/.cvsignore
contrib/rtemsrpms/AUTHORS
contrib/rtemsrpms/COPYING
contrib/rtemsrpms/ChangeLog
contrib/rtemsrpms/INSTALL
contrib/rtemsrpms/Makefile.am
contrib/rtemsrpms/NEWS
contrib/rtemsrpms/README
contrib/rtemsrpms/bootstrap
contrib/rtemsrpms/configure.ac
contrib/rtemsrpms/rtems.spec.in
testsuites/samples/base_sp/.cvsignore
Diffstat (limited to 'contrib/mingw/build-rpms.sh')
-rwxr-xr-x | contrib/mingw/build-rpms.sh | 389 |
1 files changed, 0 insertions, 389 deletions
diff --git a/contrib/mingw/build-rpms.sh b/contrib/mingw/build-rpms.sh deleted file mode 100755 index 451358d864..0000000000 --- a/contrib/mingw/build-rpms.sh +++ /dev/null @@ -1,389 +0,0 @@ -#! /bin/sh -# -# $Id$ -# -# RTEMS Build RPM script. -# -# This script builds the RTEMS tools into RPM packages on a Linux Fedora host, -# and supports Canadian cross builds to other hosts. It is light sugar around -# the fine work of Ralf Corsepius thats actuallt builds the RPM files. -# -# We build all the targets for a given host. -# -# Note: This file should be placed in crossrpms. -# - -source=$(dirname $0) - -terminate() -{ - echo "error: $*" >&2 - exit 1 -} - -check() -{ - if [ $? -ne 0 ]; then - terminate - fi -} - -processor=$(uname -p) - -version=4.7 - -base_tool_list="binutils gcc" - -target_list=$(cat $source/targets) -host_list="cygwin freebsd5.2 freebsd6.0 freebsd6.1 mingw32" - -rtems_tool_list="autoconf automake $base_tool_list" -linux_tool_list="autoconf automake $base_tool_list" -cygwin_tool_list="w32api libs autoconf automake $base_tool_list" -freebsd_tool_list="libs autoconf automake $base_tool_list" -mingw32_tool_list="w32api libs autoconf automake $base_tool_list" - -cygwin_cc_name="pc" -freebsd_cc_name="pc" -mingw32_cc_name="pc" - -linux_cpu_list="$processor" -cygwin_cpu_list="i686" -freebsd_cpu_list="i586" -mingw32_cpu_list="i686" - -rpm_topdir=$(rpm --eval "%{_topdir}") - -prefix=/opt/rtems-$version -hosts=$host_list -build=$processor-linux-gnu -infos= -targets=$target_list -run_prefix= -rpm_prefix=custom- -rpm_prefix_arg= -local_rpm_database=yes -clean=yes - -while [ $# -gt 0 ]; -do - case $1 in - -c) - clean=no - ;; - -d) - set -x - ;; - -h) - shift - hosts=$1 - ;; - -i) - infos="--enable-infos" - ;; - -l) - shift - rpm_prefix=$1- - rpm_prefix_arg="--enable-rpmprefix=$rpm_label" - ;; - -n) - run_prefix="echo " - ;; - -p) - shift - prefix=$1 - ;; - -R) - local_rpm_database=no - ;; - -s) - shift - source=$1 - ;; - -t) - shift - targets=$1 - ;; - -v) - shift - version=$1 - ;; - --help) - echo "$0 -cdinr -o <output> -h <hosts>" \ - "-l <rpm prefix> -p <prefix> -s <source> -t <targets> -v <version>" - exit 2 - ;; - *) - terminate "error: invalid option (try --help): $1" - ;; - esac - shift -done - -for t in $targets; -do - if [ -z "$(echo $target_list | grep $t)" ]; then - terminate "error: invalid target: $t" - fi -done - -cd=${run_prefix}cd -configure=${run_prefix}${source}/configure -cp=${run_prefix}cp -make=${run_prefix}make -mkdir=${run_prefix}mkdir -rm=${run_prefix}rm -rpmbuild=${run_prefix}rpmbuild -rpm=${run_prefix}rpm - -if [ $local_rpm_database = yes ]; then - rpm_database="--dbpath $prefix/var/lib/rpm" -else - rpm_database= -fi - -echo " Source: $source" -echo " Prefix: $prefix" -echo " Hosts: $hosts" -echo "Targets: $targets" - -if [ ! -f $source/configure ]; then - terminate "$source/configure not found under: $source" -fi - -if [ x$prefix != x ]; then - if [ -e $prefix ]; then - if [ ! -d $prefix ]; then - terminate "$prefix is not a directory" - fi - else - echo "Creating $(pwd)" - $mkdir -p $prefix - check "making the prefix directory: $prefix" - fi -fi - -$cd $prefix -check "cannot change to the prefix directory: $prefix" - -if [ $clean = yes ]; then - echo "Cleaning: $(pwd)" - $rm -rf * -fi - -# -# Using a local RPM database means we do not need to be root to -# perform the build. -# -if [ $local_rpm_database = yes ]; then - echo "Creating private RPM database: $(pwd)/var/lib/rpm" - if [ ! -d /var/lib/rpm ]; then - terminate "no RPM database found on this host" - exit 1 - fi - if [ ! -d var/lib ]; then - $mkdir -p var/lib - check "making the local RPM database directory: var/lib" - fi - if [ $clean = yes -o ! -e var/lib/rpmPackages ]; then - echo "Coping RPM database to a local RPM database" - $cp -r /var/lib/rpm var/lib/rpm - check "coping the RPM database to the local database" - fi -fi - -# -# Set the path to the new directory. -# -export PATH=$prefix/bin:$PATH - -# -# Install the RPM. -# - -rpm_installer() -{ - local rpm_common= - local rpm_libs= - local rpm_tools= - local r - - local rpm_database=$1 - shift - local rpm_arch=$1 - shift - local rpm_path=$1 - shift - - # - # Get the names of the rpm files that have been built. This means we - # do not have maintain version info. - # - rpm_names=$(rpmbuild $rpm_database $* --nobuild 2> /dev/null | \ - grep -v "debuginfo" | grep "Process" | sed 's/Process.*\: //') - # - # If we have a base place that one first then libs then the tools. - # - for r in $rpm_names - do - if [ $(echo $r | sed 's/.*common.*/yes/') = yes ]; then - rpm_common="$rpm_common $r" - elif [ $(echo $r | sed 's/.*lib.*/yes/') = yes ]; then - rpm_libs="$rpm_libs $r" - elif [ $(echo $r | sed 's/.*sys\-root.*/yes/') = yes ]; then - rpm_libs="$rpm_libs $r" - else - rpm_tools="$rpm_tools $r" - fi - done - - for r in $rpm_common $rpm_libs $rpm_tools - do - echo "rpm $rpm_database --force" \ - "-i $rpm_path/$rpm_arch/$r.$rpm_arch.rpm" - $rpm $rpm_database --force -i $rpm_path/$rpm_arch/$r.$rpm_arch.rpm - check "installing the $r.$rpm_arch.rpm rpm failed" - done -} - -# -# Select the type of arch we have. -# - -rpm_arch() -{ - if [ $(echo $1 | sed 's/.*api.*/yes/') = yes ]; then - echo "noarch" - elif [ $(echo $1 | sed 's/.*lib.*/yes/') = yes ]; then - echo "noarch" - elif [ $(echo $1 | sed 's/.*auto.*/yes/') = yes ]; then - echo "noarch" - else - echo $2 - fi -} - -# -# We always build tools for the build host. We need them to -# build the libraries for the target processor. -# -hosts="linux $hosts" - -echo "Configuring target: all" -echo "configure --prefix=$prefix $rpm_prefix_arg " \ - " --target=all $infos" -$configure --prefix=$prefix $rpm_prefix_arg \ - --target=all \ - $infos -check "configuring the crossrpms failed" -echo "make" -$make -check "building the rpm spec files failed" -echo "make -C autotools" -$make -C autotools -check "building the rpm spec files failed" - -for h in $hosts; -do - # - # Need to translate the build host to an RTEMS host. Create a - # target host (th) and specs directory (sd) variable to handle - # the use of RTEMS. - # - if [ $h = "linux" ]; then - th="linux-gnu" - sd=rtems$version - canadian_cross=no - else - th=$h - sd=$h - canadian_cross=yes - fi - - # - # Associate the host to its tool list to get the packages to build. - # - tl=${h}_tool_list - pl=${h}_cpu_list - - echo "Native Host Tools: ${!tl} for ${!pl}" - echo "Canadian Cross: $canadian_cross ($t $h)" - - for p in ${!pl} - do - pth="$p-pc-$th" - - if [ $canadian_cross = yes ]; then - echo "make -C $sd/$p" - $make -C $sd/$p - check "building the rpm spec files failed: $sd/$p" - - for s in ${!tl} - do - case $s in - autoconf|automake) - # Hack around the prefix in the spec files for autotools. - ba="-ba $prefix/autotools/$rpm_prefix$s-rtems.spec" - ;; - *) - ba="-ba $prefix/$sd/$p/$rpm_prefix$pth-$s.spec" - esac - - rpmbuild_cmd="$ba --target=$build" - - echo "rpmbuild --define '_defaultdocdir $prefix/share/doc' $rpm_database $rpmbuild_cmd" - $rpmbuild --define "_defaultdocdir $prefix/share/doc" $rpm_database $rpmbuild_cmd - check "building the $sd/$p/$rpm_prefix$pth-$s rpm failed" - - rpm_installer "$rpm_database" \ - $(rpm_arch $rpm_prefix$pth-$s $processor) \ - $rpm_topdir/linux/RPMS \ - $rpmbuild_cmd - done - fi - done - - for t in $targets; - do - for s in ${rtems_tool_list} - do - case $s in - autoconf|automake) - # Hack around the prefix in the spec files for autotools. - ba="-ba $prefix/autotools/$rpm_prefix$s-rtems.spec" - ;; - *) - ba="-ba $prefix/rtems$version/$t/$rpm_prefix$t-rtems$version-$s.spec" - esac - - rpmbuild_cmd="$ba --target=$pth" - - if [ $canadian_cross = yes ]; then - ccl=${h}_cc_name - echo "rpmbuild --define '_build $processor-redhat-linux' " \ - "--define '_host $pth' " \ - "--define '_defaultdocdir $prefix/share/doc' " \ - "$rpm_database $rpmbuild_cmd " - $rpmbuild --define "_build $processor-redhat-linux" \ - --define "_host $pth" \ - --define "_defaultdocdir $prefix/share/doc" \ - --define "__cc $p-${!ccl}-$h-gcc" \ - $rpm_database $rpmbuild_cmd - check "building host cross target: $rpm_prefix$t-rtems$version-$s" - else - echo "rpmbuild --define '_defaultdocdir $prefix/share/doc' "\ - "$rpm_database $rpmbuild_cmd" - $rpmbuild --define "_defaultdocdir $prefix/share/doc" \ - $rpm_database $rpmbuild_cmd - check "building host cross target: $rpm_prefix$t-rtems$version-$s" - fi - - if [ $canadian_cross != yes ]; then - rpm_installer "$rpm_database" \ - $(rpm_arch $rpm_prefix$t-rtems$version-$s $p) \ - $rpm_topdir/$h/RPMS \ - $rpmbuild_cmd - fi - done - done -done |