]>
Commit | Line | Data |
---|---|---|
4a9d5109 SW |
1 | ## Makefile for the include subdirectory of the GNU C++ Standard library. |
2 | ## | |
c0736a9d | 3 | ## Copyright (C) 2001, 2002, 2003, 2004, 2005 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 | 94 | ${bits_srcdir}/allocator.h \ |
2c5d0ae8 | 95 | ${bits_srcdir}/atomicity.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 \ | |
3fe13738 | 104 | ${bits_srcdir}/concurrence.h \ |
4a9d5109 | 105 | ${bits_srcdir}/cpp_type_traits.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 \ | |
4c4809c1 | 121 | ${bits_srcdir}/postypes.h \ |
4a9d5109 SW |
122 | ${bits_srcdir}/stream_iterator.h \ |
123 | ${bits_srcdir}/streambuf_iterator.h \ | |
4a9d5109 SW |
124 | ${bits_srcdir}/slice_array.h \ |
125 | ${bits_srcdir}/sstream.tcc \ | |
4a9d5109 SW |
126 | ${bits_srcdir}/stl_algo.h \ |
127 | ${bits_srcdir}/stl_algobase.h \ | |
4a9d5109 SW |
128 | ${bits_srcdir}/stl_bvector.h \ |
129 | ${bits_srcdir}/stl_construct.h \ | |
130 | ${bits_srcdir}/stl_deque.h \ | |
131 | ${bits_srcdir}/stl_function.h \ | |
132 | ${bits_srcdir}/stl_heap.h \ | |
133 | ${bits_srcdir}/stl_iterator.h \ | |
134 | ${bits_srcdir}/stl_iterator_base_funcs.h \ | |
135 | ${bits_srcdir}/stl_iterator_base_types.h \ | |
136 | ${bits_srcdir}/stl_list.h \ | |
137 | ${bits_srcdir}/stl_map.h \ | |
138 | ${bits_srcdir}/stl_multimap.h \ | |
139 | ${bits_srcdir}/stl_multiset.h \ | |
140 | ${bits_srcdir}/stl_numeric.h \ | |
141 | ${bits_srcdir}/stl_pair.h \ | |
4a9d5109 SW |
142 | ${bits_srcdir}/stl_queue.h \ |
143 | ${bits_srcdir}/stl_raw_storage_iter.h \ | |
144 | ${bits_srcdir}/stl_relops.h \ | |
145 | ${bits_srcdir}/stl_set.h \ | |
146 | ${bits_srcdir}/stl_stack.h \ | |
147 | ${bits_srcdir}/stl_tempbuf.h \ | |
4a9d5109 SW |
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 \ | |
4a9d5109 SW |
153 | ${bits_srcdir}/valarray_array.h \ |
154 | ${bits_srcdir}/valarray_array.tcc \ | |
c13bea50 NS |
155 | ${bits_srcdir}/valarray_before.h \ |
156 | ${bits_srcdir}/valarray_after.h \ | |
83144cfc | 157 | ${bits_srcdir}/vector.tcc |
4a9d5109 | 158 | |
3d7c150e | 159 | backward_srcdir = ${glibcxx_srcdir}/include/backward |
4a9d5109 SW |
160 | backward_builddir = ./backward |
161 | backward_headers = \ | |
162 | ${backward_srcdir}/complex.h \ | |
163 | ${backward_srcdir}/iomanip.h \ | |
164 | ${backward_srcdir}/istream.h \ | |
165 | ${backward_srcdir}/ostream.h \ | |
166 | ${backward_srcdir}/stream.h \ | |
167 | ${backward_srcdir}/streambuf.h \ | |
168 | ${backward_srcdir}/algo.h \ | |
169 | ${backward_srcdir}/algobase.h \ | |
170 | ${backward_srcdir}/alloc.h \ | |
171 | ${backward_srcdir}/bvector.h \ | |
172 | ${backward_srcdir}/defalloc.h \ | |
173 | ${backward_srcdir}/deque.h \ | |
174 | ${backward_srcdir}/function.h \ | |
175 | ${backward_srcdir}/hash_map.h \ | |
176 | ${backward_srcdir}/hash_set.h \ | |
177 | ${backward_srcdir}/hashtable.h \ | |
178 | ${backward_srcdir}/heap.h \ | |
179 | ${backward_srcdir}/iostream.h \ | |
180 | ${backward_srcdir}/iterator.h \ | |
181 | ${backward_srcdir}/list.h \ | |
182 | ${backward_srcdir}/map.h \ | |
183 | ${backward_srcdir}/multimap.h \ | |
184 | ${backward_srcdir}/new.h \ | |
185 | ${backward_srcdir}/multiset.h \ | |
186 | ${backward_srcdir}/pair.h \ | |
187 | ${backward_srcdir}/queue.h \ | |
188 | ${backward_srcdir}/rope.h \ | |
189 | ${backward_srcdir}/set.h \ | |
190 | ${backward_srcdir}/slist.h \ | |
191 | ${backward_srcdir}/stack.h \ | |
192 | ${backward_srcdir}/tempbuf.h \ | |
193 | ${backward_srcdir}/tree.h \ | |
194 | ${backward_srcdir}/vector.h \ | |
195 | ${backward_srcdir}/fstream.h \ | |
9a56333e | 196 | ${backward_srcdir}/strstream \ |
4a9d5109 SW |
197 | ${backward_srcdir}/backward_warning.h |
198 | ||
3d7c150e | 199 | ext_srcdir = ${glibcxx_srcdir}/include/ext |
4a9d5109 SW |
200 | ext_builddir = ./ext |
201 | ext_headers = \ | |
2c1bc4eb | 202 | ${ext_srcdir}/algorithm \ |
3febde35 | 203 | ${ext_srcdir}/array_allocator.h \ |
009368db | 204 | ${ext_srcdir}/bitmap_allocator.h \ |
825bd0e1 | 205 | ${ext_srcdir}/codecvt_specializations.h \ |
1ff9402d | 206 | ${ext_srcdir}/debug_allocator.h \ |
5cdd50a5 | 207 | ${ext_srcdir}/stdio_filebuf.h \ |
51ff8149 | 208 | ${ext_srcdir}/stdio_sync_filebuf.h \ |
01b0d4b8 | 209 | ${ext_srcdir}/functional \ |
3d90ff93 PE |
210 | ${ext_srcdir}/hash_map \ |
211 | ${ext_srcdir}/hash_set \ | |
212 | ${ext_srcdir}/iterator \ | |
1ff9402d | 213 | ${ext_srcdir}/malloc_allocator.h \ |
f53d0ff1 | 214 | ${ext_srcdir}/memory \ |
1ff9402d BK |
215 | ${ext_srcdir}/mt_allocator.h \ |
216 | ${ext_srcdir}/new_allocator.h \ | |
01b0d4b8 | 217 | ${ext_srcdir}/numeric \ |
9e7facfd | 218 | ${ext_srcdir}/pod_char_traits.h \ |
1ff9402d | 219 | ${ext_srcdir}/pool_allocator.h \ |
3b007b5d | 220 | ${ext_srcdir}/rb_tree \ |
4a9d5109 SW |
221 | ${ext_srcdir}/rope \ |
222 | ${ext_srcdir}/ropeimpl.h \ | |
4a9d5109 | 223 | ${ext_srcdir}/slist \ |
b2acb86f | 224 | ${ext_srcdir}/hash_fun.h \ |
82ba99d5 | 225 | ${ext_srcdir}/hashtable.h |
b2acb86f | 226 | |
3febde35 BK |
227 | tr1_srcdir = ${glibcxx_srcdir}/include/tr1 |
228 | tr1_builddir = ./tr1 | |
229 | tr1_headers = \ | |
a520f0b0 | 230 | ${tr1_srcdir}/array \ |
f2ede5d6 | 231 | ${tr1_srcdir}/functional \ |
7dfded91 | 232 | ${tr1_srcdir}/memory \ |
f2ede5d6 | 233 | ${tr1_srcdir}/tuple \ |
493bc460 | 234 | ${tr1_srcdir}/utility \ |
821c5063 | 235 | ${tr1_srcdir}/type_traits \ |
180ecd6a MA |
236 | ${tr1_srcdir}/type_traits_fwd.h \ |
237 | ${tr1_srcdir}/hashtable \ | |
238 | ${tr1_srcdir}/unordered_set \ | |
239 | ${tr1_srcdir}/unordered_map | |
f2ede5d6 | 240 | |
3febde35 | 241 | |
4a9d5109 | 242 | # This is the common subset of files that all three "C" header models use. |
ca618b60 | 243 | c_base_srcdir = $(C_INCLUDE_DIR) |
73249e33 | 244 | c_base_builddir = . |
4a9d5109 | 245 | c_base_headers = \ |
c5535768 BK |
246 | ${c_base_srcdir}/std_cassert.h \ |
247 | ${c_base_srcdir}/std_cctype.h \ | |
248 | ${c_base_srcdir}/std_cerrno.h \ | |
249 | ${c_base_srcdir}/std_cfloat.h \ | |
250 | ${c_base_srcdir}/std_ciso646.h \ | |
251 | ${c_base_srcdir}/std_climits.h \ | |
252 | ${c_base_srcdir}/std_clocale.h \ | |
253 | ${c_base_srcdir}/std_cmath.h \ | |
254 | ${c_base_srcdir}/std_csetjmp.h \ | |
255 | ${c_base_srcdir}/std_csignal.h \ | |
256 | ${c_base_srcdir}/std_cstdarg.h \ | |
257 | ${c_base_srcdir}/std_cstddef.h \ | |
258 | ${c_base_srcdir}/std_cstdio.h \ | |
259 | ${c_base_srcdir}/std_cstdlib.h \ | |
260 | ${c_base_srcdir}/std_cstring.h \ | |
261 | ${c_base_srcdir}/std_ctime.h \ | |
262 | ${c_base_srcdir}/std_cwchar.h \ | |
82ba99d5 | 263 | ${c_base_srcdir}/std_cwctype.h |
c5535768 BK |
264 | c_base_headers_rename = \ |
265 | cassert \ | |
266 | cctype \ | |
267 | cerrno \ | |
268 | cfloat \ | |
269 | ciso646 \ | |
270 | climits \ | |
271 | clocale \ | |
272 | cmath \ | |
273 | csetjmp \ | |
274 | csignal \ | |
275 | cstdarg \ | |
276 | cstddef \ | |
277 | cstdio \ | |
278 | cstdlib \ | |
279 | cstring \ | |
280 | ctime \ | |
281 | cwchar \ | |
82ba99d5 | 282 | cwctype |
4a9d5109 | 283 | |
e01c9849 | 284 | # "C" compatibility headers. |
3d7c150e | 285 | c_compatibility_srcdir = ${glibcxx_srcdir}/include/c_compatibility |
e01c9849 BK |
286 | c_compatibility_builddir = . |
287 | c_compatibility_headers = \ | |
288 | ${c_compatibility_srcdir}/assert.h \ | |
289 | ${c_compatibility_srcdir}/ctype.h \ | |
290 | ${c_compatibility_srcdir}/errno.h \ | |
291 | ${c_compatibility_srcdir}/float.h \ | |
292 | ${c_compatibility_srcdir}/iso646.h \ | |
293 | ${c_compatibility_srcdir}/limits.h \ | |
294 | ${c_compatibility_srcdir}/locale.h \ | |
295 | ${c_compatibility_srcdir}/math.h \ | |
296 | ${c_compatibility_srcdir}/setjmp.h \ | |
297 | ${c_compatibility_srcdir}/signal.h \ | |
298 | ${c_compatibility_srcdir}/stdarg.h \ | |
299 | ${c_compatibility_srcdir}/stddef.h \ | |
300 | ${c_compatibility_srcdir}/stdio.h \ | |
301 | ${c_compatibility_srcdir}/stdlib.h \ | |
302 | ${c_compatibility_srcdir}/string.h \ | |
303 | ${c_compatibility_srcdir}/time.h \ | |
304 | ${c_compatibility_srcdir}/wchar.h \ | |
82ba99d5 | 305 | ${c_compatibility_srcdir}/wctype.h |
e01c9849 | 306 | |
285b36d6 BK |
307 | # Debug mode headers |
308 | debug_srcdir = ${glibcxx_srcdir}/include/debug | |
309 | debug_builddir = ./debug | |
310 | debug_headers = \ | |
311 | ${debug_srcdir}/bitset \ | |
312 | ${debug_srcdir}/debug.h \ | |
313 | ${debug_srcdir}/deque \ | |
314 | ${debug_srcdir}/formatter.h \ | |
315 | ${debug_srcdir}/hash_map \ | |
316 | ${debug_srcdir}/hash_map.h \ | |
317 | ${debug_srcdir}/hash_multimap.h \ | |
318 | ${debug_srcdir}/hash_multiset.h \ | |
319 | ${debug_srcdir}/hash_set \ | |
320 | ${debug_srcdir}/hash_set.h \ | |
321 | ${debug_srcdir}/list \ | |
322 | ${debug_srcdir}/map \ | |
323 | ${debug_srcdir}/map.h \ | |
324 | ${debug_srcdir}/multimap.h \ | |
325 | ${debug_srcdir}/multiset.h \ | |
326 | ${debug_srcdir}/safe_base.h \ | |
327 | ${debug_srcdir}/safe_iterator.h \ | |
328 | ${debug_srcdir}/safe_iterator.tcc \ | |
329 | ${debug_srcdir}/safe_sequence.h \ | |
330 | ${debug_srcdir}/set \ | |
331 | ${debug_srcdir}/set.h \ | |
332 | ${debug_srcdir}/string \ | |
333 | ${debug_srcdir}/vector | |
334 | ||
34ff0b99 | 335 | # Some of the different "C" header models need extra files. |
e01c9849 | 336 | # Some "C" header schemes require the "C" compatibility headers. |
34ff0b99 | 337 | # For --enable-cheaders=c_std |
3d7c150e | 338 | if GLIBCXX_C_HEADERS_C_STD |
82ba99d5 | 339 | c_base_headers_extra = ${c_base_srcdir}/cmath.tcc |
34ff0b99 | 340 | else |
82ba99d5 | 341 | c_base_headers_extra = |
34ff0b99 BK |
342 | endif |
343 | ||
3d7c150e | 344 | if GLIBCXX_C_HEADERS_COMPATIBILITY |
e01c9849 BK |
345 | c_compatibility_headers_extra = ${c_compatibility_headers} |
346 | else | |
82ba99d5 | 347 | c_compatibility_headers_extra = |
e01c9849 BK |
348 | endif |
349 | ||
ca618b60 | 350 | host_srcdir = ${glibcxx_srcdir}/$(OS_INC_SRCDIR) |
a30335e9 BK |
351 | host_builddir = ./${host_alias}/bits |
352 | host_headers = \ | |
353 | ${host_srcdir}/ctype_base.h \ | |
354 | ${host_srcdir}/ctype_inline.h \ | |
355 | ${host_srcdir}/ctype_noninline.h \ | |
356 | ${host_srcdir}/os_defines.h \ | |
1568430f PB |
357 | ${glibcxx_srcdir}/$(ATOMIC_WORD_SRCDIR)/atomic_word.h \ |
358 | ${glibcxx_srcdir}/$(ABI_TWEAKS_SRCDIR)/cxxabi_tweaks.h | |
6aa43d99 | 359 | |
a30335e9 BK |
360 | # Non-installed host_header files. |
361 | host_headers_noinst = \ | |
ca618b60 | 362 | ${glibcxx_srcdir}/$(CLOCALE_INTERNAL_H) |
6aa43d99 | 363 | |
a30335e9 BK |
364 | # These host_headers_extra files are all built with ad hoc naming rules. |
365 | host_headers_extra = \ | |
366 | ${host_builddir}/basic_file.h \ | |
367 | ${host_builddir}/c++config.h \ | |
8b0d6051 | 368 | ${host_builddir}/c++allocator.h \ |
a30335e9 BK |
369 | ${host_builddir}/c++io.h \ |
370 | ${host_builddir}/c++locale.h \ | |
371 | ${host_builddir}/messages_members.h \ | |
825bd0e1 | 372 | ${host_builddir}/time_members.h |
a30335e9 BK |
373 | |
374 | thread_host_headers = \ | |
375 | ${host_builddir}/gthr.h \ | |
376 | ${host_builddir}/gthr-single.h \ | |
377 | ${host_builddir}/gthr-posix.h \ | |
512baaea | 378 | ${host_builddir}/gthr-tpf.h \ |
a30335e9 BK |
379 | ${host_builddir}/gthr-default.h |
380 | ||
381 | pch_input = ${host_builddir}/stdc++.h | |
382 | pch_output_builddir = ${host_builddir}/stdc++.h.gch | |
3d7c150e | 383 | pch_source = ${glibcxx_srcdir}/include/stdc++.h |
9e57d5ca | 384 | PCHFLAGS=-Winvalid-pch -Wno-deprecated -x c++-header $(CXXFLAGS) |
3d7c150e | 385 | if GLIBCXX_BUILD_PCH |
8520f704 | 386 | pch_build = ${pch_input} |
9e57d5ca BK |
387 | pch_install = install-pch |
388 | else | |
82ba99d5 PE |
389 | pch_build = |
390 | pch_install = | |
9e57d5ca | 391 | endif |
628c731a | 392 | |
4a9d5109 SW |
393 | # List of all timestamp files. By keeping only one copy of this list, both |
394 | # CLEANFILES and all-local are kept up-to-date. | |
9e57d5ca | 395 | allstamped = \ |
e01c9849 | 396 | stamp-std stamp-bits stamp-c_base stamp-c_compatibility \ |
3febde35 | 397 | stamp-backward stamp-ext stamp-tr1 stamp-debug stamp-host |
9e57d5ca BK |
398 | |
399 | # List of all files that are created by explicit building, editing, or | |
400 | # catenation. | |
401 | allcreated = \ | |
a30335e9 BK |
402 | ${host_builddir}/c++config.h \ |
403 | ${thread_host_headers} \ | |
9e57d5ca | 404 | ${pch_build} |
4a9d5109 | 405 | |
4a9d5109 | 406 | # Here are the rules for building the headers |
82ba99d5 | 407 | all-local: ${allstamped} ${allcreated} |
4a9d5109 | 408 | |
066930bb PE |
409 | # This rule is slightly different, in that we must change the name of the |
410 | # local file from std_foo.h to foo. | |
4a9d5109 SW |
411 | stamp-std: ${std_headers} |
412 | @if [ ! -d "${std_builddir}" ]; then \ | |
413 | mkdir -p ${std_builddir} ;\ | |
414 | fi ;\ | |
7ec3af37 BK |
415 | if [ ! -f stamp-std ]; then \ |
416 | (cd ${std_builddir} && for h in $?; do \ | |
417 | official_name=`echo $$h | sed -e 's,.*/std_,,' -e 's,\.h$$,,'` ;\ | |
82ba99d5 | 418 | $(LN_S) $$h ./$${official_name} || true ;\ |
7ec3af37 | 419 | done) ;\ |
82ba99d5 PE |
420 | fi ;\ |
421 | $(STAMP) stamp-std | |
4a9d5109 SW |
422 | |
423 | stamp-bits: ${bits_headers} | |
424 | @if [ ! -d "${bits_builddir}" ]; then \ | |
425 | mkdir -p ${bits_builddir} ;\ | |
426 | fi ;\ | |
7ec3af37 | 427 | if [ ! -f stamp-bits ]; then \ |
82ba99d5 PE |
428 | (cd ${bits_builddir} && $(LN_S) $? . || true) ;\ |
429 | fi ;\ | |
430 | $(STAMP) stamp-bits | |
4a9d5109 | 431 | |
82ba99d5 | 432 | stamp-c_base: stamp-bits ${c_base_headers} ${c_base_headers_extra} |
4a9d5109 SW |
433 | @if [ ! -d "${c_base_builddir}" ]; then \ |
434 | mkdir -p ${c_base_builddir} ;\ | |
435 | fi ;\ | |
7ec3af37 | 436 | if [ ! -f stamp-c_base ]; then \ |
9e57d5ca BK |
437 | (cd ${c_base_builddir} && for h in ${c_base_headers}; do \ |
438 | official_name=`echo $$h | sed -e 's,.*/std_,,' -e 's,\.h$$,,'` ;\ | |
82ba99d5 | 439 | $(LN_S) $$h ./$${official_name} || true ;\ |
9e57d5ca | 440 | done) ;\ |
7ec3af37 | 441 | if [ ! -z "${c_base_headers_extra}" ]; then \ |
82ba99d5 | 442 | (cd ${bits_builddir} && $(LN_S) ${c_base_headers_extra} . || true) ;\ |
7ec3af37 | 443 | fi ;\ |
82ba99d5 PE |
444 | fi ;\ |
445 | $(STAMP) stamp-c_base | |
4a9d5109 | 446 | |
e01c9849 BK |
447 | stamp-c_compatibility: ${c_compatibility_headers_extra} |
448 | @if [ ! -d "${c_compatibility_builddir}" ]; then \ | |
449 | mkdir -p ${c_compatibility_builddir} ;\ | |
450 | fi ;\ | |
7ec3af37 BK |
451 | if [ ! -f stamp-c_compatibility ]; then \ |
452 | if [ ! -z "${c_compatibility_headers_extra}" ]; then \ | |
82ba99d5 | 453 | (cd ${c_compatibility_builddir} && $(LN_S) $? . || true) ;\ |
7ec3af37 | 454 | fi ;\ |
82ba99d5 PE |
455 | fi ;\ |
456 | $(STAMP) stamp-c_compatibility | |
e01c9849 | 457 | |
4a9d5109 SW |
458 | stamp-backward: ${backward_headers} |
459 | @if [ ! -d "${backward_builddir}" ]; then \ | |
460 | mkdir -p ${backward_builddir} ;\ | |
461 | fi ;\ | |
7ec3af37 | 462 | if [ ! -f stamp-backward ]; then \ |
82ba99d5 PE |
463 | (cd ${backward_builddir} && $(LN_S) $? . || true) ;\ |
464 | fi ;\ | |
465 | $(STAMP) stamp-backward | |
4a9d5109 SW |
466 | |
467 | stamp-ext: ${ext_headers} | |
468 | @if [ ! -d "${ext_builddir}" ]; then \ | |
7ec3af37 | 469 | mkdir -p ${ext_builddir} ;\ |
4a9d5109 | 470 | fi ;\ |
7ec3af37 | 471 | if [ ! -f stamp-ext ]; then \ |
82ba99d5 PE |
472 | (cd ${ext_builddir} && $(LN_S) $? . || true) ;\ |
473 | fi ;\ | |
474 | $(STAMP) stamp-ext | |
4a9d5109 | 475 | |
3febde35 BK |
476 | |
477 | stamp-tr1: ${tr1_headers} | |
478 | @if [ ! -d "${tr1_builddir}" ]; then \ | |
479 | mkdir -p ${tr1_builddir} ;\ | |
480 | fi ;\ | |
481 | if [ ! -f stamp-tr1 ]; then \ | |
482 | (cd ${tr1_builddir} && $(LN_S) $? . || true) ;\ | |
483 | fi ;\ | |
484 | $(STAMP) stamp-tr1 | |
485 | ||
285b36d6 BK |
486 | stamp-debug: ${debug_headers} |
487 | @if [ ! -d "${debug_builddir}" ]; then \ | |
488 | mkdir -p ${debug_builddir} ;\ | |
489 | fi ;\ | |
490 | if [ ! -f stamp-debug ]; then \ | |
491 | (cd ${debug_builddir} && @LN_S@ $? . || true) ;\ | |
492 | fi ;\ | |
493 | $(STAMP) stamp-debug | |
494 | ||
a30335e9 BK |
495 | stamp-${host_alias}: |
496 | @if [ ! -d ${host_builddir} ]; then \ | |
497 | mkdir -p ${host_builddir} ;\ | |
82ba99d5 PE |
498 | fi ;\ |
499 | $(STAMP) stamp-${host_alias} | |
843312be | 500 | |
a30335e9 BK |
501 | # Host includes static. |
502 | # XXX Missing dependency info for {host_headers_extra} | |
503 | stamp-host: ${host_headers} ${host_headers_noinst} stamp-${host_alias} | |
504 | @if [ ! -f stamp-host ]; then \ | |
505 | (cd ${host_builddir} ;\ | |
82ba99d5 | 506 | $(LN_S) ${host_headers} . || true ;\ |
ca618b60 | 507 | $(LN_S) ${glibcxx_srcdir}/$(BASIC_FILE_H) basic_file.h || true ;\ |
8b0d6051 | 508 | $(LN_S) ${glibcxx_srcdir}/$(ALLOCATOR_H) c++allocator.h || true ;\ |
ca618b60 PE |
509 | $(LN_S) ${glibcxx_srcdir}/$(CSTDIO_H) c++io.h || true ;\ |
510 | $(LN_S) ${glibcxx_srcdir}/$(CLOCALE_H) c++locale.h || true ;\ | |
511 | $(LN_S) ${glibcxx_srcdir}/$(CLOCALE_INTERNAL_H) . || true ;\ | |
512 | $(LN_S) ${glibcxx_srcdir}/$(CMESSAGES_H) messages_members.h || true ;\ | |
513 | $(LN_S) ${glibcxx_srcdir}/$(CTIME_H) time_members.h || true ;\ | |
514 | $(LN_S) ${glibcxx_srcdir}/$(CCODECVT_H) codecvt_specializations.h || true);\ | |
82ba99d5 PE |
515 | fi ;\ |
516 | $(STAMP) stamp-host | |
4a9d5109 | 517 | |
a30335e9 | 518 | # Host includes dynamic. |
82ba99d5 | 519 | ${host_builddir}/c++config.h: ${top_builddir}/config.h \ |
3d7c150e | 520 | ${glibcxx_srcdir}/include/bits/c++config \ |
a30335e9 | 521 | stamp-${host_alias} |
3d7c150e BK |
522 | @cat ${glibcxx_srcdir}/include/bits/c++config > $@ ;\ |
523 | sed -e 's/HAVE_/_GLIBCXX_HAVE_/g' \ | |
524 | -e 's/PACKAGE/_GLIBCXX_PACKAGE/g' \ | |
525 | -e 's/VERSION/_GLIBCXX_VERSION/g' \ | |
526 | -e 's/WORDS_/_GLIBCXX_WORDS_/g' \ | |
42ebb17f | 527 | < ${CONFIG_HEADER} >> $@ ;\ |
3d7c150e | 528 | echo "#endif // _CXXCONFIG_" >>$@ |
4a9d5109 | 529 | |
a30335e9 | 530 | # Host includes for threads |
4a9d5109 SW |
531 | uppercase = [ABCDEFGHIJKLMNOPQRSTUVWXYZ_] |
532 | ||
a30335e9 | 533 | ${host_builddir}/gthr.h: ${toplevel_srcdir}/gcc/gthr.h stamp-${host_alias} |
168aacd9 JM |
534 | sed -e '/^#pragma/b' \ |
535 | -e '/^#/s/\(${uppercase}${uppercase}*\)/_GLIBCXX_\1/g' \ | |
ec2075e9 | 536 | -e 's/_GLIBCXX_SUPPORTS_WEAK/__GXX_WEAK__/g' \ |
4a9d5109 | 537 | -e 's,^#include "\(.*\)",#include <bits/\1>,g' \ |
533ab4d1 | 538 | < ${toplevel_srcdir}/gcc/gthr.h > $@ |
4a9d5109 | 539 | |
a30335e9 BK |
540 | ${host_builddir}/gthr-single.h: ${toplevel_srcdir}/gcc/gthr-single.h \ |
541 | stamp-${host_alias} | |
3d7c150e BK |
542 | sed -e 's/\(UNUSED\)/_GLIBCXX_\1/g' \ |
543 | -e 's/\(GCC${uppercase}*_H\)/_GLIBCXX_\1/g' \ | |
533ab4d1 | 544 | < ${toplevel_srcdir}/gcc/gthr-single.h > $@ |
4a9d5109 | 545 | |
a30335e9 BK |
546 | ${host_builddir}/gthr-posix.h: ${toplevel_srcdir}/gcc/gthr-posix.h \ |
547 | stamp-${host_alias} | |
3d7c150e BK |
548 | sed -e 's/\(UNUSED\)/_GLIBCXX_\1/g' \ |
549 | -e 's/\(GCC${uppercase}*_H\)/_GLIBCXX_\1/g' \ | |
ec2075e9 BK |
550 | -e 's/SUPPORTS_WEAK/__GXX_WEAK__/g' \ |
551 | -e 's/\(${uppercase}*USE_WEAK\)/_GLIBCXX_\1/g' \ | |
79d6ba0b LR |
552 | < ${toplevel_srcdir}/gcc/gthr-posix.h > $@ |
553 | ||
512baaea D |
554 | ${host_builddir}/gthr-tpf.h: ${toplevel_srcdir}/gcc/gthr-tpf.h \ |
555 | stamp-${host_alias} | |
556 | sed -e 's/\(UNUSED\)/_GLIBCXX_\1/g' \ | |
557 | -e 's/\(GCC${uppercase}*_H\)/_GLIBCXX_\1/g' \ | |
558 | -e 's/SUPPORTS_WEAK/__GXX_WEAK__/g' \ | |
559 | -e 's/\(${uppercase}*USE_WEAK\)/_GLIBCXX_\1/g' \ | |
560 | < ${toplevel_srcdir}/gcc/gthr-tpf.h > $@ | |
561 | ||
3d7c150e | 562 | ${host_builddir}/gthr-default.h: ${toplevel_srcdir}/gcc/${glibcxx_thread_h} \ |
a30335e9 | 563 | stamp-${host_alias} |
3d7c150e BK |
564 | sed -e 's/\(UNUSED\)/_GLIBCXX_\1/g' \ |
565 | -e 's/\(GCC${uppercase}*_H\)/_GLIBCXX_\1/g' \ | |
ec2075e9 BK |
566 | -e 's/SUPPORTS_WEAK/__GXX_WEAK__/g' \ |
567 | -e 's/\(${uppercase}*USE_WEAK\)/_GLIBCXX_\1/g' \ | |
79d6ba0b | 568 | -e 's,^#include "\(.*\)",#include <bits/\1>,g' \ |
3d7c150e | 569 | < ${toplevel_srcdir}/gcc/${glibcxx_thread_h} > $@ |
4a9d5109 | 570 | |
9e57d5ca | 571 | # Build a precompiled C++ include, stdc++.h.gch. |
a30335e9 | 572 | ${pch_input}: ${allstamped} ${host_builddir}/c++config.h ${pch_source} |
7dfded91 | 573 | cp ${pch_source} ${pch_input}; \ |
8520f704 LR |
574 | if [ ! -d "${pch_output_builddir}" ]; then \ |
575 | mkdir -p ${pch_output_builddir}; \ | |
576 | fi; \ | |
e4cb0c04 PB |
577 | $(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) ${pch_source} -O0 -g -o ${pch_output_builddir}/O0g.gch; \ |
578 | $(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) ${pch_source} -O2 -g -o ${pch_output_builddir}/O2g.gch; | |
9e57d5ca | 579 | |
7bfea936 LR |
580 | # For robustness sake (in light of junk files or in-source |
581 | # configuration), copy from the build or source tree to the install | |
582 | # tree using only the human-maintained file lists and directory | |
583 | # components. Yes, with minor differences, this is sheer duplication | |
584 | # of the staging rules above using $(INSTALL_DATA) instead of LN_S and | |
3741b1ab | 585 | # `$(mkinstalldirs)' instead of `mkdir -p'. In particular, |
a30335e9 | 586 | # host_headers_extra are taken out of the build tree staging area; |
7bfea936 | 587 | # the rest are taken from the original source tree. |
9e57d5ca | 588 | |
92eabea2 | 589 | if GLIBCXX_HOSTED |
9e57d5ca | 590 | install-data-local: install-headers ${pch_install} |
92eabea2 PE |
591 | else |
592 | install-data-local: install-freestanding-headers | |
593 | endif | |
9e57d5ca | 594 | |
92eabea2 PE |
595 | # This is a subset of the full install-headers rule. We only need <cstddef>, |
596 | # <limits>, <cstdlib>, <cstdarg>, <new>, <typeinfo>, <exception>, and any | |
597 | # files which they include (and which we provide). The last three headers | |
598 | # are installed by libsupc++, so only the first four and the sub-includes | |
599 | # are copied here. | |
600 | install-freestanding-headers: | |
601 | $(mkinstalldirs) $(DESTDIR)${gxx_include_dir} | |
602 | $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${host_builddir} | |
603 | for file in ${host_srcdir}/os_defines.h ${host_builddir}/c++config.h; do \ | |
604 | $(INSTALL_DATA) $${file} $(DESTDIR)${gxx_include_dir}/${host_builddir}; done | |
605 | $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${std_builddir} | |
606 | $(INSTALL_DATA) ${std_builddir}/limits $(DESTDIR)${gxx_include_dir}/${std_builddir} | |
607 | $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${c_base_builddir} | |
608 | for file in cstddef cstdlib cstdarg; do \ | |
609 | $(INSTALL_DATA) ${c_base_builddir}/$${file} $(DESTDIR)${gxx_include_dir}/${c_base_builddir}; done | |
610 | ||
611 | # The real deal. | |
9e57d5ca | 612 | install-headers: |
90e5b39f CC |
613 | $(mkinstalldirs) $(DESTDIR)${gxx_include_dir} |
614 | $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${bits_builddir} | |
7bfea936 | 615 | for file in ${bits_headers}; do \ |
90e5b39f CC |
616 | $(INSTALL_DATA) $${file} $(DESTDIR)${gxx_include_dir}/${bits_builddir}; done |
617 | $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${backward_builddir} | |
7bfea936 | 618 | for file in ${backward_headers}; do \ |
90e5b39f CC |
619 | $(INSTALL_DATA) $${file} $(DESTDIR)${gxx_include_dir}/${backward_builddir}; done |
620 | $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${ext_builddir} | |
7bfea936 | 621 | for file in ${ext_headers}; do \ |
90e5b39f | 622 | $(INSTALL_DATA) $${file} $(DESTDIR)${gxx_include_dir}/${ext_builddir}; done |
3febde35 BK |
623 | $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${tr1_builddir} |
624 | for file in ${tr1_headers}; do \ | |
625 | $(INSTALL_DATA) $${file} $(DESTDIR)${gxx_include_dir}/${tr1_builddir}; done | |
90e5b39f | 626 | $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${c_base_builddir} |
73249e33 | 627 | for file in ${c_base_headers_rename}; do \ |
90e5b39f | 628 | $(INSTALL_DATA) ${c_base_builddir}/$${file} $(DESTDIR)${gxx_include_dir}/${c_base_builddir}; done |
e01c9849 | 629 | c_base_headers_extra_install='$(c_base_headers_extra)';\ |
3eb35fcf | 630 | for file in $$c_base_headers_extra_install; do \ |
90e5b39f | 631 | $(INSTALL_DATA) $$file $(DESTDIR)${gxx_include_dir}/${bits_builddir}; done |
e01c9849 BK |
632 | c_compatibility_headers_install='$(c_compatibility_headers_extra)';\ |
633 | for file in $$c_compatibility_headers_install; do \ | |
90e5b39f CC |
634 | $(INSTALL_DATA) $$file $(DESTDIR)${gxx_include_dir}; done |
635 | $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${std_builddir} | |
73249e33 | 636 | for file in ${std_headers_rename}; do \ |
90e5b39f | 637 | $(INSTALL_DATA) ${std_builddir}/$${file} $(DESTDIR)${gxx_include_dir}/${std_builddir}; done |
285b36d6 BK |
638 | $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${debug_builddir} |
639 | for file in ${debug_headers}; do \ | |
640 | $(INSTALL_DATA) $${file} $(DESTDIR)${gxx_include_dir}/${debug_builddir}; done | |
a30335e9 BK |
641 | $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${host_builddir} |
642 | for file in ${host_headers} ${host_headers_extra} \ | |
643 | ${thread_host_headers}; do \ | |
644 | $(INSTALL_DATA) $${file} $(DESTDIR)${gxx_include_dir}/${host_builddir}; done | |
4a9d5109 | 645 | |
9e57d5ca | 646 | install-pch: |
8520f704 LR |
647 | $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${pch_output_builddir} |
648 | for file in ${pch_output_builddir}/*; do \ | |
649 | $(INSTALL_DATA) $$file $(DESTDIR)${gxx_include_dir}/${pch_output_builddir}; done | |
9e57d5ca | 650 | |
4e10943d | 651 | # By adding these files here, automake will remove them for 'make clean' |
53c2acdf | 652 | CLEANFILES = ${pch_input} ${pch_output_builddir}/* |
c5535768 BK |
653 | |
654 | # Stop implicit '.o' make rules from ever stomping on extensionless | |
655 | # headers, in the improbable case where some foolish, crack-addled | |
656 | # developer tries to create them via make in the include build | |
657 | # directory. (This is more of an example of how this kind of rule can | |
658 | # be made.) | |
659 | .PRECIOUS: $(std_headers_rename) $(c_base_headers_rename) | |
660 | $(std_headers_rename): ; @: | |
661 | $(c_base_headers_rename): ; @: |