1 ## Makefile for the include subdirectory of the GNU C++ Standard library.
3 ## Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
5 ## This file is part of the libstdc++ version 3 distribution.
6 ## Process this file with automake to produce Makefile.in.
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)
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.
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,
24 AUTOMAKE_OPTIONS = 1.3 cygnus
25 MAINT_CHARSET = latin1
27 mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
29 # Cross compiler and multilib support.
31 glibcpp_srcdir=@glibcpp_srcdir@
32 glibcpp_builddir=@glibcpp_builddir@
34 bits_srcdir = ${glibcpp_srcdir}/include/bits
35 bits_builddir = ./bits
37 ${bits_srcdir}/basic_ios.h \
38 ${bits_srcdir}/basic_ios.tcc \
39 ${bits_srcdir}/basic_string.h \
40 ${bits_srcdir}/basic_string.tcc \
41 ${bits_srcdir}/boost_concept_check.h \
42 ${bits_srcdir}/char_traits.h \
43 ${bits_srcdir}/codecvt.h \
44 ${bits_srcdir}/concept_check.h \
45 ${bits_srcdir}/cpp_type_traits.h \
46 ${bits_srcdir}/deque.tcc \
47 ${bits_srcdir}/fpos.h \
48 ${bits_srcdir}/fstream.tcc \
49 ${bits_srcdir}/functexcept.h \
50 ${bits_srcdir}/gslice.h \
51 ${bits_srcdir}/gslice_array.h \
52 ${bits_srcdir}/indirect_array.h \
53 ${bits_srcdir}/ios_base.h \
54 ${bits_srcdir}/istream.tcc \
55 ${bits_srcdir}/list.tcc \
56 ${bits_srcdir}/locale_facets.h \
57 ${bits_srcdir}/locale_facets.tcc \
58 ${bits_srcdir}/localefwd.h \
59 ${bits_srcdir}/mask_array.h \
60 ${bits_srcdir}/ostream.tcc \
61 ${bits_srcdir}/pthread_allocimpl.h \
62 ${bits_srcdir}/stream_iterator.h \
63 ${bits_srcdir}/streambuf_iterator.h \
64 ${bits_srcdir}/slice_array.h \
65 ${bits_srcdir}/sstream.tcc \
66 ${bits_srcdir}/stl_algo.h \
67 ${bits_srcdir}/stl_algobase.h \
68 ${bits_srcdir}/stl_alloc.h \
69 ${bits_srcdir}/stl_bvector.h \
70 ${bits_srcdir}/stl_construct.h \
71 ${bits_srcdir}/stl_deque.h \
72 ${bits_srcdir}/stl_function.h \
73 ${bits_srcdir}/stl_heap.h \
74 ${bits_srcdir}/stl_iterator.h \
75 ${bits_srcdir}/stl_iterator_base_funcs.h \
76 ${bits_srcdir}/stl_iterator_base_types.h \
77 ${bits_srcdir}/stl_list.h \
78 ${bits_srcdir}/stl_map.h \
79 ${bits_srcdir}/stl_multimap.h \
80 ${bits_srcdir}/stl_multiset.h \
81 ${bits_srcdir}/stl_numeric.h \
82 ${bits_srcdir}/stl_pair.h \
83 ${bits_srcdir}/stl_pthread_alloc.h \
84 ${bits_srcdir}/stl_queue.h \
85 ${bits_srcdir}/stl_raw_storage_iter.h \
86 ${bits_srcdir}/stl_relops.h \
87 ${bits_srcdir}/stl_set.h \
88 ${bits_srcdir}/stl_stack.h \
89 ${bits_srcdir}/stl_tempbuf.h \
90 ${bits_srcdir}/stl_threads.h \
91 ${bits_srcdir}/stl_tree.h \
92 ${bits_srcdir}/stl_uninitialized.h \
93 ${bits_srcdir}/stl_vector.h \
94 ${bits_srcdir}/streambuf.tcc \
95 ${bits_srcdir}/stringfwd.h \
96 ${bits_srcdir}/type_traits.h \
97 ${bits_srcdir}/valarray_array.h \
98 ${bits_srcdir}/valarray_array.tcc \
99 ${bits_srcdir}/valarray_meta.h \
100 ${bits_srcdir}/vector.tcc
102 backward_srcdir = ${glibcpp_srcdir}/include/backward
103 backward_builddir = ./backward
105 ${backward_srcdir}/complex.h \
106 ${backward_srcdir}/iomanip.h \
107 ${backward_srcdir}/istream.h \
108 ${backward_srcdir}/ostream.h \
109 ${backward_srcdir}/stream.h \
110 ${backward_srcdir}/streambuf.h \
111 ${backward_srcdir}/algo.h \
112 ${backward_srcdir}/algobase.h \
113 ${backward_srcdir}/alloc.h \
114 ${backward_srcdir}/bvector.h \
115 ${backward_srcdir}/defalloc.h \
116 ${backward_srcdir}/deque.h \
117 ${backward_srcdir}/function.h \
118 ${backward_srcdir}/hash_map.h \
119 ${backward_srcdir}/hash_set.h \
120 ${backward_srcdir}/hashtable.h \
121 ${backward_srcdir}/heap.h \
122 ${backward_srcdir}/iostream.h \
123 ${backward_srcdir}/iterator.h \
124 ${backward_srcdir}/list.h \
125 ${backward_srcdir}/map.h \
126 ${backward_srcdir}/multimap.h \
127 ${backward_srcdir}/new.h \
128 ${backward_srcdir}/multiset.h \
129 ${backward_srcdir}/pair.h \
130 ${backward_srcdir}/queue.h \
131 ${backward_srcdir}/rope.h \
132 ${backward_srcdir}/set.h \
133 ${backward_srcdir}/slist.h \
134 ${backward_srcdir}/stack.h \
135 ${backward_srcdir}/tempbuf.h \
136 ${backward_srcdir}/tree.h \
137 ${backward_srcdir}/vector.h \
138 ${backward_srcdir}/fstream.h \
139 ${backward_srcdir}/strstream \
140 ${backward_srcdir}/backward_warning.h
142 ext_srcdir = ${glibcpp_srcdir}/include/ext
145 ${ext_srcdir}/algorithm \
146 ${ext_srcdir}/enc_filebuf.h \
147 ${ext_srcdir}/stdio_filebuf.h \
148 ${ext_srcdir}/functional \
149 ${ext_srcdir}/hash_map \
150 ${ext_srcdir}/hash_set \
151 ${ext_srcdir}/iterator \
152 ${ext_srcdir}/memory \
153 ${ext_srcdir}/numeric \
154 ${ext_srcdir}/rb_tree \
156 ${ext_srcdir}/ropeimpl.h \
157 ${ext_srcdir}/slist \
158 ${ext_srcdir}/stl_hash_fun.h \
159 ${ext_srcdir}/stl_hashtable.h \
160 ${ext_srcdir}/stl_rope.h
162 # This is the common subset of files that all three "C" header models use.
163 c_base_srcdir = @C_INCLUDE_DIR@
166 ${c_base_srcdir}/std_cassert.h \
167 ${c_base_srcdir}/std_cctype.h \
168 ${c_base_srcdir}/std_cerrno.h \
169 ${c_base_srcdir}/std_cfloat.h \
170 ${c_base_srcdir}/std_ciso646.h \
171 ${c_base_srcdir}/std_climits.h \
172 ${c_base_srcdir}/std_clocale.h \
173 ${c_base_srcdir}/std_cmath.h \
174 ${c_base_srcdir}/std_csetjmp.h \
175 ${c_base_srcdir}/std_csignal.h \
176 ${c_base_srcdir}/std_cstdarg.h \
177 ${c_base_srcdir}/std_cstddef.h \
178 ${c_base_srcdir}/std_cstdio.h \
179 ${c_base_srcdir}/std_cstdlib.h \
180 ${c_base_srcdir}/std_cstring.h \
181 ${c_base_srcdir}/std_ctime.h \
182 ${c_base_srcdir}/std_cwchar.h \
183 ${c_base_srcdir}/std_cwctype.h
184 c_base_headers_rename = \
204 # "C" compatibility headers.
205 c_compatibility_srcdir = ${glibcpp_srcdir}/include/c_compatibility
206 c_compatibility_builddir = .
207 c_compatibility_headers = \
208 ${c_compatibility_srcdir}/assert.h \
209 ${c_compatibility_srcdir}/ctype.h \
210 ${c_compatibility_srcdir}/errno.h \
211 ${c_compatibility_srcdir}/float.h \
212 ${c_compatibility_srcdir}/iso646.h \
213 ${c_compatibility_srcdir}/limits.h \
214 ${c_compatibility_srcdir}/locale.h \
215 ${c_compatibility_srcdir}/math.h \
216 ${c_compatibility_srcdir}/setjmp.h \
217 ${c_compatibility_srcdir}/signal.h \
218 ${c_compatibility_srcdir}/stdarg.h \
219 ${c_compatibility_srcdir}/stddef.h \
220 ${c_compatibility_srcdir}/stdio.h \
221 ${c_compatibility_srcdir}/stdlib.h \
222 ${c_compatibility_srcdir}/string.h \
223 ${c_compatibility_srcdir}/time.h \
224 ${c_compatibility_srcdir}/wchar.h \
225 ${c_compatibility_srcdir}/wctype.h
227 # Some of the different "C" header models need extra files.
228 # Some "C" header schemes require the "C" compatibility headers.
229 # For --enable-cheaders=c_std
230 if GLIBCPP_C_HEADERS_C_STD
231 c_base_headers_extra = ${c_base_srcdir}/cmath.tcc
233 c_base_headers_extra =
236 if GLIBCPP_C_HEADERS_COMPATIBILITY
237 c_compatibility_headers_extra = ${c_compatibility_headers}
239 c_compatibility_headers_extra =
243 std_srcdir = ${glibcpp_srcdir}/include/std
246 ${std_srcdir}/std_algorithm.h \
247 ${std_srcdir}/std_bitset.h \
248 ${std_srcdir}/std_complex.h \
249 ${std_srcdir}/std_deque.h \
250 ${std_srcdir}/std_fstream.h \
251 ${std_srcdir}/std_functional.h \
252 ${std_srcdir}/std_iomanip.h \
253 ${std_srcdir}/std_ios.h \
254 ${std_srcdir}/std_iosfwd.h \
255 ${std_srcdir}/std_iostream.h \
256 ${std_srcdir}/std_istream.h \
257 ${std_srcdir}/std_iterator.h \
258 ${std_srcdir}/std_limits.h \
259 ${std_srcdir}/std_list.h \
260 ${std_srcdir}/std_locale.h \
261 ${std_srcdir}/std_map.h \
262 ${std_srcdir}/std_memory.h \
263 ${std_srcdir}/std_numeric.h \
264 ${std_srcdir}/std_ostream.h \
265 ${std_srcdir}/std_queue.h \
266 ${std_srcdir}/std_set.h \
267 ${std_srcdir}/std_sstream.h \
268 ${std_srcdir}/std_stack.h \
269 ${std_srcdir}/std_stdexcept.h \
270 ${std_srcdir}/std_streambuf.h \
271 ${std_srcdir}/std_string.h \
272 ${std_srcdir}/std_utility.h \
273 ${std_srcdir}/std_valarray.h \
274 ${std_srcdir}/std_vector.h
275 # Renamed at build time.
276 std_headers_rename = \
307 target_srcdir = ${glibcpp_srcdir}/@OS_INC_SRCDIR@
308 target_builddir = ./${target_alias}/bits
310 ${target_srcdir}/ctype_base.h \
311 ${target_srcdir}/ctype_inline.h \
312 ${target_srcdir}/ctype_noninline.h \
313 ${target_srcdir}/os_defines.h \
314 ${glibcpp_srcdir}/@ATOMICITY_INC_SRCDIR@/atomicity.h
316 # Non-installed target_header files.
317 target_headers_noinst = \
318 ${glibcpp_srcdir}/@CLOCALE_INTERNAL_H@
320 # These target_headers_extra files are all built with ad hoc naming rules.
321 target_headers_extra = \
322 ${target_builddir}/basic_file.h \
323 ${target_builddir}/c++config.h \
324 ${target_builddir}/c++io.h \
325 ${target_builddir}/c++locale.h \
326 ${target_builddir}/messages_members.h \
327 ${target_builddir}/time_members.h \
328 ${target_builddir}/codecvt_specializations.h
330 thread_target_headers = \
331 ${target_builddir}/gthr.h \
332 ${target_builddir}/gthr-single.h \
333 ${target_builddir}/gthr-posix.h \
334 ${target_builddir}/gthr-default.h
336 # List of all timestamp files. By keeping only one copy of this list, both
337 # CLEANFILES and all-local are kept up-to-date.
339 stamp-std stamp-bits stamp-c_base stamp-c_compatibility \
340 stamp-backward stamp-ext stamp-target
343 # Here are the rules for building the headers
344 all-local: ${target_builddir}/c++config.h ${thread_target_headers} ${allstamps}
346 # This rule is slightly different, in that we must change the name of the
347 # local file from std_foo.h to foo.
348 stamp-std: ${std_headers}
349 @if [ ! -d "${std_builddir}" ]; then \
350 mkdir -p ${std_builddir} ;\
352 if [ ! -f stamp-std ]; then \
353 (cd ${std_builddir} && for h in $?; do \
354 official_name=`echo $$h | sed -e 's,.*/std_,,' -e 's,\.h$$,,'` ;\
355 @LN_S@ $$h ./$${official_name} || true ;\
357 echo `date` > stamp-std ;\
360 stamp-bits: ${bits_headers}
361 @if [ ! -d "${bits_builddir}" ]; then \
362 mkdir -p ${bits_builddir} ;\
364 if [ ! -f stamp-bits ]; then \
365 (cd ${bits_builddir} && @LN_S@ $? . || true) ;\
366 echo `date` > stamp-bits ;\
369 stamp-c_base: ${c_base_headers} ${c_base_headers_extra}
370 @if [ ! -d "${c_base_builddir}" ]; then \
371 mkdir -p ${c_base_builddir} ;\
373 (cd ${c_base_builddir} && for h in ${c_base_headers}; do \
374 official_name=`echo $$h | sed -e 's,.*/std_,,' -e 's,\.h$$,,'` ;\
375 @LN_S@ $$h ./$${official_name} || true ;\
377 if [ ! -f stamp-c_base ]; then \
378 if [ ! -z "${c_base_headers_extra}" ]; then \
379 (cd ${bits_builddir} && @LN_S@ ${c_base_headers_extra} . || true) ;\
381 echo `date` > stamp-c_base ;\
384 stamp-c_compatibility: ${c_compatibility_headers_extra}
385 @if [ ! -d "${c_compatibility_builddir}" ]; then \
386 mkdir -p ${c_compatibility_builddir} ;\
388 if [ ! -f stamp-c_compatibility ]; then \
389 if [ ! -z "${c_compatibility_headers_extra}" ]; then \
390 (cd ${c_compatibility_builddir} && @LN_S@ $? . || true) ;\
392 echo `date` > stamp-c_compatibility ;\
395 stamp-backward: ${backward_headers}
396 @if [ ! -d "${backward_builddir}" ]; then \
397 mkdir -p ${backward_builddir} ;\
399 if [ ! -f stamp-backward ]; then \
400 (cd ${backward_builddir} && @LN_S@ $? . || true) ;\
401 echo `date` > stamp-backward ;\
404 stamp-ext: ${ext_headers}
405 @if [ ! -d "${ext_builddir}" ]; then \
406 mkdir -p ${ext_builddir} ;\
408 if [ ! -f stamp-ext ]; then \
409 (cd ${ext_builddir} && @LN_S@ $? . || true) ;\
410 echo `date` > stamp-ext ;\
413 stamp-${target_alias}:
414 @if [ ! -d ${target_builddir} ]; then \
415 mkdir -p ${target_builddir} ;\
416 echo `date` > stamp-${target_alias} ;\
419 # Target includes static.
420 # XXX Missing dependency info for {target_headers_extra}
421 stamp-target: ${target_headers} ${target_headers_noinst} stamp-${target_alias}
422 @if [ ! -f stamp-target ]; then \
423 (cd ${target_builddir} ;\
424 @LN_S@ ${target_headers} . || true ;\
425 @LN_S@ ${glibcpp_srcdir}/@BASIC_FILE_H@ basic_file.h || true ;\
426 @LN_S@ ${glibcpp_srcdir}/@CSTDIO_H@ c++io.h || true ;\
427 @LN_S@ ${glibcpp_srcdir}/@CLOCALE_H@ c++locale.h || true ;\
428 @LN_S@ ${glibcpp_srcdir}/@CLOCALE_INTERNAL_H@ . || true ;\
429 @LN_S@ ${glibcpp_srcdir}/@CMESSAGES_H@ messages_members.h || true ;\
430 @LN_S@ ${glibcpp_srcdir}/@CTIME_H@ time_members.h || true ;\
431 @LN_S@ ${glibcpp_srcdir}/@CCODECVT_H@ codecvt_specializations.h || true);\
432 echo `date` > stamp-target ; \
435 # Target includes dynamic.
436 ${target_builddir}/c++config.h: ${CONFIG_HEADER} \
437 ${glibcpp_srcdir}/include/bits/c++config \
438 stamp-${target_alias}
439 @cat ${glibcpp_srcdir}/include/bits/c++config > $@ ;\
440 sed -e 's/HAVE_/_GLIBCPP_HAVE_/g' \
441 -e 's/PACKAGE/_GLIBCPP_PACKAGE/g' \
442 -e 's/VERSION/_GLIBCPP_VERSION/g' \
443 -e 's/WORDS_/_GLIBCPP_WORDS_/g' \
444 < ${CONFIG_HEADER} >> $@ ;\
445 echo "#endif // _CPP_CPPCONFIG_" >>$@
447 # Target includes for threads
448 glibcpp_thread_h = @glibcpp_thread_h@
449 uppercase = [ABCDEFGHIJKLMNOPQRSTUVWXYZ_]
451 ${target_builddir}/gthr.h: ${toplevel_srcdir}/gcc/gthr.h stamp-${target_alias}
452 sed -e '/^#/s/\(${uppercase}${uppercase}*\)/_GLIBCPP_\1/g' \
453 -e 's,^#include "\(.*\)",#include <bits/\1>,g' \
454 < ${toplevel_srcdir}/gcc/gthr.h > $@
456 ${target_builddir}/gthr-single.h: ${toplevel_srcdir}/gcc/gthr-single.h \
457 stamp-${target_alias}
458 sed -e 's/\(UNUSED\)/_GLIBCPP_\1/g' \
459 -e 's/\(GCC${uppercase}*_H\)/_GLIBCPP_\1/g' \
460 < ${toplevel_srcdir}/gcc/gthr-single.h > $@
462 ${target_builddir}/gthr-posix.h: ${toplevel_srcdir}/gcc/gthr-posix.h \
463 stamp-${target_alias}
464 sed -e 's/\(UNUSED\)/_GLIBCPP_\1/g' \
465 -e 's/\(GCC${uppercase}*_H\)/_GLIBCPP_\1/g' \
466 -e 's/\(${uppercase}*WEAK\)/_GLIBCPP_\1/g' \
467 < ${toplevel_srcdir}/gcc/gthr-posix.h > $@
469 ${target_builddir}/gthr-default.h: ${toplevel_srcdir}/gcc/${glibcpp_thread_h} \
470 stamp-${target_alias}
471 sed -e 's/\(UNUSED\)/_GLIBCPP_\1/g' \
472 -e 's/\(GCC${uppercase}*_H\)/_GLIBCPP_\1/g' \
473 -e 's/\(${uppercase}*WEAK\)/_GLIBCPP_\1/g' \
474 -e 's,^#include "\(.*\)",#include <bits/\1>,g' \
475 < ${toplevel_srcdir}/gcc/${glibcpp_thread_h} > $@
477 # For robustness sake (in light of junk files or in-source
478 # configuration), copy from the build or source tree to the install
479 # tree using only the human-maintained file lists and directory
480 # components. Yes, with minor differences, this is sheer duplication
481 # of the staging rules above using $(INSTALL_DATA) instead of LN_S and
482 # `$(mkinstalldirs)' instead of `mkdir -p'. In particular,
483 # target_headers_extra are taken out of the build tree staging area;
484 # the rest are taken from the original source tree.
485 gxx_include_dir = @gxx_include_dir@
487 $(mkinstalldirs) ${gxx_include_dir}
488 $(mkinstalldirs) ${gxx_include_dir}/${bits_builddir}
489 for file in ${bits_headers}; do \
490 $(INSTALL_DATA) $${file} ${gxx_include_dir}/${bits_builddir}; done
491 $(mkinstalldirs) ${gxx_include_dir}/${backward_builddir}
492 for file in ${backward_headers}; do \
493 $(INSTALL_DATA) $${file} ${gxx_include_dir}/${backward_builddir}; done
494 $(mkinstalldirs) ${gxx_include_dir}/${ext_builddir}
495 for file in ${ext_headers}; do \
496 $(INSTALL_DATA) $${file} ${gxx_include_dir}/${ext_builddir}; done
497 $(mkinstalldirs) ${gxx_include_dir}/${c_base_builddir}
498 for file in ${c_base_headers_rename}; do \
499 $(INSTALL_DATA) ${c_base_builddir}/$${file} ${gxx_include_dir}; done
500 c_base_headers_extra_install='$(c_base_headers_extra)';\
501 for file in $$c_base_headers_extra_install; do \
502 $(INSTALL_DATA) $$file ${gxx_include_dir}/${bits_builddir}; done
503 c_compatibility_headers_install='$(c_compatibility_headers_extra)';\
504 for file in $$c_compatibility_headers_install; do \
505 $(INSTALL_DATA) $$file ${gxx_include_dir}; done
506 $(mkinstalldirs) ${gxx_include_dir}/${std_builddir}
507 for file in ${std_headers_rename}; do \
508 $(INSTALL_DATA) ${std_builddir}/$${file} ${gxx_include_dir}; done
509 $(mkinstalldirs) ${gxx_include_dir}/${target_builddir}
510 for file in ${target_headers} ${target_headers_extra} \
511 ${thread_target_headers}; do \
512 $(INSTALL_DATA) $${file} ${gxx_include_dir}/${target_builddir}; done
514 # By adding these files here, automake will remove them for 'make clean'
515 #CLEANFILES = ${allstamps}
517 # Stop implicit '.o' make rules from ever stomping on extensionless
518 # headers, in the improbable case where some foolish, crack-addled
519 # developer tries to create them via make in the include build
520 # directory. (This is more of an example of how this kind of rule can
522 .PRECIOUS: $(std_headers_rename) $(c_base_headers_rename)
523 $(std_headers_rename): ; @:
524 $(c_base_headers_rename): ; @: