OSDN Git Service

* configure.in (LIMITS_INC_SRCDIR): New variable.
[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 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 ## $Id: Makefile.am,v 1.4 2001/08/10 20:44:53 ljrittle Exp $
25
26 AUTOMAKE_OPTIONS = 1.3 gnits
27 MAINT_CHARSET = latin1
28
29 mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
30
31 # Cross compiler and multilib support.
32 CXX = @glibcpp_CXX@
33 glibcpp_srcdir=@glibcpp_srcdir@
34 glibcpp_builddir=@glibcpp_builddir@
35
36 bits_srcdir = ${glibcpp_srcdir}/include/bits
37 bits_builddir = ./bits
38 bits_headers = \
39         ${bits_srcdir}/basic_file.h \
40         ${bits_srcdir}/basic_ios.h \
41         ${bits_srcdir}/basic_ios.tcc \
42         ${bits_srcdir}/basic_string.h \
43         ${bits_srcdir}/basic_string.tcc \
44         ${bits_srcdir}/boost_concept_check.h \
45         ${bits_srcdir}/char_traits.h \
46         ${bits_srcdir}/codecvt.h \
47         ${bits_srcdir}/concept_check.h \
48         ${bits_srcdir}/cpp_type_traits.h \
49         ${bits_srcdir}/fpos.h \
50         ${bits_srcdir}/fstream.tcc \
51         ${bits_srcdir}/functexcept.h \
52         ${bits_srcdir}/generic_shadow.h \
53         ${bits_srcdir}/gslice.h \
54         ${bits_srcdir}/gslice_array.h \
55         ${bits_srcdir}/indirect_array.h \
56         ${bits_srcdir}/ios_base.h \
57         ${bits_srcdir}/istream.tcc \
58         ${bits_srcdir}/locale_facets.h \
59         ${bits_srcdir}/locale_facets.tcc \
60         ${bits_srcdir}/localefwd.h \
61         ${bits_srcdir}/mask_array.h \
62         ${bits_srcdir}/ostream.tcc \
63         ${bits_srcdir}/pthread_allocimpl.h \
64         ${bits_srcdir}/stream_iterator.h \
65         ${bits_srcdir}/streambuf_iterator.h \
66         ${bits_srcdir}/slice.h \
67         ${bits_srcdir}/slice_array.h \
68         ${bits_srcdir}/sstream.tcc \
69         ${bits_srcdir}/std_algorithm.h \
70         ${bits_srcdir}/std_bitset.h \
71         ${bits_srcdir}/std_complex.h \
72         ${bits_srcdir}/std_deque.h \
73         ${bits_srcdir}/std_fstream.h \
74         ${bits_srcdir}/std_functional.h \
75         ${bits_srcdir}/std_iomanip.h \
76         ${bits_srcdir}/std_ios.h \
77         ${bits_srcdir}/std_iosfwd.h \
78         ${bits_srcdir}/std_iostream.h \
79         ${bits_srcdir}/std_istream.h \
80         ${bits_srcdir}/std_iterator.h \
81         ${bits_srcdir}/std_limits.h \
82         ${bits_srcdir}/std_list.h \
83         ${bits_srcdir}/std_locale.h \
84         ${bits_srcdir}/std_map.h \
85         ${bits_srcdir}/std_memory.h \
86         ${bits_srcdir}/std_numeric.h \
87         ${bits_srcdir}/std_ostream.h \
88         ${bits_srcdir}/std_queue.h \
89         ${bits_srcdir}/std_set.h \
90         ${bits_srcdir}/std_sstream.h \
91         ${bits_srcdir}/std_stack.h \
92         ${bits_srcdir}/std_stdexcept.h \
93         ${bits_srcdir}/std_streambuf.h \
94         ${bits_srcdir}/std_string.h \
95         ${bits_srcdir}/std_utility.h \
96         ${bits_srcdir}/std_valarray.h \
97         ${bits_srcdir}/std_vector.h \
98         ${bits_srcdir}/stl_algo.h \
99         ${bits_srcdir}/stl_algobase.h \
100         ${bits_srcdir}/stl_alloc.h \
101         ${bits_srcdir}/stl_bvector.h \
102         ${bits_srcdir}/stl_construct.h \
103         ${bits_srcdir}/stl_deque.h \
104         ${bits_srcdir}/stl_function.h \
105         ${bits_srcdir}/stl_heap.h \
106         ${bits_srcdir}/stl_iterator.h \
107         ${bits_srcdir}/stl_iterator_base_funcs.h \
108         ${bits_srcdir}/stl_iterator_base_types.h \
109         ${bits_srcdir}/stl_list.h \
110         ${bits_srcdir}/stl_map.h \
111         ${bits_srcdir}/stl_multimap.h \
112         ${bits_srcdir}/stl_multiset.h \
113         ${bits_srcdir}/stl_numeric.h \
114         ${bits_srcdir}/stl_pair.h \
115         ${bits_srcdir}/stl_pthread_alloc.h \
116         ${bits_srcdir}/stl_queue.h \
117         ${bits_srcdir}/stl_raw_storage_iter.h \
118         ${bits_srcdir}/stl_relops.h \
119         ${bits_srcdir}/stl_set.h \
120         ${bits_srcdir}/stl_stack.h \
121         ${bits_srcdir}/stl_tempbuf.h \
122         ${bits_srcdir}/stl_threads.h \
123         ${bits_srcdir}/stl_tree.h \
124         ${bits_srcdir}/stl_uninitialized.h \
125         ${bits_srcdir}/stl_vector.h \
126         ${bits_srcdir}/streambuf.tcc \
127         ${bits_srcdir}/stringfwd.h \
128         ${bits_srcdir}/type_traits.h \
129         ${bits_srcdir}/valarray_array.h \
130         ${bits_srcdir}/valarray_array.tcc \
131         ${bits_srcdir}/valarray_meta.h
132
133 backward_srcdir = ${glibcpp_srcdir}/include/backward
134 backward_builddir = ./backward
135 backward_headers = \
136         ${backward_srcdir}/complex.h \
137         ${backward_srcdir}/iomanip.h \
138         ${backward_srcdir}/istream.h \
139         ${backward_srcdir}/ostream.h \
140         ${backward_srcdir}/stream.h \
141         ${backward_srcdir}/streambuf.h \
142         ${backward_srcdir}/algo.h \
143         ${backward_srcdir}/algobase.h \
144         ${backward_srcdir}/alloc.h \
145         ${backward_srcdir}/bvector.h \
146         ${backward_srcdir}/defalloc.h \
147         ${backward_srcdir}/deque.h \
148         ${backward_srcdir}/function.h \
149         ${backward_srcdir}/hash_map.h \
150         ${backward_srcdir}/hash_set.h \
151         ${backward_srcdir}/hashtable.h \
152         ${backward_srcdir}/heap.h \
153         ${backward_srcdir}/iostream.h \
154         ${backward_srcdir}/iterator.h \
155         ${backward_srcdir}/list.h \
156         ${backward_srcdir}/map.h \
157         ${backward_srcdir}/multimap.h \
158         ${backward_srcdir}/new.h \
159         ${backward_srcdir}/multiset.h \
160         ${backward_srcdir}/pair.h \
161         ${backward_srcdir}/queue.h \
162         ${backward_srcdir}/rope.h \
163         ${backward_srcdir}/set.h \
164         ${backward_srcdir}/slist.h \
165         ${backward_srcdir}/stack.h \
166         ${backward_srcdir}/tempbuf.h \
167         ${backward_srcdir}/tree.h \
168         ${backward_srcdir}/vector.h \
169         ${backward_srcdir}/fstream.h \
170         ${backward_srcdir}/strstream.h \
171         ${backward_srcdir}/strstream \
172         ${backward_srcdir}/backward_warning.h
173
174 ext_srcdir = ${glibcpp_srcdir}/include/ext
175 ext_builddir = ./ext
176 ext_headers = \
177         ${ext_srcdir}/rope \
178         ${ext_srcdir}/ropeimpl.h \
179         ${ext_srcdir}/stl_rope.h \
180         ${ext_srcdir}/slist \
181         ${ext_srcdir}/hash_map \
182         ${ext_srcdir}/hash_set \
183         ${ext_srcdir}/stl_hashtable.h \
184         ${ext_srcdir}/stl_hash_fun.h
185
186 # This is the common subset of files that all three "C" header models use.
187 c_base_srcdir = @C_INCLUDE_DIR@/bits
188 c_base_builddir = ./bits
189 c_base_headers = \
190         ${c_base_srcdir}/std_cassert.h \
191         ${c_base_srcdir}/std_cctype.h \
192         ${c_base_srcdir}/std_cerrno.h \
193         ${c_base_srcdir}/std_cfloat.h \
194         ${c_base_srcdir}/std_climits.h \
195         ${c_base_srcdir}/std_clocale.h \
196         ${c_base_srcdir}/std_cmath.h \
197         ${c_base_srcdir}/std_csetjmp.h \
198         ${c_base_srcdir}/std_csignal.h \
199         ${c_base_srcdir}/std_cstdarg.h \
200         ${c_base_srcdir}/std_cstddef.h \
201         ${c_base_srcdir}/std_cstdio.h \
202         ${c_base_srcdir}/std_cstdlib.h \
203         ${c_base_srcdir}/std_cstring.h \
204         ${c_base_srcdir}/std_ctime.h \
205         ${c_base_srcdir}/std_cwchar.h \
206         ${c_base_srcdir}/std_cwctype.h \
207         ${c_base_srcdir}/cmath.tcc 
208
209 ##c_compatibility_srcdir = ${glibcpp_srcdir}/include/c_compatibility
210 ##c_compatibility_builddir = ./
211 ##c_compatibility_headers = \
212 ##      ${c_compatibility_srcdir}/assert.h \
213 ##      ${c_compatibility_srcdir}/ctype.h \
214 ##      ${c_compatibility_srcdir}/errno.h \
215 ##      ${c_compatibility_srcdir}/float.h \
216 ##      ${c_compatibility_srcdir}/limits.h \
217 ##      ${c_compatibility_srcdir}/locale.h \
218 ##      ${c_compatibility_srcdir}/math.h \
219 ##      ${c_compatibility_srcdir}/setjmp.h \
220 ##      ${c_compatibility_srcdir}/signal.h \
221 ##      ${c_compatibility_srcdir}/stdarg.h \
222 ##      ${c_compatibility_srcdir}/stddef.h \
223 ##      ${c_compatibility_srcdir}/stdio.h \
224 ##      ${c_compatibility_srcdir}/stdlib.h \
225 ##      ${c_compatibility_srcdir}/string.h \
226 ##      ${c_compatibility_srcdir}/time.h \
227 ##      ${c_compatibility_srcdir}/wchar.h \
228 ##      ${c_compatibility_srcdir}/wctype.h 
229
230 std_srcdir = ${glibcpp_srcdir}/include/std
231 std_builddir = ./
232 std_headers = \
233         ${std_srcdir}/algorithm \
234         ${std_srcdir}/bitset \
235         ${std_srcdir}/complex \
236         ${std_srcdir}/deque \
237         ${std_srcdir}/fstream \
238         ${std_srcdir}/functional \
239         ${std_srcdir}/iomanip \
240         ${std_srcdir}/ios \
241         ${std_srcdir}/iosfwd \
242         ${std_srcdir}/iostream \
243         ${std_srcdir}/istream \
244         ${std_srcdir}/iterator \
245         ${std_srcdir}/limits \
246         ${std_srcdir}/list \
247         ${std_srcdir}/locale \
248         ${std_srcdir}/map \
249         ${std_srcdir}/memory \
250         ${std_srcdir}/numeric \
251         ${std_srcdir}/ostream \
252         ${std_srcdir}/queue \
253         ${std_srcdir}/set \
254         ${std_srcdir}/sstream \
255         ${std_srcdir}/stack \
256         ${std_srcdir}/stdexcept \
257         ${std_srcdir}/streambuf \
258         ${std_srcdir}/string \
259         ${std_srcdir}/utility \
260         ${std_srcdir}/valarray \
261         ${std_srcdir}/vector \
262         ${std_srcdir}/cassert \
263         ${std_srcdir}/cctype \
264         ${std_srcdir}/cerrno \
265         ${std_srcdir}/cfloat \
266         ${std_srcdir}/climits \
267         ${std_srcdir}/clocale \
268         ${std_srcdir}/ciso646 \
269         ${std_srcdir}/cmath \
270         ${std_srcdir}/csetjmp \
271         ${std_srcdir}/csignal \
272         ${std_srcdir}/cstdarg \
273         ${std_srcdir}/cstddef \
274         ${std_srcdir}/cstdio \
275         ${std_srcdir}/cstdlib \
276         ${std_srcdir}/cstring \
277         ${std_srcdir}/ctime \
278         ${std_srcdir}/cwchar \
279         ${std_srcdir}/cwctype
280
281 target_srcdir = ${glibcpp_srcdir}/@OS_INC_SRCDIR@
282 target_builddir = ./${target_alias}/bits
283 target_headers = \
284         ${target_srcdir}/ctype_base.h \
285         ${target_srcdir}/ctype_inline.h \
286         ${target_srcdir}/ctype_noninline.h \
287         ${target_srcdir}/os_defines.h \
288         ${glibcpp_srcdir}/@ATOMICITY_INC_SRCDIR@/atomicity.h \
289         ${glibcpp_srcdir}/@LIMITS_INC_SRCDIR@/limits.h
290
291 thread_builddir = ./${target_alias}/bits
292 thread_headers = \
293         ${thread_builddir}/gthr.h \
294         ${thread_builddir}/gthr-single.h \
295         ${thread_builddir}/gthr-default.h
296
297 # List of all timestamp files.  By keeping only one copy of this list, both
298 # CLEANFILES and all-local are kept up-to-date.
299 # XXX stamp-c_compatibility not implemented yet.
300 allstamps = stamp-std stamp-bits stamp-c_base stamp-backward stamp-ext \
301         stamp-target stamp-thread stamp-file_model stamp-io \
302         stamp-locale stamp-messages_model stamp-codecvt_model
303
304 # By adding these files here, automake will remove them for 'make clean'
305 CLEANFILES = ${allstamps}
306
307 # Here are the rules for building the headers
308 all-local: \
309         ${target_builddir}/c++config.h \
310         ${allstamps}
311
312 stamp-std: ${std_headers}
313         @if [ ! -d "${std_builddir}" ]; then \
314           mkdir -p ${std_builddir} ;\
315         fi ;\
316         (cd ${std_builddir} && @LN_S@ $? .) ;\
317         echo `date` > stamp-std
318
319 stamp-bits: ${bits_headers}
320         @if [ ! -d "${bits_builddir}" ]; then \
321           mkdir -p ${bits_builddir} ;\
322         fi ;\
323         (cd ${bits_builddir} && @LN_S@ $? .) ;\
324         echo `date` > stamp-bits
325
326 stamp-c_base: ${c_base_headers}
327         @if [ ! -d "${c_base_builddir}" ]; then \
328           mkdir -p ${c_base_builddir} ;\
329         fi ;\
330         (cd ${c_base_builddir} && @LN_S@ $? .) ;\
331         echo `date` > stamp-c_base
332
333 stamp-c_compatibility: ${c_compatibility_headers}
334         @if [ ! -d "${c_compatibility_builddir}" ]; then \
335           mkdir -p ${c_compatibility_builddir} ;\
336         fi ;\
337         (cd ${c_compatibility_builddir} && @LN_S@ $? .) ;\
338         echo `date` > stamp-c_compatibility
339
340 stamp-backward: ${backward_headers}
341         @if [ ! -d "${backward_builddir}" ]; then \
342           mkdir -p ${backward_builddir} ;\
343         fi ;\
344         (cd ${backward_builddir} && @LN_S@ $? .) ;\
345         echo `date` > stamp-backward
346
347 stamp-ext: ${ext_headers}
348         @if [ ! -d "${ext_builddir}" ]; then \
349           mkdir -p ${ext_builddir} ;\
350         fi ;\
351         (cd ${ext_builddir} && @LN_S@ $? .) ;\
352         echo `date` > stamp-ext
353
354 # Can't use $? in command, otherwise target_builddir will trigger it, and
355 # we get bizarre symlinks mazes.
356 stamp-target: ${target_headers} ${target_builddir}
357         @(cd ${target_builddir} && @LN_S@ ${target_headers} .) ;\
358         echo `date` > stamp-target
359
360 stamp-thread: ${thread_headers} ${thread_builddir}
361         @echo `date` > stamp-thread
362
363 stamp-file_model: ${glibcpp_srcdir}/@BASIC_FILE_H@ ${target_builddir}
364         @(cd ${target_builddir} && @LN_S@ ${glibcpp_srcdir}/@BASIC_FILE_H@ basic_file_model.h) ;\
365         echo `date` > stamp-file_model
366
367 stamp-io: ${glibcpp_srcdir}/@CSTDIO_H@ ${target_builddir}
368         @(cd ${target_builddir} && @LN_S@ ${glibcpp_srcdir}/@CSTDIO_H@ c++io.h) ;\
369         echo `date` > stamp-io
370
371 stamp-locale: ${glibcpp_srcdir}/@CLOCALE_H@ ${target_builddir}
372         @(cd ${target_builddir} && @LN_S@ ${glibcpp_srcdir}/@CLOCALE_H@ c++locale.h) ;\
373         echo `date` > stamp-locale
374
375 stamp-messages_model: ${glibcpp_srcdir}/@CMESSAGES_H@ ${target_builddir}
376         @(cd ${target_builddir} && @LN_S@ ${glibcpp_srcdir}/@CMESSAGES_H@ messages_members.h) ;\
377         echo `date` > stamp-messages_model
378
379 stamp-codecvt_model: ${glibcpp_srcdir}/@CCODECVT_H@ ${target_builddir}
380         @(cd ${target_builddir} && @LN_S@ ${glibcpp_srcdir}/@CCODECVT_H@ codecvt_specializations.h) ;\
381         echo `date` > stamp-codecvt_model
382
383 # This target is kinda special.  The timestamp on a directory gets modified
384 # whenever a file it contains gets modified, and that'll throw off all the
385 # build dependencies that need this target.  On the other hand, someone
386 # could delete the directory and not the stamp file, faking out the make.
387 ${target_builddir}: stamp-${target_alias}
388
389 stamp-${target_alias}:
390         @if [ ! -d ${target_builddir} ]; then \
391           mkdir -p ${target_builddir} ;\
392         fi
393         echo `date` > stamp-${target_alias}
394
395 ${target_builddir}/c++config.h: ../config.h \
396                                 ${glibcpp_srcdir}/include/bits/c++config \
397                                 ${target_builddir}
398         @cat ${glibcpp_srcdir}/include/bits/c++config > $@ ;\
399         sed -e 's/HAVE_/_GLIBCPP_HAVE_/g' \
400             -e 's/PACKAGE/_GLIBCPP_PACKAGE/g' \
401             -e 's/VERSION/_GLIBCPP_VERSION/g' \
402             -e 's/WORDS_/_GLIBCPP_WORDS_/g' \
403             < ${glibcpp_builddir}/config.h >> $@ ;\
404         echo "#endif // _CPP_CPPCONFIG_" >>$@
405
406 glibcpp_thread_h = @glibcpp_thread_h@
407 uppercase = [ABCDEFGHIJKLMNOPQRSTUVWXYZ_]
408
409 ${thread_builddir}/gthr.h:
410         sed -e '/^#/s/\(${uppercase}${uppercase}*\)/_GLIBCPP_\1/g' \
411             -e 's,^#include "\(.*\)",#include <bits/\1>,g' \
412             < ${glibcpp_srcdir}/../gcc/gthr.h > $@
413
414 ${thread_builddir}/gthr-single.h:
415         sed -e 's/\(UNUSED\)/_GLIBCPP_\1/g' \
416             -e 's/\(GCC${uppercase}*_H\)/_GLIBCPP_\1/g' \
417             < ${glibcpp_srcdir}/../gcc/gthr-single.h > $@
418
419 ${thread_builddir}/gthr-default.h:
420         sed -e 's/\(UNUSED\)/_GLIBCPP_\1/g' \
421             -e 's/\(GCC${uppercase}*_H\)/_GLIBCPP_\1/g' \
422             -e 's/\(${uppercase}*WEAK\)/_GLIBCPP_\1/g' \
423             < ${glibcpp_srcdir}/../gcc/${glibcpp_thread_h} > $@
424
425 # One big happy istallation:  just copy everything from the build to the
426 # install tree (except for the build stamps).
427 gxx_include_dir = @gxx_include_dir@
428
429 install-data-local:
430         for file in `find . ! -name stamp-\* ! -name Makefile -print`; do \
431         installFile=${gxx_include_dir}/$${file} ;\
432         if [ -d $${file} ]; then \
433           $(INSTALL) -d $${installFile} ;\
434         else \
435           $(INSTALL_DATA) $${file} $${installFile} ;\
436         fi ;\
437         done
438