From 180501501edec8532c11b1a65c3bc599891334be Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 20 Oct 1999 15:49:13 +0000 Subject: Adding the infrastructure for gdb. --- scripts/mkgdbspec | 62 +++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 42 insertions(+), 20 deletions(-) (limited to 'scripts/mkgdbspec') diff --git a/scripts/mkgdbspec b/scripts/mkgdbspec index 796984a7d6..b14b50e3e7 100644 --- a/scripts/mkgdbspec +++ b/scripts/mkgdbspec @@ -1,33 +1,55 @@ #!/bin/sh # -# Usage: mktoolspec CPU +# Usage: mkgdbspec CPU # RTEMS_DIR=`dirname $0` -RTEMS_VERSION=`grep Version ${RTEMS_DIR}/../VERSION | \ -sed -e 's%RTEMS[ ]*Version[ ]*\(.*\)[ ]*%\1%g'` +CFG=user.cfg +dst=/usr/src/redhat/SPECS -target_alias=$1 -release=0 +usage() -# Some linux distributions use /usr/src/packages -# redhat uses /usr/src/redhat -# others might use /usr/src -if test -d /usr/src/packages/SPECS; -then -dst=/usr/src/packages/SPECS; -elif test -d /usr/src/redhat/SPECS; - then -dst=/usr/src/redhat/SPECS; -elif test -d /usr/src/SPECS/; + echo "$0 [options] " + echo " options:" + echo " -cfg " + echo " -o " + 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 -dst=/usr/src/SPECS; + echo "Invalid number of arguments" + usage fi -sed -e "s%@Version@%${RTEMS_VERSION}%g" \ --e "s%@bsp@%${bsp}%g" \ --e "s%@Release@%${release}%g" \ --e "s%@target_alias@%${target_alias}%g" \ +# 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 -- cgit v1.2.3