source: rtems/scripts/mkgccnewlibspec.in @ f817b02

4.104.114.84.95
Last change on this file since f817b02 was f817b02, checked in by Joel Sherrill <joel.sherrill@…>, on Nov 4, 1999 at 6:05:09 PM

The files in libcpu should not be directly dependent on any BSP. In
particular, using bsp.h, or getting information from the BSP which
should properly be obtained from RTEMS is forbidden. This is
necessary to strengthen the division between the BSP independent
parts of RTEMS and the BSPs themselves. This started after
comments and analysis by Ralf Corsepius <corsepiu@…>.
The changes primarily eliminated the need to include bsp.h and
peeking at BSP_Configuration. The use of Cpu_table in each
BSP needs to be eliminated.

  • Property mode set to 100644
File size: 1.1 KB
Line 
1#!/bin/sh
2#
3#  Usage: mktoolspec CPU
4#
5
6RTEMS_DIR=`dirname $0`/@top_srcdir@
7
8CFG=setup.cache
9dst=@RPM_SPECSdir@
10
11usage()
12{
13  echo "$0 [options] <target_alias>"
14  echo "  options:"
15  echo "    -cfg <setup.cache>"
16  echo "    -o <rpm-spec-dir>"
17  exit 1 ;
18}
19
20specsrc=${RTEMS_DIR}/gccnewlib/gccnewlib.spec.in
21
22while test $# -ge 2; do
23case $1 in
24-cfg) 
25  shift
26  CFG=$1
27  shift
28  ;;
29-o)
30  shift
31  dst=$1
32  shift
33-a)        # alternate specs file
34  shift
35  specsrc=$1
36  shift
37  ;;
38-*)
39  echo "invalid option $1";
40  usage
41  ;;
42esac
43done
44
45if test ! $# -eq 1;
46then
47  echo "Invalid number of arguments"
48  usage
49fi
50
51# target to build for
52target_alias=$1
53
54. ./$CFG
55
56specfile=${dst}/$target_alias-gcc-${gcc_version}-newlib-${newlib_version}.spec
57
58sed -e "s%@Release@%${gccnewlib_rpm_release}%g" \
59    -e "s%@target_alias@%${target_alias}%g" \
60    -e "s%@rpm_build_root@%${rpm_build_root}%g" \
61    -e "s%@gcc_version@%${gcc_version}%g" \
62    -e "s%@gcc_patch_version@%${gcc_patch_version}%g" \
63    -e "s%@newlib_version@%${newlib_version}%g" \
64    -e "s%@newlib_patch_version@%${newlib_patch_version}%g" \
65< ${specsrc} \
66> ${specfile}
67
68echo Generated ${specfile}.
Note: See TracBrowser for help on using the repository browser.