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