source: rtems/scripts/mkgccnewlibspec.in @ 7063e223

4.104.114.84.95
Last change on this file since 7063e223 was 7063e223, checked in by Joel Sherrill <joel.sherrill@…>, on 10/21/99 at 17:22:02

Made the RTEMS version get substituted properly even though it is
not right yet.

Now can specify rpm_build_root via setup.

  • Property mode set to 100644
File size: 1.0 KB
RevLine 
[10629f7]1#!/bin/sh
2#
3#  Usage: mktoolspec CPU
4#
5
[43e7d103]6RTEMS_DIR=`dirname $0`/@top_srcdir@
[10629f7]7
[43e7d103]8CFG=setup.cache
[10629f7]9dst=@RPM_SPECSdir@
10
11usage()
12{
13  echo "$0 [options] <target_alias>"
14  echo "  options:"
[43e7d103]15  echo "    -cfg <setup.cache>"
[10629f7]16  echo "    -o <rpm-spec-dir>"
17  exit 1 ;
18}
19
20while test $# -ge 2; do
21case $1 in
22-cfg)
23  shift
24  CFG=$1
25  shift
26  ;;
27-o)
28  shift
29  dst=$1
30  shift
31  ;;
32-*)
33  echo "invalid option $1";
34  usage
35  ;;
36esac
37done
38
39if test ! $# -eq 1;
40then
41  echo "Invalid number of arguments"
42  usage
43fi
44
45# target to build for
46target_alias=$1
47
48. ./$CFG
49
50specfile=${dst}/$target_alias-gcc-${gcc_version}-newlib-${newlib_version}.spec
51
[431c35d]52sed -e "s%@Release@%${gccnewlib_rpm_release}%g" \
[10629f7]53    -e "s%@target_alias@%${target_alias}%g" \
[7063e223]54    -e "s%@rpm_build_root@%${rpm_build_root}%g" \
[10629f7]55    -e "s%@gcc_version@%${gcc_version}%g" \
56    -e "s%@gcc_patch_version@%${gcc_patch_version}%g" \
57    -e "s%@newlib_version@%${newlib_version}%g" \
58    -e "s%@newlib_patch_version@%${newlib_patch_version}%g" \
59< ${RTEMS_DIR}/gccnewlib/gccnewlib.spec.in \
60> ${specfile}
61
62echo Generated ${specfile}.
Note: See TracBrowser for help on using the repository browser.