source: rtems-source-builder/rtems/config/tools/rtems-kernel-4-1.cfg @ cd93d89

4.104.114.95
Last change on this file since cd93d89 was cd93d89, checked in by Chris Johns <chrisj@…>, on Aug 23, 2014 at 1:19:25 PM

rtems-4.11: Fix the broken RTEMS build on 4.11.

  • Property mode set to 100644
File size: 2.5 KB
Line 
1#
2# RTEMS 4.xx Version 1.
3#
4# This configuration file configure's, make's and install's RTEMS.
5#
6
7%include %{_configdir}/checks.cfg
8
9Name:      %{_target}-kernel-%{rtems_kernel_version}-%{release}
10Summary:   RTEMS v%{rtems_kernel_version} for target %{_target} on host %{_host}
11Version:   %{rtems_kernel_version}
12Release:   %{release}
13URL:       http://www..rtems.org/
14BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
15
16#
17# Source
18#
19%source set rtems http://ftp.rtems.org/ftp/pub/rtems/%{rtems_kernel_version}/rtems-%{rtems_kernel_version}.tar.bz2
20
21#
22# If C++ defined for the tool set use it to control RTEMS's setting..
23#
24%if %{defined enable_cxx}
25 %define rtems_cxx %{enable_cxx}
26%endif
27
28#
29# Default set up.
30#
31%ifn %{defined rtems_posix}
32 %define rtems_posix 1
33%endif
34%ifn %{defined rtems_networking}
35 %define rtems_networking 1
36%endif
37%ifn %{defined rtems_cxx}
38 %define rtems_cxx 1
39%endif
40%ifn %{defined rtems_tests}
41 %define rtems_tests samples
42%endif
43
44%if %{rtems_tests} == disable
45 %define rtems_tests_opt --disable-tests
46%else
47 %define rtems_tests_opt --enable-tests=%{rtems_tests}
48%endif
49
50#
51# It the rtems_bsps is all undefine it
52#
53%if %{defined rtems_bsp}
54 %if %{rtems_bsps} == all
55  %undefine rtems_bsps
56 %endif
57%endif
58
59#
60# Prepare the source code.
61#
62%prep
63  source_dir_rtems="rtems-%{rtems_kernel_version}"
64  %source setup rtems -q -c -n %{name}-%{version}
65  cd ${source_dir_rtems}
66  %patch setup rtems -p1
67%if %{rtems_bootstrap}
68  %if %{defined _internal_autotools_path}
69    export PATH="%{_internal_autotools_path}/bin:${PATH}"
70  %endif
71  ./bootstrap -c
72  %{_sbdir}/sb-bootstrap --preinstall
73  %{_sbdir}/sb-bootstrap
74%endif
75  cd ..
76
77%build
78  # Build directory support.
79  if test "%{_build}" != "%{_host}" ; then
80    build_dir="build-cxc"
81  else
82    build_dir="build"
83  fi
84  mkdir -p ${build_dir}
85  cd ${build_dir}
86
87  ../${source_dir_rtems}/configure \
88    --build=%{_build} --host=%{_host} \
89    --target=%{_target} \
90    %{?rtems_posix:--enable-posix}%{!?rtems_posix:--disable-posix} \
91    %{?rtems_networking:--enable-networking}%{!?rtems_networking:--disable-networking} \
92    %{?rtems_cxx:--enable-cxx}%{!?rtems_cxx:--disable-cxx} \
93    %{rtems_tests_opt} \
94    %{?rtems_bsps:--enable-rtemsbsp=%{rtems_bsps}} \
95    --prefix=%{_prefix} --bindir=%{_bindir} \
96    --exec-prefix=%{_exec_prefix} \
97    --includedir=%{_includedir} --libdir=%{_libdir} \
98    --mandir=%{_mandir} --infodir=%{_infodir}
99
100  %{__make} %{?_smp_mflags} all
101  cd ..
102
103%install
104  %{__rmdir} $SB_BUILD_ROOT
105
106  cd ${build_dir}
107  %{__make} DESTDIR=$SB_BUILD_ROOT install
108
109  cd ..
110
111%testing
Note: See TracBrowser for help on using the repository browser.