source: rtems/scripts/gcc3newlib/mkspec.in @ 28072168

4.104.114.84.95
Last change on this file since 28072168 was 28072168, checked in by Ralf Corsepius <ralf.corsepius@…>, on 04/12/05 at 08:13:48

Fix stupid typo in previous patch.

  • Property mode set to 100644
File size: 1.7 KB
RevLine 
[afe5cac]1#!/bin/sh
2#
[c86d8e7f]3#  Usage: mkspec CPU
[afe5cac]4#
5
6RTEMS_DIR=`dirname $0`/@top_srcdir@
7
[4aba88a1]8CFG=../setup.cache
[afe5cac]9
10usage()
11{
12  echo "$0 [options] <target_alias>"
13  echo "  options:"
14  echo "    -cfg <setup.cache>"
[c86d8e7f]15  echo "    -a <alternate specs.in>"
[afe5cac]16  exit 1 ;
17}
18
19specsrc=${RTEMS_DIR}/gcc3newlib/gccnewlib.spec.in
20
21while test $# -ge 2; do
22case $1 in
23-cfg)
24  shift
25  CFG=$1
26  shift
27  ;;
28-a)        # alternate specs file
29  shift
30  specsrc=$1
31  shift
32  ;;
33-*)
34  echo "invalid option $1";
35  usage
36  ;;
37esac
38done
39
40if test ! $# -eq 1;
41then
42  echo "Invalid number of arguments"
43  usage
44fi
45
46# target to build for
47target_alias=$1
48
49. ./$CFG
50
[df1f734]51patchn=-1
[c610055c]52if test -n "${gcc_patch_version}"; then
[df1f734]53patchn=`expr $patchn + 1`
[c610055c]54PATCH1="Patch${patchn}: gcc-${gcc_version}-rtems-${gcc_patch_version}.diff"
[df1f734]55fi
56
[3cba822]57if test -n "${newlib_patch_version}"; then
[df1f734]58patchn=`expr $patchn + 1`
[3cba822]59PATCH3="Patch${patchn}: newlib-${newlib_version}-rtems-${newlib_patch_version}.diff"
[df1f734]60fi
61
[afe5cac]62# note that the variables in the gcc3newlib directory are actually the same
[df1f734]63sed -e "s,@PATCH1\@,${PATCH1}," \
64    -e "s,@PATCH3\@,${PATCH3}," \
[28072168]65    -e "s%@Release\@%${gcc3newlib_rpm_release}%g" \
[afe5cac]66    -e "s%@target_alias\@%${target_alias}%g" \
67    -e "s%@prefix\@%@prefix@%g" \
[087a6c86]68    -e "s,@rpmprefix\@,@rpmprefix@,g" \
69    -e "s%@rpmgroup\@%@rpmgroup@%g" \
[f8f365a6]70    -e "s%@osversion\@%@osversion@%g" \
[620c972]71    -e "s,@rpm_build_root\@,${rpm_build_root},g" \
[c610055c]72    -e "s%@gcc_version\@%${gcc_version}%g" \
73    -e "s%@gcc_patch_version\@%${gcc_patch_version}%g" \
74    -e "s%@gcc_suffix\@%${gcc_suffix}%g" \
[3cba822]75    -e "s%@newlib_version\@%${newlib_version}%g" \
76    -e "s%@newlib_patch_version\@%${newlib_patch_version}%g" \
77    -e "s%@newlib_suffix\@%${newlib_suffix}%g" \
[4aba88a1]78< ${specsrc}
Note: See TracBrowser for help on using the repository browser.