source: rtems/scripts/mkgcc3newlibspec.in @ 620c972

4.104.114.84.95
Last change on this file since 620c972 was 620c972, checked in by Ralf Corsepius <ralf.corsepius@…>, on Jul 29, 2002 at 7:40:53 AM

2002-07-29 Ralf Corsepius <corsepiu@…>

  • ChangeLog?: Fix 2002-07-22 ChangeLog? entry bogusly referring to Joel.
  • cpukit/Makefile.am: New.
  • cpukit/mkspec.in: New.
  • cpukit/rtems-cpukit.spec.in: New.
  • cpukit/.cvsignore: New.
  • configure.ac: Add cpukit. Add RTEMS_TOP to pickup _RTEMS_VERSION (required by cpukit).
  • Makefile.am: Add cpukit. Add ACLOCAL_AMFLAGS (required to pickup RTEMS_VERSION).
  • setup.def: Use %{_tmppath} as default for $rpm_build_root.
  • mkbinutilsspec.in: Use ',' as pattern delimiter in sed expression for $rpm_build_root.
  • mkgccnewlibspec.in: Use ',' as pattern delimiter in sed expression for $rpm_build_root.
  • mkgcc3newlibspec.in: Use ',' as pattern delimiter in sed expression for $rpm_build_root.
  • mkgdbspec.in: Use ',' as pattern delimiter in sed expression for $rpm_build_root.
  • Property mode set to 100644
File size: 1.8 KB
Line 
1#!/bin/sh
2#
3#  Usage: mktoolspec CPU
4#
5
6RTEMS_DIR=`dirname $0`/@top_srcdir@
7
8CFG=setup.cache
9dst=@RPM_SPECSdir@
10exe_ext=@EXEEXT@
11
12usage()
13{
14  echo "$0 [options] <target_alias>"
15  echo "  options:"
16  echo "    -cfg <setup.cache>"
17  echo "    -o <rpm-spec-dir>"
18  exit 1 ;
19}
20
21specsrc=${RTEMS_DIR}/gcc3newlib/gccnewlib.spec.in
22
23while test $# -ge 2; do
24case $1 in
25-cfg) 
26  shift
27  CFG=$1
28  shift
29  ;;
30-o)
31  shift
32  dst=$1
33  shift
34  ;;
35-a)        # alternate specs file
36  shift
37  specsrc=$1
38  shift
39  ;;
40-*)
41  echo "invalid option $1";
42  usage
43  ;;
44esac
45done
46
47if test ! $# -eq 1;
48then
49  echo "Invalid number of arguments"
50  usage
51fi
52
53# target to build for
54target_alias=$1
55
56. ./$CFG
57
58specfile=${dst}/${target_alias}-gcc-${gcc3_version}-newlib-${gcc3newlib_version}.spec
59
60patchn=-1
61if test -n "${gcc3_patch_version}"; then
62patchn=`expr $patchn + 1`
63PATCH1="Patch${patchn}: gcc-${gcc3_version}-rtems-${gcc3_patch_version}.diff"
64PATCH2="%patch${patchn} -p0"
65fi
66
67if test -n "${gcc3newlib_patch_version}"; then
68patchn=`expr $patchn + 1`
69PATCH3="Patch${patchn}: newlib-${gcc3newlib_version}-rtems-${gcc3newlib_patch_version}.diff"
70PATCH4="%patch${patchn} -p0"
71fi
72
73# note that the variables in the gcc3newlib directory are actually the same
74sed -e "s,@PATCH1\@,${PATCH1}," \
75    -e "s,@PATCH2\@,${PATCH2}," \
76    -e "s,@PATCH3\@,${PATCH3}," \
77    -e "s,@PATCH4\@,${PATCH4}," \
78    -e "s%@Release\@%${gcc3newlib_rpm_release}%g" \
79    -e "s%@target_alias\@%${target_alias}%g" \
80    -e "s%@prefix\@%@prefix@%g" \
81    -e "s,@rpm_build_root\@,${rpm_build_root},g" \
82    -e "s%@gcc_version\@%${gcc3_version}%g" \
83    -e "s%@gcc_patch_version\@%${gcc3_patch_version}%g" \
84    -e "s%@newlib_version\@%${gcc3newlib_version}%g" \
85    -e "s%@newlib_patch_version\@%${gcc3newlib_patch_version}%g" \
86    -e "s%@exe_ext\@%${exe_ext}%g" \
87< ${specsrc} \
88> ${specfile}
89
90echo Generated ${specfile}.
Note: See TracBrowser for help on using the repository browser.