source: rtems/scripts/binutils/mkspec.in @ 0a80a16

4.104.114.84.95
Last change on this file since 0a80a16 was 0a80a16, checked in by Ralf Corsepius <ralf.corsepius@…>, on 04/12/05 at 06:26:03

Eliminate @PATCH2@.

  • Property mode set to 100644
File size: 1.2 KB
RevLine 
[10629f7]1#!/bin/sh
2#
[b601e1a]3#  Usage: mkspec CPU
[10629f7]4#
5
[43e7d103]6RTEMS_DIR=`dirname $0`/@top_srcdir@
[10629f7]7
[b601e1a]8CFG=../setup.cache
[10629f7]9
[b601e1a]10specsrc=${RTEMS_DIR}/binutils/binutils.spec.in
11
[10629f7]12usage()
13{
14  echo "$0 [options] <target_alias>"
15  echo "  options:"
[43e7d103]16  echo "    -cfg <setup.cache>"
[b601e1a]17  echo "    -a <alternate specs.in>"
[10629f7]18  exit 1 ;
19}
20
21while test $# -ge 2; do
22case $1 in
23-cfg)
24  shift
25  CFG=$1
26  shift
27  ;;
[b601e1a]28-a)
[10629f7]29  shift
[b601e1a]30  specsrc=$1
[10629f7]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]51if test -n "${binutils_patch_version}"; then
52PATCH1="Patch0: binutils-${binutils_version}-rtems-${binutils_patch_version}.diff"
53fi
54
[64cc4bb5]55sed -e "s%@Release\@%${binutils_rpm_release}%g" \
[3d36fe3d]56    -e "s,@rpm_build_root\@,${rpm_build_root},g" \
[64cc4bb5]57    -e "s%@target_alias\@%${target_alias}%g" \
[4b3af7a4]58    -e "s%@prefix\@%@prefix@%g" \
[087a6c86]59    -e "s,@rpmprefix\@,@rpmprefix@,g" \
60    -e "s%@rpmgroup\@%@rpmgroup@%g" \
[f8f365a6]61    -e "s%@osversion\@%@osversion@%g" \
[64cc4bb5]62    -e "s%@binutils_version\@%${binutils_version}%g" \
63    -e "s%@binutils_patch_version\@%${binutils_patch_version}%g" \
[f7d3f2b]64    -e "s%@binutils_suffix\@%${binutils_suffix}%g" \
[df1f734]65    -e "s,@PATCH1\@,${PATCH1}," \
[b601e1a]66< ${specsrc}
Note: See TracBrowser for help on using the repository browser.