]>
Commit | Line | Data |
---|---|---|
4a9d5109 SW |
1 | ## Makefile for the include subdirectory of the GNU C++ Standard library. |
2 | ## | |
7ec3af37 | 3 | ## Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. |
4a9d5109 SW |
4 | ## |
5 | ## This file is part of the libstdc++ version 3 distribution. | |
6 | ## Process this file with automake to produce Makefile.in. | |
7 | ||
8 | ## This file is part of the GNU ISO C++ Library. This library is free | |
9 | ## software; you can redistribute it and/or modify it under the | |
10 | ## terms of the GNU General Public License as published by the | |
11 | ## Free Software Foundation; either version 2, or (at your option) | |
12 | ## any later version. | |
13 | ||
14 | ## This library is distributed in the hope that it will be useful, | |
15 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | ## GNU General Public License for more details. | |
18 | ||
19 | ## You should have received a copy of the GNU General Public License along | |
20 | ## with this library; see the file COPYING. If not, write to the Free | |
21 | ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, | |
22 | ## USA. | |
23 | ||
0df3f383 | 24 | include $(top_srcdir)/fragment.am |
ab77073f BK |
25 | |
26 | # Standard C++ includes. | |
3d7c150e | 27 | std_srcdir = ${glibcxx_srcdir}/include/std |
ab77073f BK |
28 | std_builddir = . |
29 | std_headers = \ | |
30 | ${std_srcdir}/std_algorithm.h \ | |
31 | ${std_srcdir}/std_bitset.h \ | |
32 | ${std_srcdir}/std_complex.h \ | |
33 | ${std_srcdir}/std_deque.h \ | |
34 | ${std_srcdir}/std_fstream.h \ | |
35 | ${std_srcdir}/std_functional.h \ | |
36 | ${std_srcdir}/std_iomanip.h \ | |
37 | ${std_srcdir}/std_ios.h \ | |
38 | ${std_srcdir}/std_iosfwd.h \ | |
39 | ${std_srcdir}/std_iostream.h \ | |
40 | ${std_srcdir}/std_istream.h \ | |
41 | ${std_srcdir}/std_iterator.h \ | |
42 | ${std_srcdir}/std_limits.h \ | |
43 | ${std_srcdir}/std_list.h \ | |
44 | ${std_srcdir}/std_locale.h \ | |
45 | ${std_srcdir}/std_map.h \ | |
46 | ${std_srcdir}/std_memory.h \ | |
47 | ${std_srcdir}/std_numeric.h \ | |
48 | ${std_srcdir}/std_ostream.h \ | |
49 | ${std_srcdir}/std_queue.h \ | |
50 | ${std_srcdir}/std_set.h \ | |
51 | ${std_srcdir}/std_sstream.h \ | |
52 | ${std_srcdir}/std_stack.h \ | |
53 | ${std_srcdir}/std_stdexcept.h \ | |
54 | ${std_srcdir}/std_streambuf.h \ | |
55 | ${std_srcdir}/std_string.h \ | |
56 | ${std_srcdir}/std_utility.h \ | |
57 | ${std_srcdir}/std_valarray.h \ | |
58 | ${std_srcdir}/std_vector.h | |
82ba99d5 | 59 | # Renamed at build time. |
ab77073f BK |
60 | std_headers_rename = \ |
61 | algorithm \ | |
62 | bitset \ | |
63 | complex \ | |
64 | deque \ | |
65 | fstream \ | |
66 | functional \ | |
67 | iomanip \ | |
68 | ios \ | |
69 | iosfwd \ | |
70 | iostream \ | |
71 | istream \ | |
72 | iterator \ | |
73 | limits \ | |
74 | list \ | |
75 | locale \ | |
76 | map \ | |
77 | memory \ | |
78 | numeric \ | |
79 | ostream \ | |
80 | queue \ | |
81 | set \ | |
82 | sstream \ | |
83 | stack \ | |
84 | stdexcept \ | |
85 | streambuf \ | |
86 | string \ | |
87 | utility \ | |
88 | valarray \ | |
89 | vector | |
90 | ||
3d7c150e | 91 | bits_srcdir = ${glibcxx_srcdir}/include/bits |
4a9d5109 SW |
92 | bits_builddir = ./bits |
93 | bits_headers = \ | |
1ff9402d BK |
94 | ${bits_srcdir}/allocator.h \ |
95 | ${bits_srcdir}/allocator_traits.h \ | |
4a9d5109 SW |
96 | ${bits_srcdir}/basic_ios.h \ |
97 | ${bits_srcdir}/basic_ios.tcc \ | |
98 | ${bits_srcdir}/basic_string.h \ | |
99 | ${bits_srcdir}/basic_string.tcc \ | |
100 | ${bits_srcdir}/boost_concept_check.h \ | |
101 | ${bits_srcdir}/char_traits.h \ | |
102 | ${bits_srcdir}/codecvt.h \ | |
103 | ${bits_srcdir}/concept_check.h \ | |
104 | ${bits_srcdir}/cpp_type_traits.h \ | |
83e924e1 | 105 | ${bits_srcdir}/demangle.h \ |
83144cfc | 106 | ${bits_srcdir}/deque.tcc \ |
4a9d5109 SW |
107 | ${bits_srcdir}/fstream.tcc \ |
108 | ${bits_srcdir}/functexcept.h \ | |
4a9d5109 SW |
109 | ${bits_srcdir}/gslice.h \ |
110 | ${bits_srcdir}/gslice_array.h \ | |
111 | ${bits_srcdir}/indirect_array.h \ | |
112 | ${bits_srcdir}/ios_base.h \ | |
113 | ${bits_srcdir}/istream.tcc \ | |
83144cfc | 114 | ${bits_srcdir}/list.tcc \ |
e6686813 | 115 | ${bits_srcdir}/locale_classes.h \ |
4a9d5109 SW |
116 | ${bits_srcdir}/locale_facets.h \ |
117 | ${bits_srcdir}/locale_facets.tcc \ | |
118 | ${bits_srcdir}/localefwd.h \ | |
119 | ${bits_srcdir}/mask_array.h \ | |
120 | ${bits_srcdir}/ostream.tcc \ | |
4a9d5109 SW |
121 | ${bits_srcdir}/stream_iterator.h \ |
122 | ${bits_srcdir}/streambuf_iterator.h \ | |
4a9d5109 SW |
123 | ${bits_srcdir}/slice_array.h \ |
124 | ${bits_srcdir}/sstream.tcc \ | |
4a9d5109 SW |
125 | ${bits_srcdir}/stl_algo.h \ |
126 | ${bits_srcdir}/stl_algobase.h \ | |
4a9d5109 SW |
127 | ${bits_srcdir}/stl_bvector.h \ |
128 | ${bits_srcdir}/stl_construct.h \ | |
129 | ${bits_srcdir}/stl_deque.h \ | |
130 | ${bits_srcdir}/stl_function.h \ | |
131 | ${bits_srcdir}/stl_heap.h \ | |
132 | ${bits_srcdir}/stl_iterator.h \ | |
133 | ${bits_srcdir}/stl_iterator_base_funcs.h \ | |
134 | ${bits_srcdir}/stl_iterator_base_types.h \ | |
135 | ${bits_srcdir}/stl_list.h \ | |
136 | ${bits_srcdir}/stl_map.h \ | |
137 | ${bits_srcdir}/stl_multimap.h \ | |
138 | ${bits_srcdir}/stl_multiset.h \ | |
139 | ${bits_srcdir}/stl_numeric.h \ | |
140 | ${bits_srcdir}/stl_pair.h \ | |
4a9d5109 SW |
141 | ${bits_srcdir}/stl_queue.h \ |
142 | ${bits_srcdir}/stl_raw_storage_iter.h \ | |
143 | ${bits_srcdir}/stl_relops.h \ | |
144 | ${bits_srcdir}/stl_set.h \ | |
145 | ${bits_srcdir}/stl_stack.h \ | |
146 | ${bits_srcdir}/stl_tempbuf.h \ | |
147 | ${bits_srcdir}/stl_threads.h \ | |
148 | ${bits_srcdir}/stl_tree.h \ | |
149 | ${bits_srcdir}/stl_uninitialized.h \ | |
150 | ${bits_srcdir}/stl_vector.h \ | |
151 | ${bits_srcdir}/streambuf.tcc \ | |
152 | ${bits_srcdir}/stringfwd.h \ | |
153 | ${bits_srcdir}/type_traits.h \ | |
154 | ${bits_srcdir}/valarray_array.h \ | |
155 | ${bits_srcdir}/valarray_array.tcc \ | |
c13bea50 NS |
156 | ${bits_srcdir}/valarray_before.h \ |
157 | ${bits_srcdir}/valarray_after.h \ | |
83144cfc | 158 | ${bits_srcdir}/vector.tcc |
4a9d5109 | 159 | |
3d7c150e | 160 | backward_srcdir = ${glibcxx_srcdir}/include/backward |
4a9d5109 SW |
161 | backward_builddir = ./backward |
162 | backward_headers = \ | |
163 | ${backward_srcdir}/complex.h \ | |
164 | ${backward_srcdir}/iomanip.h \ | |
165 | ${backward_srcdir}/istream.h \ | |
166 | ${backward_srcdir}/ostream.h \ | |
167 | ${backward_srcdir}/stream.h \ | |
168 | ${backward_srcdir}/streambuf.h \ | |
169 | ${backward_srcdir}/algo.h \ | |
170 | ${backward_srcdir}/algobase.h \ | |
171 | ${backward_srcdir}/alloc.h \ | |
172 | ${backward_srcdir}/bvector.h \ | |
173 | ${backward_srcdir}/defalloc.h \ | |
174 | ${backward_srcdir}/deque.h \ | |
175 | ${backward_srcdir}/function.h \ | |
176 | ${backward_srcdir}/hash_map.h \ | |
177 | ${backward_srcdir}/hash_set.h \ | |
178 | ${backward_srcdir}/hashtable.h \ | |
179 | ${backward_srcdir}/heap.h \ | |
180 | ${backward_srcdir}/iostream.h \ | |
181 | ${backward_srcdir}/iterator.h \ | |
182 | ${backward_srcdir}/list.h \ | |
183 | ${backward_srcdir}/map.h \ | |
184 | ${backward_srcdir}/multimap.h \ | |
185 | ${backward_srcdir}/new.h \ | |
186 | ${backward_srcdir}/multiset.h \ | |
187 | ${backward_srcdir}/pair.h \ | |
188 | ${backward_srcdir}/queue.h \ | |
189 | ${backward_srcdir}/rope.h \ | |
190 | ${backward_srcdir}/set.h \ | |
191 | ${backward_srcdir}/slist.h \ | |
192 | ${backward_srcdir}/stack.h \ | |
193 | ${backward_srcdir}/tempbuf.h \ | |
194 | ${backward_srcdir}/tree.h \ | |
195 | ${backward_srcdir}/vector.h \ | |
196 | ${backward_srcdir}/fstream.h \ | |
9a56333e | 197 | ${backward_srcdir}/strstream \ |
4a9d5109 SW |
198 | ${backward_srcdir}/backward_warning.h |
199 | ||
3d7c150e | 200 | ext_srcdir = ${glibcxx_srcdir}/include/ext |
4a9d5109 SW |
201 | ext_builddir = ./ext |
202 | ext_headers = \ | |
2c1bc4eb | 203 | ${ext_srcdir}/algorithm \ |
1ff9402d | 204 | ${ext_srcdir}/debug_allocator.h \ |
5cdd50a5 BK |
205 | ${ext_srcdir}/enc_filebuf.h \ |
206 | ${ext_srcdir}/stdio_filebuf.h \ | |
51ff8149 | 207 | ${ext_srcdir}/stdio_sync_filebuf.h \ |
01b0d4b8 | 208 | ${ext_srcdir}/functional \ |
3d90ff93 PE |
209 | ${ext_srcdir}/hash_map \ |
210 | ${ext_srcdir}/hash_set \ | |
211 | ${ext_srcdir}/iterator \ | |
1ff9402d | 212 | ${ext_srcdir}/malloc_allocator.h \ |
f53d0ff1 | 213 | ${ext_srcdir}/memory \ |
1ff9402d BK |
214 | ${ext_srcdir}/mt_allocator.h \ |
215 | ${ext_srcdir}/new_allocator.h \ | |
01b0d4b8 | 216 | ${ext_srcdir}/numeric \ |
9e7facfd | 217 | ${ext_srcdir}/pod_char_traits.h \ |
1ff9402d | 218 | ${ext_srcdir}/pool_allocator.h \ |
3b007b5d | 219 | ${ext_srcdir}/rb_tree \ |
4a9d5109 SW |
220 | ${ext_srcdir}/rope \ |
221 | ${ext_srcdir}/ropeimpl.h \ | |
4a9d5109 | 222 | ${ext_srcdir}/slist \ |
b2acb86f | 223 | ${ext_srcdir}/hash_fun.h \ |
82ba99d5 | 224 | ${ext_srcdir}/hashtable.h |
b2acb86f | 225 | |
4a9d5109 SW |
226 | |
227 | # This is the common subset of files that all three "C" header models use. | |
30c1fa76 | 228 | c_base_srcdir = @C_INCLUDE_DIR@ |
73249e33 | 229 | c_base_builddir = . |
4a9d5109 | 230 | c_base_headers = \ |
c5535768 BK |
231 | ${c_base_srcdir}/std_cassert.h \ |
232 | ${c_base_srcdir}/std_cctype.h \ | |
233 | ${c_base_srcdir}/std_cerrno.h \ | |
234 | ${c_base_srcdir}/std_cfloat.h \ | |
235 | ${c_base_srcdir}/std_ciso646.h \ | |
236 | ${c_base_srcdir}/std_climits.h \ | |
237 | ${c_base_srcdir}/std_clocale.h \ | |
238 | ${c_base_srcdir}/std_cmath.h \ | |
239 | ${c_base_srcdir}/std_csetjmp.h \ | |
240 | ${c_base_srcdir}/std_csignal.h \ | |
241 | ${c_base_srcdir}/std_cstdarg.h \ | |
242 | ${c_base_srcdir}/std_cstddef.h \ | |
243 | ${c_base_srcdir}/std_cstdio.h \ | |
244 | ${c_base_srcdir}/std_cstdlib.h \ | |
245 | ${c_base_srcdir}/std_cstring.h \ | |
246 | ${c_base_srcdir}/std_ctime.h \ | |
247 | ${c_base_srcdir}/std_cwchar.h \ | |
82ba99d5 | 248 | ${c_base_srcdir}/std_cwctype.h |
c5535768 BK |
249 | c_base_headers_rename = \ |
250 | cassert \ | |
251 | cctype \ | |
252 | cerrno \ | |
253 | cfloat \ | |
254 | ciso646 \ | |
255 | climits \ | |
256 | clocale \ | |
257 | cmath \ | |
258 | csetjmp \ | |
259 | csignal \ | |
260 | cstdarg \ | |
261 | cstddef \ | |
262 | cstdio \ | |
263 | cstdlib \ | |
264 | cstring \ | |
265 | ctime \ | |
266 | cwchar \ | |
82ba99d5 | 267 | cwctype |
4a9d5109 | 268 | |
e01c9849 | 269 | # "C" compatibility headers. |
3d7c150e | 270 | c_compatibility_srcdir = ${glibcxx_srcdir}/include/c_compatibility |
e01c9849 BK |
271 | c_compatibility_builddir = . |
272 | c_compatibility_headers = \ | |
273 | ${c_compatibility_srcdir}/assert.h \ | |
274 | ${c_compatibility_srcdir}/ctype.h \ | |
275 | ${c_compatibility_srcdir}/errno.h \ | |
276 | ${c_compatibility_srcdir}/float.h \ | |
277 | ${c_compatibility_srcdir}/iso646.h \ | |
278 | ${c_compatibility_srcdir}/limits.h \ | |
279 | ${c_compatibility_srcdir}/locale.h \ | |
280 | ${c_compatibility_srcdir}/math.h \ | |
281 | ${c_compatibility_srcdir}/setjmp.h \ | |
282 | ${c_compatibility_srcdir}/signal.h \ | |
283 | ${c_compatibility_srcdir}/stdarg.h \ | |
284 | ${c_compatibility_srcdir}/stddef.h \ | |
285 | ${c_compatibility_srcdir}/stdio.h \ | |
286 | ${c_compatibility_srcdir}/stdlib.h \ | |
287 | ${c_compatibility_srcdir}/string.h \ | |
288 | ${c_compatibility_srcdir}/time.h \ | |
289 | ${c_compatibility_srcdir}/wchar.h \ | |
82ba99d5 | 290 | ${c_compatibility_srcdir}/wctype.h |
e01c9849 | 291 | |
34ff0b99 | 292 | # Some of the different "C" header models need extra files. |
e01c9849 | 293 | # Some "C" header schemes require the "C" compatibility headers. |
34ff0b99 | 294 | # For --enable-cheaders=c_std |
3d7c150e | 295 | if GLIBCXX_C_HEADERS_C_STD |
82ba99d5 | 296 | c_base_headers_extra = ${c_base_srcdir}/cmath.tcc |
34ff0b99 | 297 | else |
82ba99d5 | 298 | c_base_headers_extra = |
34ff0b99 BK |
299 | endif |
300 | ||
3d7c150e | 301 | if GLIBCXX_C_HEADERS_COMPATIBILITY |
e01c9849 BK |
302 | c_compatibility_headers_extra = ${c_compatibility_headers} |
303 | else | |
82ba99d5 | 304 | c_compatibility_headers_extra = |
e01c9849 BK |
305 | endif |
306 | ||
3d7c150e | 307 | host_srcdir = ${glibcxx_srcdir}/@OS_INC_SRCDIR@ |
a30335e9 BK |
308 | host_builddir = ./${host_alias}/bits |
309 | host_headers = \ | |
310 | ${host_srcdir}/ctype_base.h \ | |
311 | ${host_srcdir}/ctype_inline.h \ | |
312 | ${host_srcdir}/ctype_noninline.h \ | |
313 | ${host_srcdir}/os_defines.h \ | |
3d7c150e | 314 | ${glibcxx_srcdir}/@ATOMICITY_INC_SRCDIR@/atomicity.h \ |
82ba99d5 | 315 | ${glibcxx_srcdir}/@FPOS_INC_SRCDIR@/fpos.h |
6aa43d99 | 316 | |
a30335e9 BK |
317 | # Non-installed host_header files. |
318 | host_headers_noinst = \ | |
3d7c150e | 319 | ${glibcxx_srcdir}/@CLOCALE_INTERNAL_H@ |
6aa43d99 | 320 | |
a30335e9 BK |
321 | # These host_headers_extra files are all built with ad hoc naming rules. |
322 | host_headers_extra = \ | |
323 | ${host_builddir}/basic_file.h \ | |
324 | ${host_builddir}/c++config.h \ | |
325 | ${host_builddir}/c++io.h \ | |
326 | ${host_builddir}/c++locale.h \ | |
327 | ${host_builddir}/messages_members.h \ | |
328 | ${host_builddir}/time_members.h \ | |
329 | ${host_builddir}/codecvt_specializations.h | |
330 | ||
331 | thread_host_headers = \ | |
332 | ${host_builddir}/gthr.h \ | |
333 | ${host_builddir}/gthr-single.h \ | |
334 | ${host_builddir}/gthr-posix.h \ | |
335 | ${host_builddir}/gthr-default.h | |
336 | ||
337 | pch_input = ${host_builddir}/stdc++.h | |
338 | pch_output_builddir = ${host_builddir}/stdc++.h.gch | |
3d7c150e | 339 | pch_source = ${glibcxx_srcdir}/include/stdc++.h |
9e57d5ca | 340 | PCHFLAGS=-Winvalid-pch -Wno-deprecated -x c++-header $(CXXFLAGS) |
3d7c150e | 341 | if GLIBCXX_BUILD_PCH |
8520f704 | 342 | pch_build = ${pch_input} |
9e57d5ca BK |
343 | pch_install = install-pch |
344 | else | |
82ba99d5 PE |
345 | pch_build = |
346 | pch_install = | |
9e57d5ca | 347 | endif |
628c731a | 348 | |
4a9d5109 SW |
349 | # List of all timestamp files. By keeping only one copy of this list, both |
350 | # CLEANFILES and all-local are kept up-to-date. | |
9e57d5ca | 351 | allstamped = \ |
e01c9849 | 352 | stamp-std stamp-bits stamp-c_base stamp-c_compatibility \ |
82ba99d5 | 353 | stamp-backward stamp-ext stamp-host |
9e57d5ca BK |
354 | |
355 | # List of all files that are created by explicit building, editing, or | |
356 | # catenation. | |
357 | allcreated = \ | |
a30335e9 BK |
358 | ${host_builddir}/c++config.h \ |
359 | ${thread_host_headers} \ | |
9e57d5ca | 360 | ${pch_build} |
4a9d5109 | 361 | |
4a9d5109 | 362 | # Here are the rules for building the headers |
82ba99d5 | 363 | all-local: ${allstamped} ${allcreated} |
4a9d5109 | 364 | |
066930bb PE |
365 | # This rule is slightly different, in that we must change the name of the |
366 | # local file from std_foo.h to foo. | |
4a9d5109 SW |
367 | stamp-std: ${std_headers} |
368 | @if [ ! -d "${std_builddir}" ]; then \ | |
369 | mkdir -p ${std_builddir} ;\ | |
370 | fi ;\ | |
7ec3af37 BK |
371 | if [ ! -f stamp-std ]; then \ |
372 | (cd ${std_builddir} && for h in $?; do \ | |
373 | official_name=`echo $$h | sed -e 's,.*/std_,,' -e 's,\.h$$,,'` ;\ | |
82ba99d5 | 374 | $(LN_S) $$h ./$${official_name} || true ;\ |
7ec3af37 | 375 | done) ;\ |
82ba99d5 PE |
376 | fi ;\ |
377 | $(STAMP) stamp-std | |
4a9d5109 SW |
378 | |
379 | stamp-bits: ${bits_headers} | |
380 | @if [ ! -d "${bits_builddir}" ]; then \ | |
381 | mkdir -p ${bits_builddir} ;\ | |
382 | fi ;\ | |
7ec3af37 | 383 | if [ ! -f stamp-bits ]; then \ |
82ba99d5 PE |
384 | (cd ${bits_builddir} && $(LN_S) $? . || true) ;\ |
385 | fi ;\ | |
386 | $(STAMP) stamp-bits | |
4a9d5109 | 387 | |
82ba99d5 | 388 | stamp-c_base: stamp-bits ${c_base_headers} ${c_base_headers_extra} |
4a9d5109 SW |
389 | @if [ ! -d "${c_base_builddir}" ]; then \ |
390 | mkdir -p ${c_base_builddir} ;\ | |
391 | fi ;\ | |
7ec3af37 | 392 | if [ ! -f stamp-c_base ]; then \ |
9e57d5ca BK |
393 | (cd ${c_base_builddir} && for h in ${c_base_headers}; do \ |
394 | official_name=`echo $$h | sed -e 's,.*/std_,,' -e 's,\.h$$,,'` ;\ | |
82ba99d5 | 395 | $(LN_S) $$h ./$${official_name} || true ;\ |
9e57d5ca | 396 | done) ;\ |
7ec3af37 | 397 | if [ ! -z "${c_base_headers_extra}" ]; then \ |
82ba99d5 | 398 | (cd ${bits_builddir} && $(LN_S) ${c_base_headers_extra} . || true) ;\ |
7ec3af37 | 399 | fi ;\ |
82ba99d5 PE |
400 | fi ;\ |
401 | $(STAMP) stamp-c_base | |
4a9d5109 | 402 | |
e01c9849 BK |
403 | stamp-c_compatibility: ${c_compatibility_headers_extra} |
404 | @if [ ! -d "${c_compatibility_builddir}" ]; then \ | |
405 | mkdir -p ${c_compatibility_builddir} ;\ | |
406 | fi ;\ | |
7ec3af37 BK |
407 | if [ ! -f stamp-c_compatibility ]; then \ |
408 | if [ ! -z "${c_compatibility_headers_extra}" ]; then \ | |
82ba99d5 | 409 | (cd ${c_compatibility_builddir} && $(LN_S) $? . || true) ;\ |
7ec3af37 | 410 | fi ;\ |
82ba99d5 PE |
411 | fi ;\ |
412 | $(STAMP) stamp-c_compatibility | |
e01c9849 | 413 | |
4a9d5109 SW |
414 | stamp-backward: ${backward_headers} |
415 | @if [ ! -d "${backward_builddir}" ]; then \ | |
416 | mkdir -p ${backward_builddir} ;\ | |
417 | fi ;\ | |
7ec3af37 | 418 | if [ ! -f stamp-backward ]; then \ |
82ba99d5 PE |
419 | (cd ${backward_builddir} && $(LN_S) $? . || true) ;\ |
420 | fi ;\ | |
421 | $(STAMP) stamp-backward | |
4a9d5109 SW |
422 | |
423 | stamp-ext: ${ext_headers} | |
424 | @if [ ! -d "${ext_builddir}" ]; then \ | |
7ec3af37 | 425 | mkdir -p ${ext_builddir} ;\ |
4a9d5109 | 426 | fi ;\ |
7ec3af37 | 427 | if [ ! -f stamp-ext ]; then \ |
82ba99d5 PE |
428 | (cd ${ext_builddir} && $(LN_S) $? . || true) ;\ |
429 | fi ;\ | |
430 | $(STAMP) stamp-ext | |
4a9d5109 | 431 | |
a30335e9 BK |
432 | stamp-${host_alias}: |
433 | @if [ ! -d ${host_builddir} ]; then \ | |
434 | mkdir -p ${host_builddir} ;\ | |
82ba99d5 PE |
435 | fi ;\ |
436 | $(STAMP) stamp-${host_alias} | |
843312be | 437 | |
a30335e9 BK |
438 | # Host includes static. |
439 | # XXX Missing dependency info for {host_headers_extra} | |
440 | stamp-host: ${host_headers} ${host_headers_noinst} stamp-${host_alias} | |
441 | @if [ ! -f stamp-host ]; then \ | |
442 | (cd ${host_builddir} ;\ | |
82ba99d5 PE |
443 | $(LN_S) ${host_headers} . || true ;\ |
444 | $(LN_S) ${glibcxx_srcdir}/@BASIC_FILE_H@ basic_file.h || true ;\ | |
445 | $(LN_S) ${glibcxx_srcdir}/@CSTDIO_H@ c++io.h || true ;\ | |
446 | $(LN_S) ${glibcxx_srcdir}/@CLOCALE_H@ c++locale.h || true ;\ | |
447 | $(LN_S) ${glibcxx_srcdir}/@CLOCALE_INTERNAL_H@ . || true ;\ | |
448 | $(LN_S) ${glibcxx_srcdir}/@CMESSAGES_H@ messages_members.h || true ;\ | |
449 | $(LN_S) ${glibcxx_srcdir}/@CTIME_H@ time_members.h || true ;\ | |
450 | $(LN_S) ${glibcxx_srcdir}/@CCODECVT_H@ codecvt_specializations.h || true);\ | |
451 | fi ;\ | |
452 | $(STAMP) stamp-host | |
4a9d5109 | 453 | |
a30335e9 | 454 | # Host includes dynamic. |
82ba99d5 | 455 | ${host_builddir}/c++config.h: ${top_builddir}/config.h \ |
3d7c150e | 456 | ${glibcxx_srcdir}/include/bits/c++config \ |
a30335e9 | 457 | stamp-${host_alias} |
3d7c150e BK |
458 | @cat ${glibcxx_srcdir}/include/bits/c++config > $@ ;\ |
459 | sed -e 's/HAVE_/_GLIBCXX_HAVE_/g' \ | |
460 | -e 's/PACKAGE/_GLIBCXX_PACKAGE/g' \ | |
461 | -e 's/VERSION/_GLIBCXX_VERSION/g' \ | |
462 | -e 's/WORDS_/_GLIBCXX_WORDS_/g' \ | |
42ebb17f | 463 | < ${CONFIG_HEADER} >> $@ ;\ |
3d7c150e | 464 | echo "#endif // _CXXCONFIG_" >>$@ |
4a9d5109 | 465 | |
a30335e9 | 466 | # Host includes for threads |
3d7c150e | 467 | glibcxx_thread_h = @glibcxx_thread_h@ |
4a9d5109 SW |
468 | uppercase = [ABCDEFGHIJKLMNOPQRSTUVWXYZ_] |
469 | ||
a30335e9 | 470 | ${host_builddir}/gthr.h: ${toplevel_srcdir}/gcc/gthr.h stamp-${host_alias} |
3d7c150e | 471 | sed -e '/^#/s/\(${uppercase}${uppercase}*\)/_GLIBCXX_\1/g' \ |
4a9d5109 | 472 | -e 's,^#include "\(.*\)",#include <bits/\1>,g' \ |
533ab4d1 | 473 | < ${toplevel_srcdir}/gcc/gthr.h > $@ |
4a9d5109 | 474 | |
a30335e9 BK |
475 | ${host_builddir}/gthr-single.h: ${toplevel_srcdir}/gcc/gthr-single.h \ |
476 | stamp-${host_alias} | |
3d7c150e BK |
477 | sed -e 's/\(UNUSED\)/_GLIBCXX_\1/g' \ |
478 | -e 's/\(GCC${uppercase}*_H\)/_GLIBCXX_\1/g' \ | |
533ab4d1 | 479 | < ${toplevel_srcdir}/gcc/gthr-single.h > $@ |
4a9d5109 | 480 | |
a30335e9 BK |
481 | ${host_builddir}/gthr-posix.h: ${toplevel_srcdir}/gcc/gthr-posix.h \ |
482 | stamp-${host_alias} | |
3d7c150e BK |
483 | sed -e 's/\(UNUSED\)/_GLIBCXX_\1/g' \ |
484 | -e 's/\(GCC${uppercase}*_H\)/_GLIBCXX_\1/g' \ | |
485 | -e 's/\(${uppercase}*WEAK\)/_GLIBCXX_\1/g' \ | |
79d6ba0b LR |
486 | < ${toplevel_srcdir}/gcc/gthr-posix.h > $@ |
487 | ||
3d7c150e | 488 | ${host_builddir}/gthr-default.h: ${toplevel_srcdir}/gcc/${glibcxx_thread_h} \ |
a30335e9 | 489 | stamp-${host_alias} |
3d7c150e BK |
490 | sed -e 's/\(UNUSED\)/_GLIBCXX_\1/g' \ |
491 | -e 's/\(GCC${uppercase}*_H\)/_GLIBCXX_\1/g' \ | |
492 | -e 's/\(${uppercase}*WEAK\)/_GLIBCXX_\1/g' \ | |
79d6ba0b | 493 | -e 's,^#include "\(.*\)",#include <bits/\1>,g' \ |
3d7c150e | 494 | < ${toplevel_srcdir}/gcc/${glibcxx_thread_h} > $@ |
4a9d5109 | 495 | |
9e57d5ca | 496 | # Build a precompiled C++ include, stdc++.h.gch. |
a30335e9 | 497 | ${pch_input}: ${allstamped} ${host_builddir}/c++config.h ${pch_source} |
9e57d5ca | 498 | touch ${pch_input}; \ |
8520f704 LR |
499 | if [ ! -d "${pch_output_builddir}" ]; then \ |
500 | mkdir -p ${pch_output_builddir}; \ | |
501 | fi; \ | |
0df3f383 PE |
502 | $(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) ${pch_source} -O0 -g -o ${pch_output_builddir}/O0g; \ |
503 | $(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) ${pch_source} -O2 -g -o ${pch_output_builddir}/O2g; | |
9e57d5ca | 504 | |
7bfea936 LR |
505 | # For robustness sake (in light of junk files or in-source |
506 | # configuration), copy from the build or source tree to the install | |
507 | # tree using only the human-maintained file lists and directory | |
508 | # components. Yes, with minor differences, this is sheer duplication | |
509 | # of the staging rules above using $(INSTALL_DATA) instead of LN_S and | |
3741b1ab | 510 | # `$(mkinstalldirs)' instead of `mkdir -p'. In particular, |
a30335e9 | 511 | # host_headers_extra are taken out of the build tree staging area; |
7bfea936 | 512 | # the rest are taken from the original source tree. |
9e57d5ca | 513 | |
92eabea2 | 514 | if GLIBCXX_HOSTED |
9e57d5ca | 515 | install-data-local: install-headers ${pch_install} |
92eabea2 PE |
516 | else |
517 | install-data-local: install-freestanding-headers | |
518 | endif | |
9e57d5ca | 519 | |
92eabea2 PE |
520 | # This is a subset of the full install-headers rule. We only need <cstddef>, |
521 | # <limits>, <cstdlib>, <cstdarg>, <new>, <typeinfo>, <exception>, and any | |
522 | # files which they include (and which we provide). The last three headers | |
523 | # are installed by libsupc++, so only the first four and the sub-includes | |
524 | # are copied here. | |
525 | install-freestanding-headers: | |
526 | $(mkinstalldirs) $(DESTDIR)${gxx_include_dir} | |
527 | $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${host_builddir} | |
528 | for file in ${host_srcdir}/os_defines.h ${host_builddir}/c++config.h; do \ | |
529 | $(INSTALL_DATA) $${file} $(DESTDIR)${gxx_include_dir}/${host_builddir}; done | |
530 | $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${std_builddir} | |
531 | $(INSTALL_DATA) ${std_builddir}/limits $(DESTDIR)${gxx_include_dir}/${std_builddir} | |
532 | $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${c_base_builddir} | |
533 | for file in cstddef cstdlib cstdarg; do \ | |
534 | $(INSTALL_DATA) ${c_base_builddir}/$${file} $(DESTDIR)${gxx_include_dir}/${c_base_builddir}; done | |
535 | ||
536 | # The real deal. | |
9e57d5ca | 537 | install-headers: |
90e5b39f CC |
538 | $(mkinstalldirs) $(DESTDIR)${gxx_include_dir} |
539 | $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${bits_builddir} | |
7bfea936 | 540 | for file in ${bits_headers}; do \ |
90e5b39f CC |
541 | $(INSTALL_DATA) $${file} $(DESTDIR)${gxx_include_dir}/${bits_builddir}; done |
542 | $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${backward_builddir} | |
7bfea936 | 543 | for file in ${backward_headers}; do \ |
90e5b39f CC |
544 | $(INSTALL_DATA) $${file} $(DESTDIR)${gxx_include_dir}/${backward_builddir}; done |
545 | $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${ext_builddir} | |
7bfea936 | 546 | for file in ${ext_headers}; do \ |
90e5b39f CC |
547 | $(INSTALL_DATA) $${file} $(DESTDIR)${gxx_include_dir}/${ext_builddir}; done |
548 | $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${c_base_builddir} | |
73249e33 | 549 | for file in ${c_base_headers_rename}; do \ |
90e5b39f | 550 | $(INSTALL_DATA) ${c_base_builddir}/$${file} $(DESTDIR)${gxx_include_dir}/${c_base_builddir}; done |
e01c9849 | 551 | c_base_headers_extra_install='$(c_base_headers_extra)';\ |
3eb35fcf | 552 | for file in $$c_base_headers_extra_install; do \ |
90e5b39f | 553 | $(INSTALL_DATA) $$file $(DESTDIR)${gxx_include_dir}/${bits_builddir}; done |
e01c9849 BK |
554 | c_compatibility_headers_install='$(c_compatibility_headers_extra)';\ |
555 | for file in $$c_compatibility_headers_install; do \ | |
90e5b39f CC |
556 | $(INSTALL_DATA) $$file $(DESTDIR)${gxx_include_dir}; done |
557 | $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${std_builddir} | |
73249e33 | 558 | for file in ${std_headers_rename}; do \ |
90e5b39f | 559 | $(INSTALL_DATA) ${std_builddir}/$${file} $(DESTDIR)${gxx_include_dir}/${std_builddir}; done |
a30335e9 BK |
560 | $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${host_builddir} |
561 | for file in ${host_headers} ${host_headers_extra} \ | |
562 | ${thread_host_headers}; do \ | |
563 | $(INSTALL_DATA) $${file} $(DESTDIR)${gxx_include_dir}/${host_builddir}; done | |
4a9d5109 | 564 | |
9e57d5ca | 565 | install-pch: |
8520f704 LR |
566 | $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${pch_output_builddir} |
567 | for file in ${pch_output_builddir}/*; do \ | |
568 | $(INSTALL_DATA) $$file $(DESTDIR)${gxx_include_dir}/${pch_output_builddir}; done | |
9e57d5ca | 569 | |
4e10943d | 570 | # By adding these files here, automake will remove them for 'make clean' |
53c2acdf | 571 | CLEANFILES = ${pch_input} ${pch_output_builddir}/* |
c5535768 BK |
572 | |
573 | # Stop implicit '.o' make rules from ever stomping on extensionless | |
574 | # headers, in the improbable case where some foolish, crack-addled | |
575 | # developer tries to create them via make in the include build | |
576 | # directory. (This is more of an example of how this kind of rule can | |
577 | # be made.) | |
578 | .PRECIOUS: $(std_headers_rename) $(c_base_headers_rename) | |
579 | $(std_headers_rename): ; @: | |
580 | $(c_base_headers_rename): ; @: |