1 | #! /bin/sh |
---|
2 | # |
---|
3 | # Generate all the specs and then cycle through building them. |
---|
4 | # |
---|
5 | |
---|
6 | # This is the full list .. hppa1.1 does not build now. |
---|
7 | #ALL_TARGETS="hppa1.1-rtems i386-rtems i960-rtems m68k-rtems \ |
---|
8 | # m68k-rtemself mips64orion-rtems \ |
---|
9 | # powerpc-rtems sh-rtems sh-rtemself sparc-rtems" |
---|
10 | |
---|
11 | # This is the full buildable set. |
---|
12 | ALL_TARGETS="i386-rtems i960-rtems m68k-rtems \ |
---|
13 | m68k-rtemself mips64orion-rtems \ |
---|
14 | powerpc-rtems sh-rtems sh-rtemself sparc-rtems" |
---|
15 | |
---|
16 | # This is what we are building this time |
---|
17 | #TARGETS=${ALL_TARGETS} |
---|
18 | TARGETS="i386-rtems m68k-rtems powerpc-rtems sh-rtems" |
---|
19 | |
---|
20 | # Some linux distributions use /usr/src/packages |
---|
21 | # redhat uses /usr/src/redhat |
---|
22 | # others might use /usr/src |
---|
23 | if test -d /usr/src/packages/SPECS; |
---|
24 | then |
---|
25 | dst=/usr/src/packages/SPECS; |
---|
26 | elif test -d /usr/src/redhat/SPECS; |
---|
27 | then |
---|
28 | dst=/usr/src/redhat/SPECS; |
---|
29 | elif test -d /usr/src/SPECS/; |
---|
30 | then |
---|
31 | dst=/usr/src/SPECS; |
---|
32 | fi |
---|
33 | |
---|
34 | # Now generate all the specs |
---|
35 | for target in ${TARGETS} |
---|
36 | do |
---|
37 | ./mkspec ${target} |
---|
38 | done |
---|
39 | |
---|
40 | # clean up a bit before we start |
---|
41 | cd ${dst} |
---|
42 | test -d log || mkdir log |
---|
43 | |
---|
44 | # do all the binutils |
---|
45 | for target in ${TARGETS} |
---|
46 | do |
---|
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 |
---|
51 | |
---|
52 | # 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 |
---|
57 | |
---|
58 | # now build gcc/newlib |
---|
59 | # NOTE: This requires having binutils installed and we immediately |
---|
60 | # remove it once finished. |
---|
61 | rpm -i ${dst}/../RPMS/i386/${target}-binutils-19991011-0.i386.rpm |
---|
62 | |
---|
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 |
---|
67 | |
---|
68 | rpm -e `rpm -qa | grep rtems` |
---|
69 | done |
---|
70 | |
---|
71 | mv ${dst}/../RPMS/i386/*.rpm /usr3/rtems_cds/test_cd/RPMS |
---|
72 | mv ${dst}/../SRPMS/*.rpm /usr3/rtems_cds/test_cd/SRPMS |
---|
73 | |
---|
74 | exit 0 |
---|