source: rtems/scripts/gcc3newlib/mkspec.in @ 00b8107

4.104.114.84.95
Last change on this file since 00b8107 was c86d8e7f, checked in by Ralf Corsepius <ralf.corsepius@…>, on 01/29/03 at 14:06:02

2003-01-29 Ralf Corsepius <corsepiu@…>

  • ChangeLog?: Fix yesterday's entry.
  • gdb/target-gdb.add: %defattr(-,root,root). Use %{_prefix} instead of /opt/rtems. Misc. minor changes.
  • gdb/gdb.add: Use %{_prefix} instead of /opt/rtems. Remove stray unpackaged files. Use %{_defaultbuildroot} instead of hard-coded values. configure --disable-nls. Misc. minor changes. Add BuildPreReq?: ncurses-devel.
  • gdb/base-gdb.add: %defattr(-,root,root). Use %{_prefix} instead of /opt/rtems. Misc. minor changes.
  • gdb/mkspec.in: New.
  • gdb/Makefile.am: Reflect addition of gdb/mkspec.in.
  • gcc3newlib/mkspec.in: Fix usage.
  • gcc3newlib/gccnewlib.add: Use %{_defaultbuildroot} instead of hard-coded values. Update copyright notice.
  • mkgdbspec.in: Removed.
  • Makefile.am: Remove mkgdbspec.
  • configure.ac: Remove mkgdbspec. Add gdb/mkspec.
  • Property mode set to 100644
File size: 1.7 KB
Line 
1#!/bin/sh
2#
3#  Usage: mkspec CPU
4#
5
6RTEMS_DIR=`dirname $0`/@top_srcdir@
7
8CFG=../setup.cache
9exe_ext=@EXEEXT@
10
11usage()
12{
13  echo "$0 [options] <target_alias>"
14  echo "  options:"
15  echo "    -cfg <setup.cache>"
16  echo "    -a <alternate specs.in>"
17  exit 1 ;
18}
19
20specsrc=${RTEMS_DIR}/gcc3newlib/gccnewlib.spec.in
21
22while test $# -ge 2; do
23case $1 in
24-cfg)
25  shift
26  CFG=$1
27  shift
28  ;;
29-a)        # alternate specs file
30  shift
31  specsrc=$1
32  shift
33  ;;
34-*)
35  echo "invalid option $1";
36  usage
37  ;;
38esac
39done
40
41if test ! $# -eq 1;
42then
43  echo "Invalid number of arguments"
44  usage
45fi
46
47# target to build for
48target_alias=$1
49
50. ./$CFG
51
52patchn=-1
53if test -n "${gcc3_patch_version}"; then
54patchn=`expr $patchn + 1`
55PATCH1="Patch${patchn}: gcc-${gcc3_version}-rtems-${gcc3_patch_version}.diff"
56PATCH2="%patch${patchn} -p0"
57fi
58
59if test -n "${gcc3newlib_patch_version}"; then
60patchn=`expr $patchn + 1`
61PATCH3="Patch${patchn}: newlib-${gcc3newlib_version}-rtems-${gcc3newlib_patch_version}.diff"
62PATCH4="%patch${patchn} -p0"
63fi
64
65# note that the variables in the gcc3newlib directory are actually the same
66sed -e "s,@PATCH1\@,${PATCH1}," \
67    -e "s,@PATCH2\@,${PATCH2}," \
68    -e "s,@PATCH3\@,${PATCH3}," \
69    -e "s,@PATCH4\@,${PATCH4}," \
70    -e "s%@Release\@%${gcc3newlib_rpm_release}%g" \
71    -e "s%@target_alias\@%${target_alias}%g" \
72    -e "s%@prefix\@%@prefix@%g" \
73    -e "s,@rpm_build_root\@,${rpm_build_root},g" \
74    -e "s%@gcc_version\@%${gcc3_version}%g" \
75    -e "s%@gcc_patch_version\@%${gcc3_patch_version}%g" \
76    -e "s%@newlib_version\@%${gcc3newlib_version}%g" \
77    -e "s%@newlib_patch_version\@%${gcc3newlib_patch_version}%g" \
78    -e "s%@exe_ext\@%${exe_ext}%g" \
79< ${specsrc}
Note: See TracBrowser for help on using the repository browser.