diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-10-20 15:49:13 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-10-20 15:49:13 +0000 |
commit | 180501501edec8532c11b1a65c3bc599891334be (patch) | |
tree | 1c5b1b0e24bda5c23a78b0786c368e7ffa1fe608 /scripts/mkgdbspec | |
parent | Corrected typo. (diff) | |
download | rtems-180501501edec8532c11b1a65c3bc599891334be.tar.bz2 |
Adding the infrastructure for gdb.
Diffstat (limited to 'scripts/mkgdbspec')
-rw-r--r-- | scripts/mkgdbspec | 62 |
1 files changed, 42 insertions, 20 deletions
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] <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 -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 |