source: rtems/scripts/mkgccnewlibspec.in @ 97d7eaf8

4.104.114.84.95
Last change on this file since 97d7eaf8 was 97d7eaf8, checked in by Joel Sherrill <joel.sherrill@…>, on Nov 18, 1999 at 8:37:29 PM

Added ";;" to correct syntactical error.

  • 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  ;;
34-a)        # alternate specs file
35  shift
36  specsrc=$1
37  shift
38  ;;
39-*)
40  echo "invalid option $1";
41  usage
42  ;;
43esac
44done
45
46if test ! $# -eq 1;
47then
48  echo "Invalid number of arguments"
49  usage
50fi
51
52# target to build for
53target_alias=$1
54
55. ./$CFG
56
57specfile=${dst}/$target_alias-gcc-${gcc_version}-newlib-${newlib_version}.spec
58
59sed -e "s%@Release@%${gccnewlib_rpm_release}%g" \
60    -e "s%@target_alias@%${target_alias}%g" \
61    -e "s%@rpm_build_root@%${rpm_build_root}%g" \
62    -e "s%@gcc_version@%${gcc_version}%g" \
63    -e "s%@gcc_patch_version@%${gcc_patch_version}%g" \
64    -e "s%@newlib_version@%${newlib_version}%g" \
65    -e "s%@newlib_patch_version@%${newlib_patch_version}%g" \
66< ${specsrc} \
67> ${specfile}
68
69echo Generated ${specfile}.
Note: See TracBrowser for help on using the repository browser.