source: rtems/scripts/mkgdbspec.in @ 431c35d

4.104.114.84.95
Last change on this file since 431c35d was 431c35d, checked in by Joel Sherrill <joel.sherrill@…>, on Oct 20, 1999 at 7:59:01 PM

Miscellaneous improvements and cleanups committed so I can merge
Ralf's end of day version.

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