summaryrefslogtreecommitdiffstats
path: root/scripts/mkgdbspec.in
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1999-10-20 15:49:13 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1999-10-20 15:49:13 +0000
commit180501501edec8532c11b1a65c3bc599891334be (patch)
tree1c5b1b0e24bda5c23a78b0786c368e7ffa1fe608 /scripts/mkgdbspec.in
parentCorrected typo. (diff)
downloadrtems-180501501edec8532c11b1a65c3bc599891334be.tar.bz2
Adding the infrastructure for gdb.
Diffstat (limited to 'scripts/mkgdbspec.in')
-rw-r--r--scripts/mkgdbspec.in67
1 files changed, 67 insertions, 0 deletions
diff --git a/scripts/mkgdbspec.in b/scripts/mkgdbspec.in
new file mode 100644
index 0000000000..a115620c28
--- /dev/null
+++ b/scripts/mkgdbspec.in
@@ -0,0 +1,67 @@
+#!/bin/sh
+#
+# Usage: mkgdbspec CPU
+#
+
+RTEMS_DIR=`dirname $0`
+CFG=user.cfg
+dst=@RPM_SPECSdir@
+
+usage()
+
+ echo "$0 [options] <target_alias>"
+ echo " options:"
+ echo " -cfg <user.cfg>"
+ echo " -o <rpm-spec-dir>"
+ exit 1 ;
+
+
+while test $# -ge 2; do
+case $1 in
+-cfg)
+ shift
+ CFG=$1
+ shift
+ ;;
+-o)
+ shift
+ dst=$1
+ shift
+ ;;
+-*)
+ echo "invalid option $1";
+ usage
+ ;;
+esac
+done
+
+if test ! $# -eq 1;
+then
+ echo "Invalid number of arguments"
+ usage
+fi
+
+# target to build for
+target_alias=$1
+
+rpm_release=0
+
+sed -e "s%@Release@%${rpm_release}%g" \
+ -e "s%@target_alias@%${target_alias}%g" \
+ -e "s%@gdb_version@%${gdb_version}%g" \
+ -e "s%@gdb_patch_version@%${gdb_patch_version}%g" \
+< ${RTEMS_DIR}/gdb.spec.in \
+> ${dst}/$target_alias-gdb.spec
+
+case ${target} in
+ powerpc*)
+ echo "/opt/rtems/bin/@target_alias@-run"
+ ;;
+ sparc*)
+ echo "/opt/rtems/bin/@target_alias@-run"
+ echo "/opt/rtems/bin/@target_alias@-sis"
+ ;;
+ *) ;;
+esac >> ${dst}/$target_alias-gdb.spec
+
+echo Generated ${dst}/$target_alias-gdb.spec.