2002-11-21 Phil Edwards <pme@gcc.gnu.org>
[official-gcc.git] / libstdc++-v3 / include / Makefile.am
blobda7646aed059daac27d9cd14f12c76ec762baf15
1 ## Makefile for the include subdirectory of the GNU C++ Standard library.
2 ##
3 ## Copyright (C) 2001, 2002 Free Software Foundation, Inc.
4 ##
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)
12 ## any later version.
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,
22 ## USA.
24 AUTOMAKE_OPTIONS = 1.3 cygnus
25 MAINT_CHARSET = latin1
27 mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
29 # Cross compiler and multilib support.
30 CXX = @glibcpp_CXX@
31 glibcpp_srcdir=@glibcpp_srcdir@
32 glibcpp_builddir=@glibcpp_builddir@
34 bits_srcdir = ${glibcpp_srcdir}/include/bits
35 bits_builddir = ./bits
36 bits_headers = \
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
104 backward_headers = \
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
143 ext_builddir = ./ext
144 ext_headers = \
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 \
155         ${ext_srcdir}/rope \
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@
164 c_base_builddir = .
165 c_base_headers = \
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 = \
185         cassert \
186         cctype \
187         cerrno \
188         cfloat \
189         ciso646 \
190         climits \
191         clocale \
192         cmath \
193         csetjmp \
194         csignal \
195         cstdarg \
196         cstddef \
197         cstdio \
198         cstdlib \
199         cstring \
200         ctime \
201         cwchar \
202         cwctype 
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 
232 else
233 c_base_headers_extra = 
234 endif
236 if GLIBCPP_C_HEADERS_COMPATIBILITY
237 c_compatibility_headers_extra = ${c_compatibility_headers}
238 else
239 c_compatibility_headers_extra = 
240 endif
243 std_srcdir = ${glibcpp_srcdir}/include/std
244 std_builddir = .
245 std_headers = \
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 = \
277         algorithm \
278         bitset \
279         complex \
280         deque \
281         fstream \
282         functional \
283         iomanip \
284         ios \
285         iosfwd \
286         iostream \
287         istream \
288         iterator \
289         limits \
290         list \
291         locale \
292         map \
293         memory \
294         numeric \
295         ostream \
296         queue \
297         set \
298         sstream \
299         stack \
300         stdexcept \
301         streambuf \
302         string \
303         utility \
304         valarray \
305         vector
307 target_srcdir = ${glibcpp_srcdir}/@OS_INC_SRCDIR@
308 target_builddir = ./${target_alias}/bits
309 target_headers = \
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 
315 # These target_headers_extra files are all built with ad hoc naming rules.
316 target_headers_extra = \
317         ${target_builddir}/basic_file.h \
318         ${target_builddir}/c++config.h \
319         ${target_builddir}/c++io.h \
320         ${target_builddir}/c++locale.h \
321         ${target_builddir}/messages_members.h \
322         ${target_builddir}/codecvt_specializations.h
324 thread_target_headers = \
325         ${target_builddir}/gthr.h \
326         ${target_builddir}/gthr-single.h \
327         ${target_builddir}/gthr-posix.h \
328         ${target_builddir}/gthr-default.h
330 # List of all timestamp files.  By keeping only one copy of this list, both
331 # CLEANFILES and all-local are kept up-to-date.
332 allstamps = \
333         stamp-std stamp-bits stamp-c_base stamp-c_compatibility \
334         stamp-backward stamp-ext \
335         ${target_builddir}/stamp-target
338 # Here are the rules for building the headers
339 all-local: ${target_builddir}/c++config.h ${thread_target_headers} ${allstamps}
341 # This rule is slightly different, in that we must change the name of the
342 # local file from std_foo.h to foo.
343 stamp-std: ${std_headers}
344         @if [ ! -d "${std_builddir}" ]; then \
345           mkdir -p ${std_builddir} ;\
346         fi ;\
347         (cd ${std_builddir} && for h in $?; do \
348           official_name=`echo $$h | sed -e 's,.*/std_,,' -e 's,\.h$$,,'` ;\
349           @LN_S@ $$h ./$${official_name} || true ;\
350         done) ;\
351         echo `date` > stamp-std 
353 stamp-bits: ${bits_headers}
354         @if [ ! -d "${bits_builddir}" ]; then \
355           mkdir -p ${bits_builddir} ;\
356         fi ;\
357         (cd ${bits_builddir} && @LN_S@ $? . || true) ;\
358         echo `date` > stamp-bits
360 stamp-c_base: ${c_base_headers} ${c_base_headers_extra} 
361         @if [ ! -d "${c_base_builddir}" ]; then \
362           mkdir -p ${c_base_builddir} ;\
363         fi ;\
364         (cd ${c_base_builddir} && for h in ${c_base_headers}; do \
365           official_name=`echo $$h | sed -e 's,.*/std_,,' -e 's,\.h$$,,'` ;\
366           @LN_S@ $$h ./$${official_name} || true ;\
367         done) ;\
368         if [ ! -z "${c_base_headers_extra}" ]; then \
369           (cd ${bits_builddir} && @LN_S@ ${c_base_headers_extra}  . || true) ;\
370         fi ;\
371         echo `date` > stamp-c_base
373 stamp-c_compatibility: ${c_compatibility_headers_extra}
374         @if [ ! -d "${c_compatibility_builddir}" ]; then \
375           mkdir -p ${c_compatibility_builddir} ;\
376         fi ;\
377         if [ ! -z "${c_compatibility_headers_extra}" ]; then \
378           (cd ${c_compatibility_builddir} && @LN_S@ $? . || true) ;\
379         fi ;\
380         echo `date` > stamp-c_compatibility
382 stamp-backward: ${backward_headers}
383         @if [ ! -d "${backward_builddir}" ]; then \
384           mkdir -p ${backward_builddir} ;\
385         fi ;\
386         (cd ${backward_builddir} && @LN_S@ $? . || true) ;\
387         echo `date` > stamp-backward
389 stamp-ext: ${ext_headers}
390         @if [ ! -d "${ext_builddir}" ]; then \
391           mkdir -p ${ext_builddir} ;\
392         fi ;\
393         (cd ${ext_builddir} && @LN_S@ $? . || true) ;\
394         echo `date` > stamp-ext
396 stamp-${target_alias}:
397         @if [ ! -d ${target_builddir} ]; then \
398           mkdir -p ${target_builddir} ;\
399           echo `date` > stamp-${target_alias} ;\
400         fi
402 # Target includes static.
403 ${target_builddir}/stamp-target: ${target_headers} stamp-${target_alias}
404         @cd ${target_builddir} ;\
405         if [ ! -f stamp-target ]; then \
406           @LN_S@ ${target_headers} . || true ;\
407           @LN_S@ ${glibcpp_srcdir}/@BASIC_FILE_H@ basic_file.h || true ;\
408           @LN_S@ ${glibcpp_srcdir}/@CSTDIO_H@ c++io.h || true ;\
409           @LN_S@ ${glibcpp_srcdir}/@CLOCALE_H@ c++locale.h || true ;\
410           @LN_S@ ${glibcpp_srcdir}/@CMESSAGES_H@ messages_members.h || true ;\
411           @LN_S@ ${glibcpp_srcdir}/@CCODECVT_H@ codecvt_specializations.h || true ;\
412           echo `date` > stamp-target; \
413         fi
415 # Target includes dynamic.
416 ${target_builddir}/c++config.h: ${CONFIG_HEADER} \
417                                 ${glibcpp_srcdir}/include/bits/c++config \
418                                 stamp-${target_alias}
419         @cat ${glibcpp_srcdir}/include/bits/c++config > $@ ;\
420         sed -e 's/HAVE_/_GLIBCPP_HAVE_/g' \
421             -e 's/PACKAGE/_GLIBCPP_PACKAGE/g' \
422             -e 's/VERSION/_GLIBCPP_VERSION/g' \
423             -e 's/WORDS_/_GLIBCPP_WORDS_/g' \
424             < ${CONFIG_HEADER} >> $@ ;\
425         echo "#endif // _CPP_CPPCONFIG_" >>$@
427 # Target includes for threads
428 glibcpp_thread_h = @glibcpp_thread_h@
429 uppercase = [ABCDEFGHIJKLMNOPQRSTUVWXYZ_]
431 ${target_builddir}/gthr.h: ${toplevel_srcdir}/gcc/gthr.h stamp-${target_alias}
432         sed -e '/^#/s/\(${uppercase}${uppercase}*\)/_GLIBCPP_\1/g' \
433             -e 's,^#include "\(.*\)",#include <bits/\1>,g' \
434             < ${toplevel_srcdir}/gcc/gthr.h > $@
436 ${target_builddir}/gthr-single.h: ${toplevel_srcdir}/gcc/gthr-single.h \
437                                   stamp-${target_alias}
438         sed -e 's/\(UNUSED\)/_GLIBCPP_\1/g' \
439             -e 's/\(GCC${uppercase}*_H\)/_GLIBCPP_\1/g' \
440             < ${toplevel_srcdir}/gcc/gthr-single.h > $@
442 ${target_builddir}/gthr-posix.h: ${toplevel_srcdir}/gcc/gthr-posix.h \
443                                    stamp-${target_alias}
444         sed -e 's/\(UNUSED\)/_GLIBCPP_\1/g' \
445             -e 's/\(GCC${uppercase}*_H\)/_GLIBCPP_\1/g' \
446             -e 's/\(${uppercase}*WEAK\)/_GLIBCPP_\1/g' \
447             < ${toplevel_srcdir}/gcc/gthr-posix.h > $@
449 ${target_builddir}/gthr-default.h: ${toplevel_srcdir}/gcc/${glibcpp_thread_h} \
450                                    stamp-${target_alias}
451         sed -e 's/\(UNUSED\)/_GLIBCPP_\1/g' \
452             -e 's/\(GCC${uppercase}*_H\)/_GLIBCPP_\1/g' \
453             -e 's/\(${uppercase}*WEAK\)/_GLIBCPP_\1/g' \
454             -e 's,^#include "\(.*\)",#include <bits/\1>,g' \
455             < ${toplevel_srcdir}/gcc/${glibcpp_thread_h} > $@
457 # For robustness sake (in light of junk files or in-source
458 # configuration), copy from the build or source tree to the install
459 # tree using only the human-maintained file lists and directory
460 # components.  Yes, with minor differences, this is sheer duplication
461 # of the staging rules above using $(INSTALL_DATA) instead of LN_S and
462 # `$(mkinstalldirs)' instead of `mkdir -p'.  In particular,
463 # target_headers_extra are taken out of the build tree staging area;
464 # the rest are taken from the original source tree.
465 gxx_include_dir = @gxx_include_dir@
466 install-data-local:
467         $(mkinstalldirs) ${gxx_include_dir}
468         $(mkinstalldirs) ${gxx_include_dir}/${bits_builddir}
469         for file in ${bits_headers}; do \
470           $(INSTALL_DATA) $${file} ${gxx_include_dir}/${bits_builddir}; done
471         $(mkinstalldirs) ${gxx_include_dir}/${backward_builddir}
472         for file in ${backward_headers}; do \
473           $(INSTALL_DATA) $${file} ${gxx_include_dir}/${backward_builddir}; done
474         $(mkinstalldirs) ${gxx_include_dir}/${ext_builddir}
475         for file in ${ext_headers}; do \
476           $(INSTALL_DATA) $${file} ${gxx_include_dir}/${ext_builddir}; done
477         $(mkinstalldirs) ${gxx_include_dir}/${c_base_builddir}
478         for file in ${c_base_headers_rename}; do \
479           $(INSTALL_DATA) ${c_base_builddir}/$${file} ${gxx_include_dir}; done
480         c_base_headers_extra_install='$(c_base_headers_extra)';\
481         for file in $$c_base_headers_extra_install; do \
482           $(INSTALL_DATA) $$file ${gxx_include_dir}/${bits_builddir}; done
483         c_compatibility_headers_install='$(c_compatibility_headers_extra)';\
484         for file in $$c_compatibility_headers_install; do \
485           $(INSTALL_DATA) $$file ${gxx_include_dir}; done
486         $(mkinstalldirs) ${gxx_include_dir}/${std_builddir}
487         for file in ${std_headers_rename}; do \
488           $(INSTALL_DATA) ${std_builddir}/$${file} ${gxx_include_dir}; done
489         $(mkinstalldirs) ${gxx_include_dir}/${target_builddir}
490         for file in ${target_headers} ${target_headers_extra} \
491          ${thread_target_headers}; do \
492           $(INSTALL_DATA) $${file} ${gxx_include_dir}/${target_builddir}; done
494 # By adding these files here, automake will remove them for 'make clean'
495 #CLEANFILES = ${allstamps}
497 # Stop implicit '.o' make rules from ever stomping on extensionless
498 # headers, in the improbable case where some foolish, crack-addled
499 # developer tries to create them via make in the include build
500 # directory. (This is more of an example of how this kind of rule can
501 # be made.)
502 .PRECIOUS: $(std_headers_rename) $(c_base_headers_rename)
503 $(std_headers_rename): ; @:
504 $(c_base_headers_rename): ; @: