OSDN Git Service

2002-01-12 Benjamin Kosnik <bkoz@redhat.com>
[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_file.h \
38         ${bits_srcdir}/basic_ios.h \
39         ${bits_srcdir}/basic_ios.tcc \
40         ${bits_srcdir}/basic_string.h \
41         ${bits_srcdir}/basic_string.tcc \
42         ${bits_srcdir}/boost_concept_check.h \
43         ${bits_srcdir}/char_traits.h \
44         ${bits_srcdir}/codecvt.h \
45         ${bits_srcdir}/concept_check.h \
46         ${bits_srcdir}/cpp_type_traits.h \
47         ${bits_srcdir}/fpos.h \
48         ${bits_srcdir}/fstream.tcc \
49         ${bits_srcdir}/functexcept.h \
50         ${bits_srcdir}/generic_shadow.h \
51         ${bits_srcdir}/gslice.h \
52         ${bits_srcdir}/gslice_array.h \
53         ${bits_srcdir}/indirect_array.h \
54         ${bits_srcdir}/ios_base.h \
55         ${bits_srcdir}/istream.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.h \
65         ${bits_srcdir}/slice_array.h \
66         ${bits_srcdir}/sstream.tcc \
67         ${bits_srcdir}/stl_algo.h \
68         ${bits_srcdir}/stl_algobase.h \
69         ${bits_srcdir}/stl_alloc.h \
70         ${bits_srcdir}/stl_bvector.h \
71         ${bits_srcdir}/stl_construct.h \
72         ${bits_srcdir}/stl_deque.h \
73         ${bits_srcdir}/stl_function.h \
74         ${bits_srcdir}/stl_heap.h \
75         ${bits_srcdir}/stl_iterator.h \
76         ${bits_srcdir}/stl_iterator_base_funcs.h \
77         ${bits_srcdir}/stl_iterator_base_types.h \
78         ${bits_srcdir}/stl_list.h \
79         ${bits_srcdir}/stl_map.h \
80         ${bits_srcdir}/stl_multimap.h \
81         ${bits_srcdir}/stl_multiset.h \
82         ${bits_srcdir}/stl_numeric.h \
83         ${bits_srcdir}/stl_pair.h \
84         ${bits_srcdir}/stl_pthread_alloc.h \
85         ${bits_srcdir}/stl_queue.h \
86         ${bits_srcdir}/stl_raw_storage_iter.h \
87         ${bits_srcdir}/stl_relops.h \
88         ${bits_srcdir}/stl_set.h \
89         ${bits_srcdir}/stl_stack.h \
90         ${bits_srcdir}/stl_tempbuf.h \
91         ${bits_srcdir}/stl_threads.h \
92         ${bits_srcdir}/stl_tree.h \
93         ${bits_srcdir}/stl_uninitialized.h \
94         ${bits_srcdir}/stl_vector.h \
95         ${bits_srcdir}/streambuf.tcc \
96         ${bits_srcdir}/stringfwd.h \
97         ${bits_srcdir}/type_traits.h \
98         ${bits_srcdir}/valarray_array.h \
99         ${bits_srcdir}/valarray_array.tcc \
100         ${bits_srcdir}/valarray_meta.h
101
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.h \
140         ${backward_srcdir}/strstream \
141         ${backward_srcdir}/backward_warning.h
142
143 ext_srcdir = ${glibcpp_srcdir}/include/ext
144 ext_builddir = ./ext
145 ext_headers = \
146         ${ext_srcdir}/algorithm \
147         ${ext_srcdir}/functional \
148         ${ext_srcdir}/hash_map \
149         ${ext_srcdir}/hash_set \
150         ${ext_srcdir}/iterator \
151         ${ext_srcdir}/memory \
152         ${ext_srcdir}/numeric \
153         ${ext_srcdir}/rb_tree \
154         ${ext_srcdir}/rope \
155         ${ext_srcdir}/ropeimpl.h \
156         ${ext_srcdir}/slist \
157         ${ext_srcdir}/stl_hash_fun.h \
158         ${ext_srcdir}/stl_hashtable.h \
159         ${ext_srcdir}/stl_rope.h
160
161 # This is the common subset of files that all three "C" header models use.
162 c_base_srcdir = @C_INCLUDE_DIR@
163 c_base_builddir = ./
164 c_base_headers = \
165         ${c_base_srcdir}/cassert \
166         ${c_base_srcdir}/cctype \
167         ${c_base_srcdir}/cerrno \
168         ${c_base_srcdir}/cfloat \
169         ${c_base_srcdir}/ciso646 \
170         ${c_base_srcdir}/climits \
171         ${c_base_srcdir}/clocale \
172         ${c_base_srcdir}/cmath \
173         ${c_base_srcdir}/csetjmp \
174         ${c_base_srcdir}/csignal \
175         ${c_base_srcdir}/cstdarg \
176         ${c_base_srcdir}/cstddef \
177         ${c_base_srcdir}/cstdio \
178         ${c_base_srcdir}/cstdlib \
179         ${c_base_srcdir}/cstring \
180         ${c_base_srcdir}/ctime \
181         ${c_base_srcdir}/cwchar \
182         ${c_base_srcdir}/cwctype \
183         ${c_base_srcdir}/cmath.tcc 
184
185 std_srcdir = ${glibcpp_srcdir}/include/std
186 std_builddir = ./
187 std_headers = \
188         ${std_srcdir}/std_algorithm.h \
189         ${std_srcdir}/std_bitset.h \
190         ${std_srcdir}/std_complex.h \
191         ${std_srcdir}/std_deque.h \
192         ${std_srcdir}/std_fstream.h \
193         ${std_srcdir}/std_functional.h \
194         ${std_srcdir}/std_iomanip.h \
195         ${std_srcdir}/std_ios.h \
196         ${std_srcdir}/std_iosfwd.h \
197         ${std_srcdir}/std_iostream.h \
198         ${std_srcdir}/std_istream.h \
199         ${std_srcdir}/std_iterator.h \
200         ${std_srcdir}/std_limits.h \
201         ${std_srcdir}/std_list.h \
202         ${std_srcdir}/std_locale.h \
203         ${std_srcdir}/std_map.h \
204         ${std_srcdir}/std_memory.h \
205         ${std_srcdir}/std_numeric.h \
206         ${std_srcdir}/std_ostream.h \
207         ${std_srcdir}/std_queue.h \
208         ${std_srcdir}/std_set.h \
209         ${std_srcdir}/std_sstream.h \
210         ${std_srcdir}/std_stack.h \
211         ${std_srcdir}/std_stdexcept.h \
212         ${std_srcdir}/std_streambuf.h \
213         ${std_srcdir}/std_string.h \
214         ${std_srcdir}/std_utility.h \
215         ${std_srcdir}/std_valarray.h \
216         ${std_srcdir}/std_vector.h
217 # Renamed at build time. 
218 std_headers_rename = \
219         ${std_builddir}/algorithm \
220         ${std_builddir}/bitset \
221         ${std_builddir}/complex \
222         ${std_builddir}/deque \
223         ${std_builddir}/fstream \
224         ${std_builddir}/functional \
225         ${std_builddir}/iomanip \
226         ${std_builddir}/ios \
227         ${std_builddir}/iosfwd \
228         ${std_builddir}/iostream \
229         ${std_builddir}/istream \
230         ${std_builddir}/iterator \
231         ${std_builddir}/limits \
232         ${std_builddir}/list \
233         ${std_builddir}/locale \
234         ${std_builddir}/map \
235         ${std_builddir}/memory \
236         ${std_builddir}/numeric \
237         ${std_builddir}/ostream \
238         ${std_builddir}/queue \
239         ${std_builddir}/set \
240         ${std_builddir}/sstream \
241         ${std_builddir}/stack \
242         ${std_builddir}/stdexcept \
243         ${std_builddir}/streambuf \
244         ${std_builddir}/string \
245         ${std_builddir}/utility \
246         ${std_builddir}/valarray \
247         ${std_builddir}/vector
248
249 target_srcdir = ${glibcpp_srcdir}/@OS_INC_SRCDIR@
250 target_builddir = ./${target_alias}/bits
251 target_headers = \
252         ${target_srcdir}/ctype_base.h \
253         ${target_srcdir}/ctype_inline.h \
254         ${target_srcdir}/ctype_noninline.h \
255         ${target_srcdir}/os_defines.h \
256         ${glibcpp_srcdir}/@ATOMICITY_INC_SRCDIR@/atomicity.h \
257         ${glibcpp_srcdir}/@CPU_LIMITS_INC_SRCDIR@/cpu_limits.h 
258 # These extra_target_headers files are all built with ad hoc naming rules.
259 extra_target_headers = \
260         ${target_builddir}/basic_file_model.h \
261         ${target_builddir}/c++config.h \
262         ${target_builddir}/c++io.h \
263         ${target_builddir}/c++locale.h \
264         ${target_builddir}/messages_members.h \
265         ${target_builddir}/codecvt_specializations.h
266
267 thread_builddir = ./${target_alias}/bits
268 thread_headers = \
269         ${thread_builddir}/gthr.h \
270         ${thread_builddir}/gthr-single.h \
271         ${thread_builddir}/gthr-default.h
272
273 # List of all timestamp files.  By keeping only one copy of this list, both
274 # CLEANFILES and all-local are kept up-to-date.
275 allstamps = stamp-std stamp-bits stamp-c_base stamp-backward stamp-ext \
276         stamp-target stamp-thread 
277
278
279 # Here are the rules for building the headers
280 all-local: ${target_builddir}/c++config.h ${allstamps}
281
282 # This rule is slightly different, in that we must change the name of the
283 # local file from std_foo.h to foo.
284 stamp-std: ${std_headers}
285         @if [ ! -d "${std_builddir}" ]; then \
286           mkdir -p ${std_builddir} ;\
287         fi ;\
288         (cd ${std_builddir} && for h in $?; do \
289           official_name=`echo $$h | sed -e 's,.*/std_,,' -e 's,\.h$$,,'` ;\
290           @LN_S@ $$h ./$${official_name} || true ;\
291         done) ;\
292         echo `date` > stamp-std 
293
294 stamp-bits: ${bits_headers}
295         @if [ ! -d "${bits_builddir}" ]; then \
296           mkdir -p ${bits_builddir} ;\
297         fi ;\
298         (cd ${bits_builddir} && @LN_S@ $? . || true) ;\
299         echo `date` > stamp-bits
300
301 stamp-c_base: ${c_base_headers}
302         @if [ ! -d "${c_base_builddir}" ]; then \
303           mkdir -p ${c_base_builddir} ;\
304         fi ;\
305         (cd ${c_base_builddir} && @LN_S@ $? . || true) ;\
306         echo `date` > stamp-c_base
307
308 stamp-backward: ${backward_headers}
309         @if [ ! -d "${backward_builddir}" ]; then \
310           mkdir -p ${backward_builddir} ;\
311         fi ;\
312         (cd ${backward_builddir} && @LN_S@ $? . || true) ;\
313         echo `date` > stamp-backward
314
315 stamp-ext: ${ext_headers}
316         @if [ ! -d "${ext_builddir}" ]; then \
317           mkdir -p ${ext_builddir} ;\
318         fi ;\
319         (cd ${ext_builddir} && @LN_S@ $? . || true) ;\
320         echo `date` > stamp-ext
321
322 # This target is special.  The timestamp on a directory gets modified
323 # whenever a file it contains gets modified, and that'll throw off all the
324 # build dependencies that need this target.  On the other hand, someone
325 # could delete the directory and not the stamp file, faking out make.
326 ${target_builddir}: stamp-${target_alias}
327 stamp-${target_alias}:
328         @if [ ! -d ${target_builddir} ]; then \
329           mkdir -p ${target_builddir} ;\
330           echo `date` > stamp-${target_alias} ;\
331         fi
332
333 # Target includes static.
334 stamp-target: ${target_headers} ${target_builddir}
335         @cd ${target_builddir} ;\
336         if [ ! -f stamp-target ]; then \
337           @LN_S@ ${target_headers} . || true ;\
338           @LN_S@ ${glibcpp_srcdir}/@BASIC_FILE_H@ basic_file_model.h || true ;\
339           @LN_S@ ${glibcpp_srcdir}/@CSTDIO_H@ c++io.h || true ;\
340           @LN_S@ ${glibcpp_srcdir}/@CLOCALE_H@ c++locale.h || true ;\
341           @LN_S@ ${glibcpp_srcdir}/@CMESSAGES_H@ messages_members.h || true ;\
342           @LN_S@ ${glibcpp_srcdir}/@CCODECVT_H@ codecvt_specializations.h || true ;\
343           echo `date` > stamp-target; \
344         fi
345
346 # Target includes dynamic.
347 ${target_builddir}/c++config.h: ../config.h \
348                                 ${glibcpp_srcdir}/include/bits/c++config \
349                                 ${target_builddir}
350         @cat ${glibcpp_srcdir}/include/bits/c++config > $@ ;\
351         sed -e 's/HAVE_/_GLIBCPP_HAVE_/g' \
352             -e 's/PACKAGE/_GLIBCPP_PACKAGE/g' \
353             -e 's/VERSION/_GLIBCPP_VERSION/g' \
354             -e 's/WORDS_/_GLIBCPP_WORDS_/g' \
355             < ${glibcpp_builddir}/config.h >> $@ ;\
356         echo "#endif // _CPP_CPPCONFIG_" >>$@
357
358 # Target includes for threads
359 glibcpp_thread_h = @glibcpp_thread_h@
360 uppercase = [ABCDEFGHIJKLMNOPQRSTUVWXYZ_]
361
362 stamp-thread: ${thread_headers} ${thread_builddir}
363         @echo `date` > stamp-thread
364
365
366 ${thread_builddir}/gthr.h:
367         sed -e '/^#/s/\(${uppercase}${uppercase}*\)/_GLIBCPP_\1/g' \
368             -e 's,^#include "\(.*\)",#include <bits/\1>,g' \
369             < ${toplevel_srcdir}/gcc/gthr.h > $@
370
371 ${thread_builddir}/gthr-single.h:
372         sed -e 's/\(UNUSED\)/_GLIBCPP_\1/g' \
373             -e 's/\(GCC${uppercase}*_H\)/_GLIBCPP_\1/g' \
374             < ${toplevel_srcdir}/gcc/gthr-single.h > $@
375
376 ${thread_builddir}/gthr-default.h:
377         sed -e 's/\(UNUSED\)/_GLIBCPP_\1/g' \
378             -e 's/\(GCC${uppercase}*_H\)/_GLIBCPP_\1/g' \
379             -e 's/\(${uppercase}*WEAK\)/_GLIBCPP_\1/g' \
380             < ${toplevel_srcdir}/gcc/${glibcpp_thread_h} > $@
381
382 # For robustness sake (in light of junk files or in-source
383 # configuration), copy from the build or source tree to the install
384 # tree using only the human-maintained file lists and directory
385 # components.  Yes, with minor differences, this is sheer duplication
386 # of the staging rules above using $(INSTALL_DATA) instead of LN_S and
387 # `$(INSTALL) -d' instead of `mkdir -p'.  In particular,
388 # extra_target_headers are taken out of the build tree staging area;
389 # the rest are taken from the original source tree.
390 gxx_include_dir = @gxx_include_dir@
391 install-data-local:
392         $(INSTALL) -d ${gxx_include_dir}
393         $(INSTALL) -d ${gxx_include_dir}/${bits_builddir}
394         for file in ${bits_headers}; do \
395           $(INSTALL_DATA) $${file} ${gxx_include_dir}/${bits_builddir}; done
396         $(INSTALL) -d ${gxx_include_dir}/${backward_builddir}
397         for file in ${backward_headers}; do \
398           $(INSTALL_DATA) $${file} ${gxx_include_dir}/${backward_builddir}; done
399         $(INSTALL) -d ${gxx_include_dir}/${ext_builddir}
400         for file in ${ext_headers}; do \
401           $(INSTALL_DATA) $${file} ${gxx_include_dir}/${ext_builddir}; done
402         $(INSTALL) -d ${gxx_include_dir}/${c_base_builddir}
403         for file in ${c_base_headers}; do \
404           $(INSTALL_DATA) $${file} ${gxx_include_dir}/${c_base_builddir}; done
405         $(INSTALL) -d ${gxx_include_dir}/${std_builddir}
406         for file in ${std_headers_rename}; do \
407           $(INSTALL_DATA) $${file} ${gxx_include_dir}/${std_builddir}; done
408         $(INSTALL) -d ${gxx_include_dir}/${target_builddir}
409         for file in ${target_headers} ${extra_target_headers}; do \
410           $(INSTALL_DATA) $${file} ${gxx_include_dir}/${target_builddir}; done
411         $(INSTALL) -d ${gxx_include_dir}/${thread_builddir}
412         for file in ${thread_headers}; do \
413           $(INSTALL_DATA) $${file} ${gxx_include_dir}/${thread_builddir}; done
414
415 # By adding these files here, automake will remove them for 'make clean'
416 #CLEANFILES = ${allstamps}