source: rtems/scripts/gdb/mkspec.in @ 1a58b1f9

4.104.114.84.95
Last change on this file since 1a58b1f9 was 1a58b1f9, checked in by Ralf Corsepius <ralf.corsepius@…>, on 03/17/05 at 13:42:17

2005-03-17 Ralf Corsepius <ralf.corsepius@…>

  • gdb/Makefile.am: Add avr, mips64. Cosmetics.
  • gdb/base-gdb.add: Reflect gdb-6.3 not shipping mmalloc.info*.
  • gdb/target-gdb.add: Add support for gcc-6.3's gdbtui.
  • gdb/mkspec.in: Add PATCH-magic. Add gdb_suffix.
  • Property mode set to 100644
File size: 1.3 KB
RevLine 
[1805015]1#!/bin/sh
2#
[c86d8e7f]3#  Usage: mkspec CPU
[1805015]4#
5
[43e7d103]6RTEMS_DIR=`dirname $0`/@top_srcdir@
7
[c86d8e7f]8CFG=../setup.cache
[1805015]9
[c86d8e7f]10specsrc=${RTEMS_DIR}/gdb/gdb.spec.in
11
[1805015]12usage()
[8ace612e]13{
[1805015]14  echo "$0 [options] <target_alias>"
15  echo "  options:"
[43e7d103]16  echo "    -cfg <setup.cache>"
[c86d8e7f]17  echo "    -a <alternate specs.in>"
[1805015]18  exit 1 ;
[8ace612e]19}
[1805015]20
21while test $# -ge 2; do
22case $1 in
23-cfg)
24  shift
25  CFG=$1
26  shift
27  ;;
[c86d8e7f]28-a)        # alternate specs file
[1805015]29  shift
[c86d8e7f]30  specsrc=$1
[1805015]31  shift
32  ;;
33-*)
34  echo "invalid option $1";
35  usage
36  ;;
37esac
38done
39
40if test ! $# -eq 1;
41then
42  echo "Invalid number of arguments"
43  usage
44fi
45
46# target to build for
47target_alias=$1
48
[8ace612e]49. ./$CFG
50
[1a58b1f9]51patchn=-1
52if test -n "${gdb_patch_version}"; then
53patchn=`expr $patchn + 1`
54PATCH1="Patch${patchn}: gdb-${gdb_version}-rtems-${gdb_patch_version}.diff"
55PATCH2="%patch${patchn} -p0"
56fi
57
58sed -e "s,@PATCH1\@,${PATCH1}," \
59    -e "s,@PATCH2\@,${PATCH2}," \
60    -e "s%@Release\@%${gdb_rpm_release}%g" \
[620c972]61    -e "s,@rpm_build_root\@,${rpm_build_root},g" \
[c86d8e7f]62    -e "s%@prefix\@%@prefix@%g" \
[64cc4bb5]63    -e "s%@target_alias\@%${target_alias}%g" \
[f8f365a6]64    -e "s,@rpmprefix\@,@rpmprefix@,g" \
65    -e "s%@rpmgroup\@%@rpmgroup@%g" \
66    -e "s%@osversion\@%@osversion@%g" \
[64cc4bb5]67    -e "s%@gdb_version\@%${gdb_version}%g" \
68    -e "s%@gdb_patch_version\@%${gdb_patch_version}%g" \
[1a58b1f9]69    -e "s%@gdb_suffix\@%${gdb_suffix}%g" \
[64cc4bb5]70    -e "s%@extra_configure_arguments\@%${extra_configure_arguments}%g" \
[c86d8e7f]71< ${specsrc}
Note: See TracBrowser for help on using the repository browser.