diff options
author | Chris Johns <chrisj@rtems.org> | 2006-08-27 12:44:08 +0000 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2006-08-27 12:44:08 +0000 |
commit | 5ceb567e4bf263147f9512ffe8577c60f28af1ec (patch) | |
tree | 480c7eaab55b2a4b76b18e3dc5d9abd9525f88a0 | |
parent | Move the target list into a shared file. (diff) | |
download | rtems-5ceb567e4bf263147f9512ffe8577c60f28af1ec.tar.bz2 |
Build the autotools for each RTEMS target.
-rwxr-xr-x | contrib/mingw/build-rpms.sh | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/contrib/mingw/build-rpms.sh b/contrib/mingw/build-rpms.sh index f6ecf8d3ae..451358d864 100755 --- a/contrib/mingw/build-rpms.sh +++ b/contrib/mingw/build-rpms.sh @@ -13,6 +13,8 @@ # Note: This file should be placed in crossrpms. # +source=$(dirname $0) + terminate() { echo "error: $*" >&2 @@ -32,10 +34,10 @@ version=4.7 base_tool_list="binutils gcc" -target_list="arm avr h8300 i386 m68k mips powerpc sh sparc tic4x" +target_list=$(cat $source/targets) host_list="cygwin freebsd5.2 freebsd6.0 freebsd6.1 mingw32" -rtems_tool_list="$base_tool_list" +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" @@ -62,7 +64,6 @@ rpm_prefix=custom- rpm_prefix_arg= local_rpm_database=yes clean=yes -source=$(pwd) while [ $# -gt 0 ]; do @@ -346,20 +347,34 @@ do do for s in ${rtems_tool_list} do - rpmbuild_cmd="-ba $prefix/rtems$version/$t/$rpm_prefix$t-rtems$version-$s.spec --target=$pth" + 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' $rpm_database $rpmbuild_cmd " + "--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 $rpm_database $rpmbuild_cmd" - $rpmbuild $rpm_database $rpmbuild_cmd + 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 |