OSDN Git Service

725d20f0a12cf75fde82a3372934ea5452209fde
[pf3gnuchains/gcc-fork.git] / libstdc++-v3 / include / Makefile.am
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.
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
24 AUTOMAKE_OPTIONS = 1.3 gnits
25 MAINT_CHARSET = latin1
26
27 mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
28
29 # Cross compiler and multilib support.
30 CXX = @glibcpp_CXX@
31 glibcpp_srcdir=@glibcpp_srcdir@
32 glibcpp_builddir=@glibcpp_builddir@
33
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}/fpos.h \
47         ${bits_srcdir}/fstream.tcc \
48         ${bits_srcdir}/functexcept.h \
49         ${bits_srcdir}/generic_shadow.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}/locale_facets.h \
56         ${bits_srcdir}/locale_facets.tcc \
57         ${bits_srcdir}/localefwd.h \
58         ${bits_srcdir}/mask_array.h \
59         ${bits_srcdir}/ostream.tcc \
60         ${bits_srcdir}/pthread_allocimpl.h \
61         ${bits_srcdir}/stream_iterator.h \
62         ${bits_srcdir}/streambuf_iterator.h \
63         ${bits_srcdir}/slice.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
101 backward_srcdir = ${glibcpp_srcdir}/include/backward
102 backward_builddir = ./backward
103 backward_headers = \
104         ${backward_srcdir}/complex.h \
105         ${backward_srcdir}/iomanip.h \
106         ${backward_srcdir}/istream.h \
107         ${backward_srcdir}/ostream.h \
108         ${backward_srcdir}/stream.h \
109         ${backward_srcdir}/streambuf.h \
110         ${backward_srcdir}/algo.h \
111         ${backward_srcdir}/algobase.h \
112         ${backward_srcdir}/alloc.h \
113         ${backward_srcdir}/bvector.h \
114         ${backward_srcdir}/defalloc.h \
115         ${backward_srcdir}/deque.h \
116         ${backward_srcdir}/function.h \
117         ${backward_srcdir}/hash_map.h \
118         ${backward_srcdir}/hash_set.h \
119         ${backward_srcdir}/hashtable.h \
120         ${backward_srcdir}/heap.h \
121         ${backward_srcdir}/iostream.h \
122         ${backward_srcdir}/iterator.h \
123         ${backward_srcdir}/list.h \
124         ${backward_srcdir}/map.h \
125         ${backward_srcdir}/multimap.h \
126         ${backward_srcdir}/new.h \
127         ${backward_srcdir}/multiset.h \
128         ${backward_srcdir}/pair.h \
129         ${backward_srcdir}/queue.h \
130         ${backward_srcdir}/rope.h \
131         ${backward_srcdir}/set.h \
132         ${backward_srcdir}/slist.h \
133         ${backward_srcdir}/stack.h \
134         ${backward_srcdir}/tempbuf.h \
135         ${backward_srcdir}/tree.h \
136         ${backward_srcdir}/vector.h \
137         ${backward_srcdir}/fstream.h \
138         ${backward_srcdir}/strstream.h \
139         ${backward_srcdir}/strstream \
140         ${backward_srcdir}/backward_warning.h
141
142 ext_srcdir = ${glibcpp_srcdir}/include/ext
143 ext_builddir = ./ext
144 ext_headers = \
145         ${ext_srcdir}/algorithm \
146         ${ext_srcdir}/functional \
147         ${ext_srcdir}/hash_map \
148         ${ext_srcdir}/hash_set \
149         ${ext_srcdir}/iterator \
150         ${ext_srcdir}/memory \
151         ${ext_srcdir}/numeric \
152         ${ext_srcdir}/rb_tree \
153         ${ext_srcdir}/rope \
154         ${ext_srcdir}/ropeimpl.h \
155         ${ext_srcdir}/slist \
156         ${ext_srcdir}/stl_hash_fun.h \
157         ${ext_srcdir}/stl_hashtable.h \
158         ${ext_srcdir}/stl_rope.h
159
160 # This is the common subset of files that all three "C" header models use.
161 c_base_srcdir = @C_INCLUDE_DIR@
162 c_base_builddir = .
163 c_base_headers = \
164         ${c_base_srcdir}/std_cassert.h \
165         ${c_base_srcdir}/std_cctype.h \
166         ${c_base_srcdir}/std_cerrno.h \
167         ${c_base_srcdir}/std_cfloat.h \
168         ${c_base_srcdir}/std_ciso646.h \
169         ${c_base_srcdir}/std_climits.h \
170         ${c_base_srcdir}/std_clocale.h \
171         ${c_base_srcdir}/std_cmath.h \
172         ${c_base_srcdir}/std_csetjmp.h \
173         ${c_base_srcdir}/std_csignal.h \
174         ${c_base_srcdir}/std_cstdarg.h \
175         ${c_base_srcdir}/std_cstddef.h \
176         ${c_base_srcdir}/std_cstdio.h \
177         ${c_base_srcdir}/std_cstdlib.h \
178         ${c_base_srcdir}/std_cstring.h \
179         ${c_base_srcdir}/std_ctime.h \
180         ${c_base_srcdir}/std_cwchar.h \
181         ${c_base_srcdir}/std_cwctype.h 
182 c_base_headers_rename = \
183         cassert \
184         cctype \
185         cerrno \
186         cfloat \
187         ciso646 \
188         climits \
189         clocale \
190         cmath \
191         csetjmp \
192         csignal \
193         cstdarg \
194         cstddef \
195         cstdio \
196         cstdlib \
197         cstring \
198         ctime \
199         cwchar \
200         cwctype 
201
202 # Some of the different "C" header models need extra files.
203 # For --enable-cheaders=c_std
204 if GLIBCPP_C_HEADERS_C_STD
205 c_base_headers_extra = \
206         ${c_base_srcdir}/cmath.tcc 
207 else
208 c_base_headers_extra = 
209 endif
210
211 std_srcdir = ${glibcpp_srcdir}/include/std
212 std_builddir = .
213 std_headers = \
214         ${std_srcdir}/std_algorithm.h \
215         ${std_srcdir}/std_bitset.h \
216         ${std_srcdir}/std_complex.h \
217         ${std_srcdir}/std_deque.h \
218         ${std_srcdir}/std_fstream.h \
219         ${std_srcdir}/std_functional.h \
220         ${std_srcdir}/std_iomanip.h \
221         ${std_srcdir}/std_ios.h \
222         ${std_srcdir}/std_iosfwd.h \
223         ${std_srcdir}/std_iostream.h \
224         ${std_srcdir}/std_istream.h \
225         ${std_srcdir}/std_iterator.h \
226         ${std_srcdir}/std_limits.h \
227         ${std_srcdir}/std_list.h \
228         ${std_srcdir}/std_locale.h \
229         ${std_srcdir}/std_map.h \
230         ${std_srcdir}/std_memory.h \
231         ${std_srcdir}/std_numeric.h \
232         ${std_srcdir}/std_ostream.h \
233         ${std_srcdir}/std_queue.h \
234         ${std_srcdir}/std_set.h \
235         ${std_srcdir}/std_sstream.h \
236         ${std_srcdir}/std_stack.h \
237         ${std_srcdir}/std_stdexcept.h \
238         ${std_srcdir}/std_streambuf.h \
239         ${std_srcdir}/std_string.h \
240         ${std_srcdir}/std_utility.h \
241         ${std_srcdir}/std_valarray.h \
242         ${std_srcdir}/std_vector.h
243 # Renamed at build time. 
244 std_headers_rename = \
245         algorithm \
246         bitset \
247         complex \
248         deque \
249         fstream \
250         functional \
251         iomanip \
252         ios \
253         iosfwd \
254         iostream \
255         istream \
256         iterator \
257         limits \
258         list \
259         locale \
260         map \
261         memory \
262         numeric \
263         ostream \
264         queue \
265         set \
266         sstream \
267         stack \
268         stdexcept \
269         streambuf \
270         string \
271         utility \
272         valarray \
273         vector
274
275 target_srcdir = ${glibcpp_srcdir}/@OS_INC_SRCDIR@
276 target_builddir = ./${target_alias}/bits
277 target_headers = \
278         ${target_srcdir}/ctype_base.h \
279         ${target_srcdir}/ctype_inline.h \
280         ${target_srcdir}/ctype_noninline.h \
281         ${target_srcdir}/os_defines.h \
282         ${glibcpp_srcdir}/@ATOMICITY_INC_SRCDIR@/atomicity.h \
283         ${glibcpp_srcdir}/@CPU_LIMITS_INC_SRCDIR@/cpu_limits.h 
284 # These extra_target_headers files are all built with ad hoc naming rules.
285 extra_target_headers = \
286         ${target_builddir}/basic_file.h \
287         ${target_builddir}/c++config.h \
288         ${target_builddir}/c++io.h \
289         ${target_builddir}/c++locale.h \
290         ${target_builddir}/messages_members.h \
291         ${target_builddir}/codecvt_specializations.h
292
293 thread_target_headers = \
294         ${target_builddir}/gthr.h \
295         ${target_builddir}/gthr-single.h \
296         ${target_builddir}/gthr-posix.h \
297         ${target_builddir}/gthr-default.h
298
299 # List of all timestamp files.  By keeping only one copy of this list, both
300 # CLEANFILES and all-local are kept up-to-date.
301 allstamps = stamp-std stamp-bits stamp-c_base stamp-backward stamp-ext \
302         ${target_builddir}/stamp-target
303
304
305 # Here are the rules for building the headers
306 all-local: ${target_builddir}/c++config.h ${thread_target_headers} ${allstamps}
307
308 # This rule is slightly different, in that we must change the name of the
309 # local file from std_foo.h to foo.
310 stamp-std: ${std_headers}
311         @if [ ! -d "${std_builddir}" ]; then \
312           mkdir -p ${std_builddir} ;\
313         fi ;\
314         (cd ${std_builddir} && for h in $?; do \
315           official_name=`echo $$h | sed -e 's,.*/std_,,' -e 's,\.h$$,,'` ;\
316           @LN_S@ $$h ./$${official_name} || true ;\
317         done) ;\
318         echo `date` > stamp-std 
319
320 stamp-bits: ${bits_headers}
321         @if [ ! -d "${bits_builddir}" ]; then \
322           mkdir -p ${bits_builddir} ;\
323         fi ;\
324         (cd ${bits_builddir} && @LN_S@ $? . || true) ;\
325         echo `date` > stamp-bits
326
327 stamp-c_base: ${c_base_headers} ${c_base_headers_extra}
328         @if [ ! -d "${c_base_builddir}" ]; then \
329           mkdir -p ${c_base_builddir} ;\
330         fi ;\
331         (cd ${c_base_builddir} && for h in ${c_base_headers}; do \
332           official_name=`echo $$h | sed -e 's,.*/std_,,' -e 's,\.h$$,,'` ;\
333           @LN_S@ $$h ./$${official_name} || true ;\
334         done) ;\
335         (cd ${bits_builddir} && @LN_S@ ${c_base_headers_extra}  . || true) ;\
336         echo `date` > stamp-c_base
337
338 stamp-backward: ${backward_headers}
339         @if [ ! -d "${backward_builddir}" ]; then \
340           mkdir -p ${backward_builddir} ;\
341         fi ;\
342         (cd ${backward_builddir} && @LN_S@ $? . || true) ;\
343         echo `date` > stamp-backward
344
345 stamp-ext: ${ext_headers}
346         @if [ ! -d "${ext_builddir}" ]; then \
347           mkdir -p ${ext_builddir} ;\
348         fi ;\
349         (cd ${ext_builddir} && @LN_S@ $? . || true) ;\
350         echo `date` > stamp-ext
351
352 stamp-${target_alias}:
353         @if [ ! -d ${target_builddir} ]; then \
354           mkdir -p ${target_builddir} ;\
355           echo `date` > stamp-${target_alias} ;\
356         fi
357
358 # Target includes static.
359 ${target_builddir}/stamp-target: ${target_headers} stamp-${target_alias}
360         @cd ${target_builddir} ;\
361         if [ ! -f stamp-target ]; then \
362           @LN_S@ ${target_headers} . || true ;\
363           @LN_S@ ${glibcpp_srcdir}/@BASIC_FILE_H@ basic_file.h || true ;\
364           @LN_S@ ${glibcpp_srcdir}/@CSTDIO_H@ c++io.h || true ;\
365           @LN_S@ ${glibcpp_srcdir}/@CLOCALE_H@ c++locale.h || true ;\
366           @LN_S@ ${glibcpp_srcdir}/@CMESSAGES_H@ messages_members.h || true ;\
367           @LN_S@ ${glibcpp_srcdir}/@CCODECVT_H@ codecvt_specializations.h || true ;\
368           echo `date` > stamp-target; \
369         fi
370
371 # Target includes dynamic.
372 ${target_builddir}/c++config.h: ${CONFIG_HEADER} \
373                                 ${glibcpp_srcdir}/include/bits/c++config \
374                                 stamp-${target_alias}
375         @cat ${glibcpp_srcdir}/include/bits/c++config > $@ ;\
376         sed -e 's/HAVE_/_GLIBCPP_HAVE_/g' \
377             -e 's/PACKAGE/_GLIBCPP_PACKAGE/g' \
378             -e 's/VERSION/_GLIBCPP_VERSION/g' \
379             -e 's/WORDS_/_GLIBCPP_WORDS_/g' \
380             < ${CONFIG_HEADER} >> $@ ;\
381         echo "#endif // _CPP_CPPCONFIG_" >>$@
382
383 # Target includes for threads
384 glibcpp_thread_h = @glibcpp_thread_h@
385 uppercase = [ABCDEFGHIJKLMNOPQRSTUVWXYZ_]
386
387 ${target_builddir}/gthr.h: ${toplevel_srcdir}/gcc/gthr.h stamp-${target_alias}
388         sed -e '/^#/s/\(${uppercase}${uppercase}*\)/_GLIBCPP_\1/g' \
389             -e 's,^#include "\(.*\)",#include <bits/\1>,g' \
390             < ${toplevel_srcdir}/gcc/gthr.h > $@
391
392 ${target_builddir}/gthr-single.h: ${toplevel_srcdir}/gcc/gthr-single.h \
393                                   stamp-${target_alias}
394         sed -e 's/\(UNUSED\)/_GLIBCPP_\1/g' \
395             -e 's/\(GCC${uppercase}*_H\)/_GLIBCPP_\1/g' \
396             < ${toplevel_srcdir}/gcc/gthr-single.h > $@
397
398 ${target_builddir}/gthr-posix.h: ${toplevel_srcdir}/gcc/gthr-posix.h \
399                                    stamp-${target_alias}
400         sed -e 's/\(UNUSED\)/_GLIBCPP_\1/g' \
401             -e 's/\(GCC${uppercase}*_H\)/_GLIBCPP_\1/g' \
402             -e 's/\(${uppercase}*WEAK\)/_GLIBCPP_\1/g' \
403             < ${toplevel_srcdir}/gcc/gthr-posix.h > $@
404
405 ${target_builddir}/gthr-default.h: ${toplevel_srcdir}/gcc/${glibcpp_thread_h} \
406                                    stamp-${target_alias}
407         sed -e 's/\(UNUSED\)/_GLIBCPP_\1/g' \
408             -e 's/\(GCC${uppercase}*_H\)/_GLIBCPP_\1/g' \
409             -e 's/\(${uppercase}*WEAK\)/_GLIBCPP_\1/g' \
410             -e 's,^#include "\(.*\)",#include <bits/\1>,g' \
411             < ${toplevel_srcdir}/gcc/${glibcpp_thread_h} > $@
412
413 # For robustness sake (in light of junk files or in-source
414 # configuration), copy from the build or source tree to the install
415 # tree using only the human-maintained file lists and directory
416 # components.  Yes, with minor differences, this is sheer duplication
417 # of the staging rules above using $(INSTALL_DATA) instead of LN_S and
418 # `$(INSTALL) -d' instead of `mkdir -p'.  In particular,
419 # extra_target_headers are taken out of the build tree staging area;
420 # the rest are taken from the original source tree.
421 gxx_include_dir = @gxx_include_dir@
422 install-data-local:
423         $(INSTALL) -d ${gxx_include_dir}
424         $(INSTALL) -d ${gxx_include_dir}/${bits_builddir}
425         for file in ${bits_headers}; do \
426           $(INSTALL_DATA) $${file} ${gxx_include_dir}/${bits_builddir}; done
427         $(INSTALL) -d ${gxx_include_dir}/${backward_builddir}
428         for file in ${backward_headers}; do \
429           $(INSTALL_DATA) $${file} ${gxx_include_dir}/${backward_builddir}; done
430         $(INSTALL) -d ${gxx_include_dir}/${ext_builddir}
431         for file in ${ext_headers}; do \
432           $(INSTALL_DATA) $${file} ${gxx_include_dir}/${ext_builddir}; done
433         $(INSTALL) -d ${gxx_include_dir}/${c_base_builddir}
434         for file in ${c_base_headers_rename}; do \
435           $(INSTALL_DATA) ${c_base_builddir}/$${file} \
436             ${gxx_include_dir}/${c_base_builddir}; done
437         for file in ${c_base_headers_extra}; do \
438           $(INSTALL_DATA) $${file} ${gxx_include_dir}/${bits_builddir}; done
439         $(INSTALL) -d ${gxx_include_dir}/${std_builddir}
440         for file in ${std_headers_rename}; do \
441           $(INSTALL_DATA) ${std_builddir}/$${file} \
442             ${gxx_include_dir}/${std_builddir}; done
443         $(INSTALL) -d ${gxx_include_dir}/${target_builddir}
444         for file in ${target_headers} ${extra_target_headers} \
445          ${thread_target_headers}; do \
446           $(INSTALL_DATA) $${file} ${gxx_include_dir}/${target_builddir}; done
447
448 # By adding these files here, automake will remove them for 'make clean'
449 #CLEANFILES = ${allstamps}
450
451 # Stop implicit '.o' make rules from ever stomping on extensionless
452 # headers, in the improbable case where some foolish, crack-addled
453 # developer tries to create them via make in the include build
454 # directory. (This is more of an example of how this kind of rule can
455 # be made.)
456 .PRECIOUS: $(std_headers_rename) $(c_base_headers_rename)
457 $(std_headers_rename): ; @:
458 $(c_base_headers_rename): ; @: