source: rtems-source-builder/rtems/config/tools/rtems-tools-common-1.cfg @ 15ef359

5
Last change on this file since 15ef359 was 96c414c, checked in by Chris Johns <chrisj@…>, on 10/22/18 at 00:59:10

windows: Remove BuildRoot? from all configs, add a short tmp path.

Closes #3562.

  • Property mode set to 100644
File size: 1.9 KB
Line 
1#
2# RTEMS Tools Version 2.
3#
4# This configuration file configure's, builds and install's RTEMS Tools.
5#
6
7Name:      rtems-tools-%{rtems_tools_version}-%{release}
8Summary:   RTEMS Tools %{rtems_tools_version} for host %{_host}
9Version:   %{rtems_tools_version}
10Release:   %{release}
11URL:       http://www.rtems.org/
12License:   BSD-2-Clause + GPL-2.0
13
14#
15# Prepare the source code.
16#
17%prep
18  # save the build top directory and cd back to it rather than
19  # using 'cd ..' because some shells change $PWD to a symlink's
20  # target location and 'cd ..' fails.
21  build_top=$(pwd)
22
23  %if ! %{defined rtems_tools_source}
24    %if %{rsb_released}
25      rtems_tools_source="rtems-tools-%{rtems_tools_version}"
26    %else
27      rtems_tools_source="rtems-tools.git"
28    %endif
29  %else
30    rtems_tools_source=%{rtems_tools_source}
31  %endif
32
33  source_dir_rtems_tools=${rtems_tools_source}
34  %source setup rtems-tools -q -n ${rtems_tools_source}
35  %patch setup rtems-tools -p1
36
37  cd ${build_top}
38
39%build
40  build_top=$(pwd)
41
42  #
43  # Provide the host for a Cxc build.
44  #
45  if test "%{_build}" != "%{_host}" ; then
46    RT_HOST="--host=%{_host}"
47  else
48    RT_HOST=
49  fi
50
51  cd ${source_dir_rtems_tools}
52  ./waf distclean configure ${RT_HOST} --prefix=%{_prefix}
53  ./waf
54  cd ${build_top}
55
56%install
57  build_top=$(pwd)
58
59  %{__rmdir} $SB_BUILD_ROOT
60
61  #
62  # If on Windows we need to add the driver prefix to the built root as waf
63  # strips the driver prefix from the prefix path when joining it to the
64  # destdir path. Waf is correct in doing this and the RSB is design to match
65  # the configure behaviour which treats the whole path including the drive
66  # prefix as part of the path as just a path.
67  #
68  %ifos win32 mingw ming32
69   SB_BUILD_ROOT_WAF=$SB_BUILD_ROOT$(echo %{_prefix} | cut -c 1-2)
70  %else
71   SB_BUILD_ROOT_WAF=$SB_BUILD_ROOT
72  %endif
73
74  cd ${source_dir_rtems_tools}
75  ./waf --destdir=$SB_BUILD_ROOT_WAF install
76  cd ${build_top}
Note: See TracBrowser for help on using the repository browser.