1 | # |
---|
2 | # RTEMS Tools Project (http://www.rtems.org/) |
---|
3 | # Copyright 2010-2013 Chris Johns (chrisj@rtems.org) |
---|
4 | # All rights reserved. |
---|
5 | # |
---|
6 | # This file is part of the RTEMS Tools package in 'rtems-tools'. |
---|
7 | # |
---|
8 | # Permission to use, copy, modify, and/or distribute this software for any |
---|
9 | # purpose with or without fee is hereby granted, provided that the above |
---|
10 | # copyright notice and this permission notice appear in all copies. |
---|
11 | # |
---|
12 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
---|
13 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
---|
14 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
---|
15 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
---|
16 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
---|
17 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
---|
18 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
---|
19 | |
---|
20 | # |
---|
21 | # All paths in defaults must be Unix format. Do not store any Windows format |
---|
22 | # paths in the defaults. |
---|
23 | # |
---|
24 | # Every entry must describe the type of checking a host must pass. |
---|
25 | # |
---|
26 | # Records: |
---|
27 | # key: type, attribute, value |
---|
28 | # type : none, dir, exe, triplet |
---|
29 | # attribute: none, required, optional |
---|
30 | # value : 'single line', '''multi line''' |
---|
31 | # |
---|
32 | |
---|
33 | # |
---|
34 | # Global defaults |
---|
35 | # |
---|
36 | [global] |
---|
37 | |
---|
38 | # Nothing |
---|
39 | nil: none, none, '' |
---|
40 | |
---|
41 | # Set to invalid values. |
---|
42 | _bset: none, none, '' |
---|
43 | name: none, none, '' |
---|
44 | version: none, none, '' |
---|
45 | release: none, none, '' |
---|
46 | |
---|
47 | # GNU triples needed to build packages |
---|
48 | _host: triplet, required, '' |
---|
49 | _build: triplet, required, '%{_host}' |
---|
50 | _target: none, optional, '' |
---|
51 | |
---|
52 | # Paths |
---|
53 | _host_platform: none, none, '%{_host_cpu}-%{_host_vendor}-%{_host_os}%{?_gnu}' |
---|
54 | _arch: none, none, '%{_host_arch}' |
---|
55 | _topdir: dir, required, '%{_cwd}' |
---|
56 | _configdir: dir, optional, '%{_topdir}/config:%{_sbdir}/config' |
---|
57 | _tardir: dir, optional, '%{_topdir}/tar' |
---|
58 | _sourcedir: dir, optional, '%{_topdir}/sources' |
---|
59 | _patchdir: dir, optional, '%{_topdir}/patches:%{_sbdir}/patches' |
---|
60 | _builddir: dir, optional, '%{_topdir}/build/%{name}-%{version}-%{release}' |
---|
61 | _buildcxcdir: dir, optional, '%{_topdir}/build/%{name}-%{version}-%{release}-cxc' |
---|
62 | _docdir: dir, none, '%{_defaultdocdir}' |
---|
63 | _tmppath: dir, none, '%{_topdir}/build/tmp' |
---|
64 | _tmproot: dir, none, '%{_tmppath}/source-build-%(%{__id_u} -n)/%{_bset}' |
---|
65 | _tmpcxcroot: dir, none, '%{_tmppath}/source-build-%(%{__id_u} -n)-cxc/%{_bset}' |
---|
66 | buildroot: dir, none, '%{_tmppath}/%{name}-root-%(%{__id_u} -n)' |
---|
67 | buildcxcroot: dir, none, '%{_tmppath}/%{name}-root-%(%{__id_u} -n)-cxc' |
---|
68 | _datadir: dir, none, '%{_prefix}/share' |
---|
69 | _defaultdocdir: dir, none, '%{_prefix}/share/doc' |
---|
70 | _exeext: none, none, '' |
---|
71 | _exec_prefix: dir, none, '%{_prefix}' |
---|
72 | _bindir: dir, none, '%{_exec_prefix}/bin' |
---|
73 | _sbindir: dir, none, '%{_exec_prefix}/sbin' |
---|
74 | _libexecdir: dir, none, '%{_exec_prefix}/libexec' |
---|
75 | _datarootdir: dir, none, '%{_prefix}/share' |
---|
76 | _datadir: dir, none, '%{_datarootdir}' |
---|
77 | _sysconfdir: dir, none, '%{_prefix}/etc' |
---|
78 | _sharedstatedir: dir, none, '%{_prefix}/com' |
---|
79 | _localstatedir: dir, none, '%{prefix}/var' |
---|
80 | _includedir: dir, none, '%{_prefix}/include' |
---|
81 | _lib: dir, none, 'lib' |
---|
82 | _libdir: dir, none, '%{_exec_prefix}/%{_lib}' |
---|
83 | _libexecdir: dir, none, '%{_exec_prefix}/libexec' |
---|
84 | _mandir: dir, none, '%{_datarootdir}/man' |
---|
85 | _infodir: dir, none, '%{_datarootdir}/info' |
---|
86 | _localedir: dir, none, '%{_datarootdir}/locale' |
---|
87 | _localedir: dir, none, '%{_datadir}/locale' |
---|
88 | _localstatedir: dir, none, '%{_prefix}/var' |
---|
89 | _prefix: dir, none, '%{_usr}' |
---|
90 | _usr: dir, none, '/usr/local' |
---|
91 | _usrsrc: dir, none, '%{_usr}/src' |
---|
92 | _var: dir, none, '/usr/local/var' |
---|
93 | _varrun: dir, none, '%{_var}/run' |
---|
94 | |
---|
95 | # Defaults, override in platform specific modules. |
---|
96 | ___setup_shell: exe, required, '/bin/sh' |
---|
97 | __aclocal: exe, optional, 'aclocal' |
---|
98 | __ar: exe, required, 'ar' |
---|
99 | __arch_install_post: exe, none, '%{nil}' |
---|
100 | __as: exe, required, 'as' |
---|
101 | __autoconf: exe, required, 'autoconf' |
---|
102 | __autoheader: exe, required, 'autoheader' |
---|
103 | __automake: exe, required, 'automake' |
---|
104 | __awk: exe, required, 'awk' |
---|
105 | __bash: exe, optional, '/bin/bash' |
---|
106 | __bison: exe, required, '/usr/bin/bison' |
---|
107 | __bzip2: exe, required, '/usr/bin/bzip2' |
---|
108 | __cat: exe, required, '/bin/cat' |
---|
109 | __cc: exe, required, '/usr/bin/gcc' |
---|
110 | __chgrp: exe, required, '/usr/bin/chgrp' |
---|
111 | __chmod: exe, required, '/bin/chmod' |
---|
112 | __chown: exe, required, '/usr/sbin/chown' |
---|
113 | __cp: exe, required, '/bin/cp' |
---|
114 | __cpp: exe, none, '%{__cc} -E' |
---|
115 | __cvs: exe, optional, '/usr/bin/cvs' |
---|
116 | __cvs_z: none, none, '%{__cvs} -z 9' |
---|
117 | __cxx: exe, required, '/usr/bin/g++' |
---|
118 | __flex: exe, required, '/usr/bin/flex' |
---|
119 | __git: exe, required, '/usr/bin/git' |
---|
120 | __grep: exe, required, '/usr/bin/grep' |
---|
121 | __gzip: exe, required, '/usr/bin/gzip' |
---|
122 | __id: exe, required, '/usr/bin/id' |
---|
123 | __id_u: exe, none, '%{__id} -u' |
---|
124 | __install: exe, required, '/usr/bin/install' |
---|
125 | __install_info: exe, optional, '/usr/bin/install-info' |
---|
126 | __ld: exe, required, '/usr/bin/ld' |
---|
127 | __ldconfig: exe, required, '/sbin/ldconfig' |
---|
128 | __ln_s: exe, none, 'ln -s' |
---|
129 | __make: exe, required, 'make' |
---|
130 | __makeinfo: exe, required, '/usr/bin/makeinfo' |
---|
131 | __mkdir: exe, required, '/bin/mkdir' |
---|
132 | __mkdir_p: exe, none, '/bin/mkdir -p' |
---|
133 | __mv: exe, required, '/bin/mv' |
---|
134 | __nm: exe, required, '/usr/bin/nm' |
---|
135 | __objcopy: exe, optional, '/usr/bin/objcopy' |
---|
136 | __objdump: exe, optional, '/usr/bin/objdump' |
---|
137 | __patch_bin: exe, required, '/usr/bin/patch' |
---|
138 | __patch_opts: none, none, '%{nil}' |
---|
139 | __patch: exe, none, '%{__patch_bin} %{__patch_opts}' |
---|
140 | __perl: exe, optional, 'perl' |
---|
141 | __svn: exe, optional, '/usr/bin/svn' |
---|
142 | __ranlib: exe, required, 'ranlib' |
---|
143 | __rm: exe, required, '/bin/rm' |
---|
144 | __rmfile: exe, none, '%{__rm} -f' |
---|
145 | __rmdir: exe, none, '%{__rm} -rf' |
---|
146 | __sed: exe, required, '/usr/bin/sed' |
---|
147 | __setup_post: exe, none, '%{__chmod} -R a+rX,g-w,o-w .' |
---|
148 | __sh: exe, required, '/bin/sh' |
---|
149 | __tar: exe, required, '/usr/bin/tar' |
---|
150 | __tar_extract: exe, none, '%{__tar} -xvvf' |
---|
151 | __touch: exe, required, '/usr/bin/touch' |
---|
152 | __unzip: exe, required, '/usr/bin/unzip' |
---|
153 | __xz: exe, required, '/usr/bin/xz' |
---|
154 | |
---|
155 | # Shell Build Settings. |
---|
156 | ___build_args: none, none, '-e' |
---|
157 | ___build_cmd: none, none, '%{?_sudo:%{_sudo} }%{?_remsh:%{_remsh} %{_remhost} }%{?_remsudo:%{_remsudo} }%{?_remchroot:%{_remchroot} %{_remroot} }%{___build_shell} %{___build_args}' |
---|
158 | ___build_post: none, none, 'exit 0' |
---|
159 | |
---|
160 | # Prebuild set up script. |
---|
161 | ___build_pre: none, none, '''# ___build_pre in as set up in defaults.py |
---|
162 | # Save the original path away. |
---|
163 | export SB_ORIG_PATH=${PATH} |
---|
164 | # Directories |
---|
165 | %{?_prefix:SB_PREFIX="%{_prefix}"} |
---|
166 | %{?_prefix:SB_PREFIX_CLEAN=$(echo "%{_prefix}" | %{__sed} -e 's/^\///')} |
---|
167 | SB_SOURCE_DIR="%{_sourcedir}" |
---|
168 | SB_BUILD_DIR="%{_builddir}" |
---|
169 | SB_OPT_FLAGS="%{?_tmproot:-I%{_tmproot}/${SB_PREFIX_CLEAN}/include -L%{_tmproot}/${SB_PREFIX_CLEAN}/lib} %{optflags}" |
---|
170 | SB_ARCH="%{_arch}" |
---|
171 | SB_OS="%{_os}" |
---|
172 | export SB_SOURCE_DIR SB_BUILD_DIR SB_OPT_FLAGS SB_ARCH SB_OS |
---|
173 | # Documentation |
---|
174 | SB_DOC_DIR="%{_docdir}" |
---|
175 | export SB_DOC_DIR |
---|
176 | # Packages |
---|
177 | SB_PACKAGE_NAME="%{name}" |
---|
178 | SB_PACKAGE_VERSION="%{version}" |
---|
179 | SB_PACKAGE_RELEASE="%{release}" |
---|
180 | export SB_PACKAGE_NAME SB_PACKAGE_VERSION SB_PACKAGE_RELEASE |
---|
181 | # Build directories |
---|
182 | export SB_PREFIX |
---|
183 | %{?_builddir:SB_BUILD_DIR="%{_builddir}"} |
---|
184 | %{?buildroot:SB_BUILD_ROOT="%{buildroot}"} |
---|
185 | %{?buildroot:%{?_prefix:SB_BUILD_ROOT_BINDIR="%{buildroot}/${SB_PREFIX_CLEAN}/bin"}} |
---|
186 | export SB_BUILD_ROOT SB_BUILD_DIR SB_BUILD_ROOT_BINDIR |
---|
187 | %{?_buildcxcdir:SB_BUILD_CXC_DIR="%{_buildcxcdir}"} |
---|
188 | %{?buildcxcroot:SB_BUILD_CXC_ROOT="%{buildcxcroot}"} |
---|
189 | %{?buildcxcroot:%{?_prefix:SB_BUILD_CXC_ROOT_BINDIR="%{buildcxcroot}/${SB_PREFIX_CLEAN}/bin"}} |
---|
190 | export SB_BUILD_CXC_ROOT SB_BUILD_CXC_DIR SB_BUILD_CXC_ROOT_BINDIR |
---|
191 | %{?_tmproot:SB_TMPROOT="%{_tmproot}"} |
---|
192 | %{?_tmproot:%{?_prefix:SB_TMPPREFIX="%{_tmproot}/${SB_PREFIX_CLEAN}"}} |
---|
193 | %{?_tmproot:%{?_prefix:SB_TMPBINDIR="%{_tmproot}/${SB_PREFIX_CLEAN}/bin"}} |
---|
194 | export SB_TMPROOT SB_TMPPREFIX SB_TMPBINDIR |
---|
195 | %{?_tmpcxcroot:SB_TMPCXCROOT="%{_tmproot}"} |
---|
196 | %{?_tmpcxcroot:%{?_prefix:SB_TMPCXCPREFIX="%{_tmpcxcroot}/${SB_PREFIX_CLEAN}"}} |
---|
197 | %{?_tmpcxcroot:%{?_prefix:SB_TMPCXCBINDIR="%{_tmpcxcroot}/${SB_PREFIX_CLEAN}/bin"}} |
---|
198 | export SB_TMPCXCROOT SB_TMPCXCPREFIX SB_TMPCXCBINDIR |
---|
199 | # The compiler flags |
---|
200 | %{?_targetcflags:CFLAGS_FOR_TARGET="%{_targetcflags}"} |
---|
201 | %{?_targetcxxflags:CXXFLAGS_FOR_TARGET="%{_targetcxxflags}"} |
---|
202 | export CFLAGS_FOR_TARGET |
---|
203 | export CXXFLAGS_FOR_TARGET |
---|
204 | # Set up the path. Put the CXC path first. |
---|
205 | if test -n "${SB_TMPBINDIR}" ; then |
---|
206 | PATH="${SB_TMPBINDIR}:$PATH" |
---|
207 | fi |
---|
208 | if test -n "${SB_TMPCXCBINDIR}" ; then |
---|
209 | PATH="${SB_TMPCXCBINDIR}:$PATH" |
---|
210 | fi |
---|
211 | export PATH |
---|
212 | # Default environment set up. |
---|
213 | LANG=C |
---|
214 | export LANG |
---|
215 | unset DISPLAY || : |
---|
216 | umask 022 |
---|
217 | cd "%{_builddir}"''' |
---|
218 | |
---|
219 | ___build_shell: none, none, '%{?_buildshell:%{_buildshell}}%{!?_buildshell:/bin/sh}' |
---|
220 | |
---|
221 | ___build_template: none, none, '''#!%{___build_shell} |
---|
222 | %{___build_pre} |
---|
223 | %{nil}''' |
---|
224 | |
---|
225 | # Configure command |
---|
226 | configure: none, none, ''' |
---|
227 | CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; |
---|
228 | CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; |
---|
229 | FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; |
---|
230 | ./configure --build=%{_build} --host=%{_host} \ |
---|
231 | --target=%{_target_platform} \ |
---|
232 | --program-prefix=%{?_program_prefix} \ |
---|
233 | --prefix=%{_prefix} \ |
---|
234 | --exec-prefix=%{_exec_prefix} \ |
---|
235 | --bindir=%{_bindir} \ |
---|
236 | --sbindir=%{_sbindir} \ |
---|
237 | --sysconfdir=%{_sysconfdir} \ |
---|
238 | --datadir=%{_datadir} \ |
---|
239 | --includedir=%{_includedir} \ |
---|
240 | --libdir=%{_libdir} \ |
---|
241 | --libexecdir=%{_libexecdir} \ |
---|
242 | --localstatedir=%{_localstatedir} \ |
---|
243 | --sharedstatedir=%{_sharedstatedir} \ |
---|
244 | --mandir=%{_mandir} \ |
---|
245 | --infodir=%{_infodir}''' |
---|
246 | |
---|
247 | # Default package settings |
---|
248 | _forced_static: none, none, '-Xlinker -Bstatic ${LIBS_STATIC} -Xlinker -Bdynamic' |
---|
249 | __xz: exe, required, '/usr/bin/xz' |
---|
250 | |
---|
251 | # Mail Support |
---|
252 | _mail_smtp_host: none, none, 'localhost' |
---|
253 | _mail_tools_to: none, none, 'rtems-tooltestresults@rtems.org' |
---|