mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-25 13:57:15 +00:00
issue and has mkbspspec in a better state. user.cfg is now gone. There are some miscellaneous changes to buildall done by Joel to clean up the build process.
71 lines
1.1 KiB
Bash
71 lines
1.1 KiB
Bash
#!/bin/sh
|
|
#
|
|
# Usage: mkgdbspec CPU
|
|
#
|
|
|
|
RTEMS_DIR=`dirname $0`/@top_srcdir@
|
|
|
|
CFG=setup.cache
|
|
dst=@RPM_SPECSdir@
|
|
|
|
usage()
|
|
{
|
|
echo "$0 [options] <target_alias>"
|
|
echo " options:"
|
|
echo " -cfg <setup.cache>"
|
|
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
|
|
|
|
. ./$CFG
|
|
|
|
specfile=${dst}/$target_alias-gdb-${gdb_version}.spec
|
|
|
|
sed -e "s%@Release@%${gdb_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/gdb.spec.in \
|
|
> ${specfile}
|
|
|
|
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 >> ${specfile}
|
|
|
|
echo Generated ${specfile}
|