source: rtems/scripts/mkgccnewlibspec.in @ 0c602f0

4.104.114.84.95
Last change on this file since 0c602f0 was 0c602f0, checked in by Joel Sherrill <joel.sherrill@…>, on Jan 23, 2000 at 7:20:02 PM

Patch from David Fiddes <D.J@…> which adds basic
Cygwin support to the RPM scripts. The patch from David did not
apply cleanly and Joel ended up making all the modifications
plus some it should have included for consistency by hand. His comments:

I've included a diff against the last (19991203) snapshot RPM scripts that
adds what I think is required for Cygwin support. Basically all this boils
down to is adding EXE extension support. I've added the AC_EXEEXT rule to
conifgure.in (requires a valid 'cc' to work - this is not available in the
standard Cygwin distro). Each of the *.spec.in have @exe_ext@ includes in
them for each program that results in an EXE. The only odity here is that
the chill driver program is a shell script and thus does not require .exe to
be added... The mk*.in have all been updated to process the new exe_ext
rule.

  • Property mode set to 100644
File size: 1.2 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}/gccnewlib/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-${gcc_version}-newlib-${newlib_version}.spec
59
60sed -e "s%@Release@%${gccnewlib_rpm_release}%g" \
61    -e "s%@target_alias@%${target_alias}%g" \
62    -e "s%@rpm_build_root@%${rpm_build_root}%g" \
63    -e "s%@gcc_version@%${gcc_version}%g" \
64    -e "s%@gcc_patch_version@%${gcc_patch_version}%g" \
65    -e "s%@newlib_version@%${newlib_version}%g" \
66    -e "s%@newlib_patch_version@%${newlib_patch_version}%g" \
67    -e "s%@ext_ext@%${ext_ext}%g" \
68< ${specsrc} \
69> ${specfile}
70
71echo Generated ${specfile}.
Note: See TracBrowser for help on using the repository browser.