blob: 796984a7d63e0967bf57ddb267b7421e24ea7606 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
#!/bin/sh
#
# Usage: mktoolspec CPU
#
RTEMS_DIR=`dirname $0`
RTEMS_VERSION=`grep Version ${RTEMS_DIR}/../VERSION | \
sed -e 's%RTEMS[ ]*Version[ ]*\(.*\)[ ]*%\1%g'`
target_alias=$1
release=0
# 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/;
then
dst=/usr/src/SPECS;
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" \
< ${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.
|