source: rtems/scripts/mkgdbspec @ 1805015

4.104.114.84.95
Last change on this file since 1805015 was 1805015, checked in by Joel Sherrill <joel.sherrill@…>, on 10/20/99 at 15:49:13

Adding the infrastructure for gdb.

  • 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=/usr/src/redhat/SPECS
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
47rpm_release=0
48
49sed -e "s%@Release@%${rpm_release}%g" \
50    -e "s%@target_alias@%${target_alias}%g" \
51    -e "s%@gdb_version@%${gdb_version}%g" \
52    -e "s%@gdb_patch_version@%${gdb_patch_version}%g" \
53< ${RTEMS_DIR}/gdb.spec.in \
54> ${dst}/$target_alias-gdb.spec
55
56case ${target} in
57  powerpc*)
58     echo "/opt/rtems/bin/@target_alias@-run"
59     ;;
60  sparc*)
61     echo "/opt/rtems/bin/@target_alias@-run"
62     echo "/opt/rtems/bin/@target_alias@-sis"
63     ;;
64  *) ;;
65esac >> ${dst}/$target_alias-gdb.spec
66
67echo Generated ${dst}/$target_alias-gdb.spec.
Note: See TracBrowser for help on using the repository browser.