source: rtems/scripts/buildall @ 7815d96

4.104.114.84.95
Last change on this file since 7815d96 was 7815d96, checked in by Joel Sherrill <joel.sherrill@…>, on 10/19/99 at 22:27:13

Left to build overnight.

  • Property mode set to 100644
File size: 2.9 KB
Line 
1#! /bin/sh
2#
3#  Generate all the specs and then cycle through building them.
4#
5
6RTEMS_DIR=`dirname $0`
7
8# This is the full list .. hppa1.1 does not build now.
9#ALL_TARGETS="hppa1.1-rtems i386-rtems i960-rtems m68k-rtems \
10#  m68k-rtemself mips64orion-rtems \
11#  powerpc-rtems sh-rtems sh-rtemself sparc-rtems"
12
13# This is the full buildable set.
14ALL_TARGETS="i386-rtems i960-rtems m68k-rtems \
15  m68k-rtemself mips64orion-rtems \
16  powerpc-rtems sh-rtems sh-rtemself sparc-rtems"
17
18# This is what we are building this time
19TARGETS=${ALL_TARGETS}
20#TARGETS="sh-rtems"
21
22testing=no
23
24echo PATH=$PATH
25
26if [ ${testing} = yes ] ; then
27  ECHO=echo
28fi
29
30# Some linux distributions use /usr/src/packages
31# redhat uses /usr/src/redhat
32# others might use /usr/src
33if test -d /usr/src/packages/SPECS;
34then
35dst=/usr/src/packages/SPECS;
36elif test -d /usr/src/redhat/SPECS;
37 then
38dst=/usr/src/redhat/SPECS;
39elif test -d /usr/src/SPECS/;
40then
41dst=/usr/src/SPECS;
42fi
43
44#  Now generate all the specs
45for target in ${TARGETS}
46do
47  ${ECHO} ${RTEMS_DIR}/mkspec ${target}
48done
49
50# clean up a bit before we start
51cd ${dst}
52test -d log || mkdir log
53
54binutils=990901
55gcc=2.95.1
56gdb=4.18
57newlib=1.8.2
58
59#  do all the binutils
60for target in ${TARGETS}
61do
62  echo "rpm -ba --buildroot=/opt/tmp \
63     ${dst}/${target}-binutils-${binutils}.spec >log/${target}-binutils 2>&1"
64  if [ ${testing} = no ] ; then
65    rpm -ba --buildroot=/opt/tmp \
66       ${dst}/${target}-binutils-${binutils}.spec >log/${target}-binutils 2>&1
67  fi
68  ${ECHO} rm -rf ${dst}/../BUILD/${target}-binutils*
69  ${ECHO} rm -rf /opt/tmp/opt
70
71  # now build gdb
72  echo "rpm -ba --buildroot=/opt/tmp \
73     ${dst}/${target}-gdb-${gdb}.spec >log/${target}-gdb 2>&1"
74  if [ ${testing} = no ] ; then
75    rpm -ba --buildroot=/opt/tmp \
76       ${dst}/${target}-gdb-${gdb}.spec >log/${target}-gdb 2>&1
77  fi
78  ${ECHO} rm -rf ${dst}/../BUILD/${target}-gdb*
79  ${ECHO} rm -rf /opt/tmp/opt
80
81  # now build gcc/newlib
82  #    NOTE: This requires having binutils installed and we immediately
83  #          remove it once finished.
84  ${ECHO} rpm -i ${dst}/../RPMS/i386/${target}-binutils-${binutils}-0.i386.rpm
85
86  echo "rpm -ba --buildroot=/opt/tmp \
87     ${dst}/${target}-gcc-${gcc}-newlib-${newlib}.spec >log/${target}-gccnewlib 2>&1"
88  if [ ${testing} = no ] ; then
89    rpm -ba --buildroot=/opt/tmp \
90       ${dst}/${target}-gcc-${gcc}-newlib-${newlib}.spec >log/${target}-gccnewlib 2>&1
91  fi
92  ${ECHO} rm -rf ${dst}/../BUILD/${target}-gcc*
93  ${ECHO} rm -rf /opt/tmp/opt
94
95  echo uninstalling binutils for ${target}
96  if [ ${testing} = no ] ; then
97    rpm -e `rpm -qa | grep rtems`
98  fi
99done
100
101echo Moving RPMs to CD staging directory
102for file in `ls -1 ${dst}/../RPMS/i386/*.rpm 2>/dev/null`
103do
104  ${ECHO} mv ${file} /usr3/rtems_cds/test_cd/RPMS
105done
106
107echo Moving SRPMs to CD staging directory
108for file in `ls -1 ${dst}/../SRPMS/*.rpm 2>/dev/null`
109do
110  ${ECHO} mv ${file} /usr3/rtems_cds/test_cd/SRPMS
111done
112
113exit 0
Note: See TracBrowser for help on using the repository browser.