blob: 08af71f174d02a3613f9767245b85b419ccd4345 (
plain) (
tree)
|
|
#!/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}/gccnewlib.spec.in \
> ${dst}/$target_alias-gcc_newlib.spec
echo Generated ${dst}/$target_alias-gcc_newlib.spec.
|