]> git.ipfire.org Git - thirdparty/gcc.git/blame - libstdc++-v3/include/Makefile.am
* config/vax/vax.h (MASK_UNIX_ASM, MASK_VAXC_ALIGNMENT)
[thirdparty/gcc.git] / libstdc++-v3 / include / Makefile.am
CommitLineData
4a9d5109
SW
1## Makefile for the include subdirectory of the GNU C++ Standard library.
2##
7bfea936 3## Copyright (C) 2001, 2002 Free Software Foundation, Inc.
4a9d5109
SW
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
8b5fd469 24AUTOMAKE_OPTIONS = 1.3 cygnus
4a9d5109
SW
25MAINT_CHARSET = latin1
26
27mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
28
29# Cross compiler and multilib support.
30CXX = @glibcpp_CXX@
31glibcpp_srcdir=@glibcpp_srcdir@
32glibcpp_builddir=@glibcpp_builddir@
33
34bits_srcdir = ${glibcpp_srcdir}/include/bits
35bits_builddir = ./bits
36bits_headers = \
4a9d5109
SW
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 \
4a9d5109
SW
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
101backward_srcdir = ${glibcpp_srcdir}/include/backward
102backward_builddir = ./backward
103backward_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
142ext_srcdir = ${glibcpp_srcdir}/include/ext
143ext_builddir = ./ext
144ext_headers = \
2c1bc4eb 145 ${ext_srcdir}/algorithm \
5cdd50a5
BK
146 ${ext_srcdir}/enc_filebuf.h \
147 ${ext_srcdir}/stdio_filebuf.h \
01b0d4b8 148 ${ext_srcdir}/functional \
3d90ff93
PE
149 ${ext_srcdir}/hash_map \
150 ${ext_srcdir}/hash_set \
151 ${ext_srcdir}/iterator \
f53d0ff1 152 ${ext_srcdir}/memory \
01b0d4b8 153 ${ext_srcdir}/numeric \
3b007b5d 154 ${ext_srcdir}/rb_tree \
4a9d5109
SW
155 ${ext_srcdir}/rope \
156 ${ext_srcdir}/ropeimpl.h \
4a9d5109 157 ${ext_srcdir}/slist \
3d90ff93 158 ${ext_srcdir}/stl_hash_fun.h \
4a9d5109 159 ${ext_srcdir}/stl_hashtable.h \
3d90ff93 160 ${ext_srcdir}/stl_rope.h
4a9d5109
SW
161
162# This is the common subset of files that all three "C" header models use.
30c1fa76 163c_base_srcdir = @C_INCLUDE_DIR@
73249e33 164c_base_builddir = .
4a9d5109 165c_base_headers = \
c5535768
BK
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
c5535768
BK
184c_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
4a9d5109 203
34ff0b99
BK
204# Some of the different "C" header models need extra files.
205# For --enable-cheaders=c_std
206if GLIBCPP_C_HEADERS_C_STD
207c_base_headers_extra = \
208 ${c_base_srcdir}/cmath.tcc
209else
210c_base_headers_extra =
211endif
212
4a9d5109 213std_srcdir = ${glibcpp_srcdir}/include/std
73249e33 214std_builddir = .
4a9d5109 215std_headers = \
066930bb
PE
216 ${std_srcdir}/std_algorithm.h \
217 ${std_srcdir}/std_bitset.h \
218 ${std_srcdir}/std_complex.h \
219 ${std_srcdir}/std_deque.h \
220 ${std_srcdir}/std_fstream.h \
221 ${std_srcdir}/std_functional.h \
222 ${std_srcdir}/std_iomanip.h \
223 ${std_srcdir}/std_ios.h \
224 ${std_srcdir}/std_iosfwd.h \
225 ${std_srcdir}/std_iostream.h \
226 ${std_srcdir}/std_istream.h \
227 ${std_srcdir}/std_iterator.h \
228 ${std_srcdir}/std_limits.h \
229 ${std_srcdir}/std_list.h \
230 ${std_srcdir}/std_locale.h \
231 ${std_srcdir}/std_map.h \
232 ${std_srcdir}/std_memory.h \
233 ${std_srcdir}/std_numeric.h \
234 ${std_srcdir}/std_ostream.h \
235 ${std_srcdir}/std_queue.h \
236 ${std_srcdir}/std_set.h \
237 ${std_srcdir}/std_sstream.h \
238 ${std_srcdir}/std_stack.h \
239 ${std_srcdir}/std_stdexcept.h \
240 ${std_srcdir}/std_streambuf.h \
241 ${std_srcdir}/std_string.h \
242 ${std_srcdir}/std_utility.h \
243 ${std_srcdir}/std_valarray.h \
244 ${std_srcdir}/std_vector.h
047398eb
BK
245# Renamed at build time.
246std_headers_rename = \
c5535768
BK
247 algorithm \
248 bitset \
249 complex \
250 deque \
251 fstream \
252 functional \
253 iomanip \
254 ios \
255 iosfwd \
256 iostream \
257 istream \
258 iterator \
259 limits \
260 list \
261 locale \
262 map \
263 memory \
264 numeric \
265 ostream \
73249e33 266 queue \
c5535768
BK
267 set \
268 sstream \
269 stack \
270 stdexcept \
271 streambuf \
272 string \
273 utility \
274 valarray \
275 vector
4a9d5109
SW
276
277target_srcdir = ${glibcpp_srcdir}/@OS_INC_SRCDIR@
278target_builddir = ./${target_alias}/bits
279target_headers = \
280 ${target_srcdir}/ctype_base.h \
281 ${target_srcdir}/ctype_inline.h \
282 ${target_srcdir}/ctype_noninline.h \
283 ${target_srcdir}/os_defines.h \
9f3c078e 284 ${glibcpp_srcdir}/@ATOMICITY_INC_SRCDIR@/atomicity.h \
f295ecef 285 ${glibcpp_srcdir}/@CPU_LIMITS_INC_SRCDIR@/cpu_limits.h
7bfea936
LR
286# These extra_target_headers files are all built with ad hoc naming rules.
287extra_target_headers = \
00532602 288 ${target_builddir}/basic_file.h \
7bfea936
LR
289 ${target_builddir}/c++config.h \
290 ${target_builddir}/c++io.h \
291 ${target_builddir}/c++locale.h \
292 ${target_builddir}/messages_members.h \
293 ${target_builddir}/codecvt_specializations.h
4a9d5109 294
3fcfe88d
LR
295thread_target_headers = \
296 ${target_builddir}/gthr.h \
297 ${target_builddir}/gthr-single.h \
79d6ba0b 298 ${target_builddir}/gthr-posix.h \
3fcfe88d 299 ${target_builddir}/gthr-default.h
4a9d5109
SW
300
301# List of all timestamp files. By keeping only one copy of this list, both
302# CLEANFILES and all-local are kept up-to-date.
4a9d5109 303allstamps = stamp-std stamp-bits stamp-c_base stamp-backward stamp-ext \
3fcfe88d 304 ${target_builddir}/stamp-target
4a9d5109 305
4a9d5109
SW
306
307# Here are the rules for building the headers
3fcfe88d 308all-local: ${target_builddir}/c++config.h ${thread_target_headers} ${allstamps}
4a9d5109 309
066930bb
PE
310# This rule is slightly different, in that we must change the name of the
311# local file from std_foo.h to foo.
4a9d5109
SW
312stamp-std: ${std_headers}
313 @if [ ! -d "${std_builddir}" ]; then \
314 mkdir -p ${std_builddir} ;\
315 fi ;\
066930bb
PE
316 (cd ${std_builddir} && for h in $?; do \
317 official_name=`echo $$h | sed -e 's,.*/std_,,' -e 's,\.h$$,,'` ;\
41fcea28 318 @LN_S@ $$h ./$${official_name} || true ;\
066930bb 319 done) ;\
843312be 320 echo `date` > stamp-std
4a9d5109
SW
321
322stamp-bits: ${bits_headers}
323 @if [ ! -d "${bits_builddir}" ]; then \
324 mkdir -p ${bits_builddir} ;\
325 fi ;\
7bfea936 326 (cd ${bits_builddir} && @LN_S@ $? . || true) ;\
4a9d5109
SW
327 echo `date` > stamp-bits
328
3eb35fcf 329stamp-c_base: ${c_base_headers} ${c_base_headers_extra}
4a9d5109
SW
330 @if [ ! -d "${c_base_builddir}" ]; then \
331 mkdir -p ${c_base_builddir} ;\
332 fi ;\
c5535768
BK
333 (cd ${c_base_builddir} && for h in ${c_base_headers}; do \
334 official_name=`echo $$h | sed -e 's,.*/std_,,' -e 's,\.h$$,,'` ;\
335 @LN_S@ $$h ./$${official_name} || true ;\
336 done) ;\
3eb35fcf
BK
337 if [ ! -z "${c_base_headers_extra}" ]; then \
338 (cd ${bits_builddir} && @LN_S@ ${c_base_headers_extra} . || true) ;\
339 fi ;\
4a9d5109
SW
340 echo `date` > stamp-c_base
341
4a9d5109
SW
342stamp-backward: ${backward_headers}
343 @if [ ! -d "${backward_builddir}" ]; then \
344 mkdir -p ${backward_builddir} ;\
345 fi ;\
7bfea936 346 (cd ${backward_builddir} && @LN_S@ $? . || true) ;\
4a9d5109
SW
347 echo `date` > stamp-backward
348
349stamp-ext: ${ext_headers}
350 @if [ ! -d "${ext_builddir}" ]; then \
351 mkdir -p ${ext_builddir} ;\
352 fi ;\
7bfea936 353 (cd ${ext_builddir} && @LN_S@ $? . || true) ;\
4a9d5109
SW
354 echo `date` > stamp-ext
355
4a9d5109
SW
356stamp-${target_alias}:
357 @if [ ! -d ${target_builddir} ]; then \
358 mkdir -p ${target_builddir} ;\
843312be
BK
359 echo `date` > stamp-${target_alias} ;\
360 fi
361
362# Target includes static.
3fcfe88d 363${target_builddir}/stamp-target: ${target_headers} stamp-${target_alias}
843312be
BK
364 @cd ${target_builddir} ;\
365 if [ ! -f stamp-target ]; then \
7bfea936 366 @LN_S@ ${target_headers} . || true ;\
00532602 367 @LN_S@ ${glibcpp_srcdir}/@BASIC_FILE_H@ basic_file.h || true ;\
7bfea936
LR
368 @LN_S@ ${glibcpp_srcdir}/@CSTDIO_H@ c++io.h || true ;\
369 @LN_S@ ${glibcpp_srcdir}/@CLOCALE_H@ c++locale.h || true ;\
370 @LN_S@ ${glibcpp_srcdir}/@CMESSAGES_H@ messages_members.h || true ;\
371 @LN_S@ ${glibcpp_srcdir}/@CCODECVT_H@ codecvt_specializations.h || true ;\
843312be 372 echo `date` > stamp-target; \
4a9d5109 373 fi
4a9d5109 374
843312be 375# Target includes dynamic.
42ebb17f 376${target_builddir}/c++config.h: ${CONFIG_HEADER} \
4a9d5109 377 ${glibcpp_srcdir}/include/bits/c++config \
3fcfe88d 378 stamp-${target_alias}
4a9d5109
SW
379 @cat ${glibcpp_srcdir}/include/bits/c++config > $@ ;\
380 sed -e 's/HAVE_/_GLIBCPP_HAVE_/g' \
381 -e 's/PACKAGE/_GLIBCPP_PACKAGE/g' \
382 -e 's/VERSION/_GLIBCPP_VERSION/g' \
383 -e 's/WORDS_/_GLIBCPP_WORDS_/g' \
42ebb17f 384 < ${CONFIG_HEADER} >> $@ ;\
4a9d5109
SW
385 echo "#endif // _CPP_CPPCONFIG_" >>$@
386
843312be 387# Target includes for threads
4a9d5109
SW
388glibcpp_thread_h = @glibcpp_thread_h@
389uppercase = [ABCDEFGHIJKLMNOPQRSTUVWXYZ_]
390
3fcfe88d 391${target_builddir}/gthr.h: ${toplevel_srcdir}/gcc/gthr.h stamp-${target_alias}
4a9d5109
SW
392 sed -e '/^#/s/\(${uppercase}${uppercase}*\)/_GLIBCPP_\1/g' \
393 -e 's,^#include "\(.*\)",#include <bits/\1>,g' \
533ab4d1 394 < ${toplevel_srcdir}/gcc/gthr.h > $@
4a9d5109 395
3fcfe88d
LR
396${target_builddir}/gthr-single.h: ${toplevel_srcdir}/gcc/gthr-single.h \
397 stamp-${target_alias}
4a9d5109
SW
398 sed -e 's/\(UNUSED\)/_GLIBCPP_\1/g' \
399 -e 's/\(GCC${uppercase}*_H\)/_GLIBCPP_\1/g' \
533ab4d1 400 < ${toplevel_srcdir}/gcc/gthr-single.h > $@
4a9d5109 401
79d6ba0b
LR
402${target_builddir}/gthr-posix.h: ${toplevel_srcdir}/gcc/gthr-posix.h \
403 stamp-${target_alias}
404 sed -e 's/\(UNUSED\)/_GLIBCPP_\1/g' \
405 -e 's/\(GCC${uppercase}*_H\)/_GLIBCPP_\1/g' \
406 -e 's/\(${uppercase}*WEAK\)/_GLIBCPP_\1/g' \
407 < ${toplevel_srcdir}/gcc/gthr-posix.h > $@
408
3fcfe88d
LR
409${target_builddir}/gthr-default.h: ${toplevel_srcdir}/gcc/${glibcpp_thread_h} \
410 stamp-${target_alias}
4a9d5109
SW
411 sed -e 's/\(UNUSED\)/_GLIBCPP_\1/g' \
412 -e 's/\(GCC${uppercase}*_H\)/_GLIBCPP_\1/g' \
413 -e 's/\(${uppercase}*WEAK\)/_GLIBCPP_\1/g' \
79d6ba0b 414 -e 's,^#include "\(.*\)",#include <bits/\1>,g' \
533ab4d1 415 < ${toplevel_srcdir}/gcc/${glibcpp_thread_h} > $@
4a9d5109 416
7bfea936
LR
417# For robustness sake (in light of junk files or in-source
418# configuration), copy from the build or source tree to the install
419# tree using only the human-maintained file lists and directory
420# components. Yes, with minor differences, this is sheer duplication
421# of the staging rules above using $(INSTALL_DATA) instead of LN_S and
3741b1ab 422# `$(mkinstalldirs)' instead of `mkdir -p'. In particular,
7bfea936
LR
423# extra_target_headers are taken out of the build tree staging area;
424# the rest are taken from the original source tree.
4a9d5109 425gxx_include_dir = @gxx_include_dir@
4a9d5109 426install-data-local:
3741b1ab
PE
427 $(mkinstalldirs) ${gxx_include_dir}
428 $(mkinstalldirs) ${gxx_include_dir}/${bits_builddir}
7bfea936
LR
429 for file in ${bits_headers}; do \
430 $(INSTALL_DATA) $${file} ${gxx_include_dir}/${bits_builddir}; done
3741b1ab 431 $(mkinstalldirs) ${gxx_include_dir}/${backward_builddir}
7bfea936
LR
432 for file in ${backward_headers}; do \
433 $(INSTALL_DATA) $${file} ${gxx_include_dir}/${backward_builddir}; done
3741b1ab 434 $(mkinstalldirs) ${gxx_include_dir}/${ext_builddir}
7bfea936
LR
435 for file in ${ext_headers}; do \
436 $(INSTALL_DATA) $${file} ${gxx_include_dir}/${ext_builddir}; done
3741b1ab 437 $(mkinstalldirs) ${gxx_include_dir}/${c_base_builddir}
73249e33
LR
438 for file in ${c_base_headers_rename}; do \
439 $(INSTALL_DATA) ${c_base_builddir}/$${file} \
440 ${gxx_include_dir}/${c_base_builddir}; done
3eb35fcf
BK
441 c_base_headers_extra_install=${c_base_headers_extra};\
442 for file in $$c_base_headers_extra_install; do \
443 $(INSTALL_DATA) $$file ${gxx_include_dir}/${bits_builddir}; done
3741b1ab 444 $(mkinstalldirs) ${gxx_include_dir}/${std_builddir}
73249e33
LR
445 for file in ${std_headers_rename}; do \
446 $(INSTALL_DATA) ${std_builddir}/$${file} \
447 ${gxx_include_dir}/${std_builddir}; done
3741b1ab 448 $(mkinstalldirs) ${gxx_include_dir}/${target_builddir}
3fcfe88d
LR
449 for file in ${target_headers} ${extra_target_headers} \
450 ${thread_target_headers}; do \
7bfea936 451 $(INSTALL_DATA) $${file} ${gxx_include_dir}/${target_builddir}; done
4a9d5109 452
4e10943d 453# By adding these files here, automake will remove them for 'make clean'
843312be 454#CLEANFILES = ${allstamps}
c5535768
BK
455
456# Stop implicit '.o' make rules from ever stomping on extensionless
457# headers, in the improbable case where some foolish, crack-addled
458# developer tries to create them via make in the include build
459# directory. (This is more of an example of how this kind of rule can
460# be made.)
461.PRECIOUS: $(std_headers_rename) $(c_base_headers_rename)
462$(std_headers_rename): ; @:
463$(c_base_headers_rename): ; @: