OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [scripts-ada/] [mkgnatnewlibspec.in] - Blame information for rev 294

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
#!/bin/sh
2
#
3
#  Usage: mktoolspec CPU
4
#
5
 
6
RTEMS_DIR=`dirname $0`/@top_srcdir@
7
 
8
CFG=setup.cache
9
dst=@RPM_SPECSdir@
10
exe_ext=@EXEEXT@
11
 
12
usage()
13
{
14
  echo "$0 [options] "
15
  echo "  options:"
16
  echo "    -cfg "
17
  echo "    -o "
18
  exit 1 ;
19
}
20
 
21
specsrc=${RTEMS_DIR}/gnatnewlib/gnatnewlib.spec.in
22
 
23
while test $# -ge 2; do
24
case $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
  ;;
44
esac
45
done
46
 
47
if test ! $# -eq 1;
48
then
49
  echo "Invalid number of arguments"
50
  usage
51
fi
52
 
53
# target to build for
54
target_alias=$1
55
 
56
. ./$CFG
57
 
58
specfile=${dst}/${target_alias}-gnat-${gnat_version}-newlib-${newlib_version}.spec
59
 
60
sed -e "s%@Release@%${gnatnewlib_rpm_release}%g" \
61
    -e "s%@target_alias@%${target_alias}%g" \
62
    -e "s%@rpm_build_root@%${rpm_build_root}%g" \
63
    -e "s%@binutils_version@%${binutils_version}%g" \
64
    -e "s%@binutils_patch_version@%${binutils_patch_version}%g" \
65
    -e "s%@gcc_version@%${gcc_version}%g" \
66
    -e "s%@gcc_patch_version@%${gcc_patch_version}%g" \
67
    -e "s%@gnat_version@%${gnat_version}%g" \
68
    -e "s%@gnat_patch_version@%${gnat_patch_version}%g" \
69
    -e "s%@newlib_version@%${newlib_version}%g" \
70
    -e "s%@newlib_patch_version@%${newlib_patch_version}%g" \
71
    -e "s%@exe_ext@%${exe_ext}%g" \
72
< ${specsrc} \
73
> ${specfile}
74
 
75
echo Generated ${specfile}.

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.