]> git.ipfire.org Git - thirdparty/gcc.git/blame - libstdc++-v3/include/Makefile.am
re PR c++/775 (2.97 error declaring nested class a friend)
[thirdparty/gcc.git] / libstdc++-v3 / include / Makefile.am
CommitLineData
4a9d5109
SW
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
4a9d5109
SW
24AUTOMAKE_OPTIONS = 1.3 gnits
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 = \
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}/std_algorithm.h \
68 ${bits_srcdir}/std_bitset.h \
69 ${bits_srcdir}/std_complex.h \
70 ${bits_srcdir}/std_deque.h \
71 ${bits_srcdir}/std_fstream.h \
72 ${bits_srcdir}/std_functional.h \
73 ${bits_srcdir}/std_iomanip.h \
74 ${bits_srcdir}/std_ios.h \
75 ${bits_srcdir}/std_iosfwd.h \
76 ${bits_srcdir}/std_iostream.h \
77 ${bits_srcdir}/std_istream.h \
78 ${bits_srcdir}/std_iterator.h \
aa240818 79 ${bits_srcdir}/std_limits.h \
4a9d5109
SW
80 ${bits_srcdir}/std_list.h \
81 ${bits_srcdir}/std_locale.h \
82 ${bits_srcdir}/std_map.h \
83 ${bits_srcdir}/std_memory.h \
84 ${bits_srcdir}/std_numeric.h \
85 ${bits_srcdir}/std_ostream.h \
86 ${bits_srcdir}/std_queue.h \
87 ${bits_srcdir}/std_set.h \
88 ${bits_srcdir}/std_sstream.h \
89 ${bits_srcdir}/std_stack.h \
90 ${bits_srcdir}/std_stdexcept.h \
91 ${bits_srcdir}/std_streambuf.h \
92 ${bits_srcdir}/std_string.h \
93 ${bits_srcdir}/std_utility.h \
94 ${bits_srcdir}/std_valarray.h \
95 ${bits_srcdir}/std_vector.h \
96 ${bits_srcdir}/stl_algo.h \
97 ${bits_srcdir}/stl_algobase.h \
98 ${bits_srcdir}/stl_alloc.h \
99 ${bits_srcdir}/stl_bvector.h \
100 ${bits_srcdir}/stl_construct.h \
101 ${bits_srcdir}/stl_deque.h \
102 ${bits_srcdir}/stl_function.h \
103 ${bits_srcdir}/stl_heap.h \
104 ${bits_srcdir}/stl_iterator.h \
105 ${bits_srcdir}/stl_iterator_base_funcs.h \
106 ${bits_srcdir}/stl_iterator_base_types.h \
107 ${bits_srcdir}/stl_list.h \
108 ${bits_srcdir}/stl_map.h \
109 ${bits_srcdir}/stl_multimap.h \
110 ${bits_srcdir}/stl_multiset.h \
111 ${bits_srcdir}/stl_numeric.h \
112 ${bits_srcdir}/stl_pair.h \
113 ${bits_srcdir}/stl_pthread_alloc.h \
114 ${bits_srcdir}/stl_queue.h \
115 ${bits_srcdir}/stl_raw_storage_iter.h \
116 ${bits_srcdir}/stl_relops.h \
117 ${bits_srcdir}/stl_set.h \
118 ${bits_srcdir}/stl_stack.h \
119 ${bits_srcdir}/stl_tempbuf.h \
120 ${bits_srcdir}/stl_threads.h \
121 ${bits_srcdir}/stl_tree.h \
122 ${bits_srcdir}/stl_uninitialized.h \
123 ${bits_srcdir}/stl_vector.h \
124 ${bits_srcdir}/streambuf.tcc \
125 ${bits_srcdir}/stringfwd.h \
126 ${bits_srcdir}/type_traits.h \
127 ${bits_srcdir}/valarray_array.h \
128 ${bits_srcdir}/valarray_array.tcc \
129 ${bits_srcdir}/valarray_meta.h
130
131backward_srcdir = ${glibcpp_srcdir}/include/backward
132backward_builddir = ./backward
133backward_headers = \
134 ${backward_srcdir}/complex.h \
135 ${backward_srcdir}/iomanip.h \
136 ${backward_srcdir}/istream.h \
137 ${backward_srcdir}/ostream.h \
138 ${backward_srcdir}/stream.h \
139 ${backward_srcdir}/streambuf.h \
140 ${backward_srcdir}/algo.h \
141 ${backward_srcdir}/algobase.h \
142 ${backward_srcdir}/alloc.h \
143 ${backward_srcdir}/bvector.h \
144 ${backward_srcdir}/defalloc.h \
145 ${backward_srcdir}/deque.h \
146 ${backward_srcdir}/function.h \
147 ${backward_srcdir}/hash_map.h \
148 ${backward_srcdir}/hash_set.h \
149 ${backward_srcdir}/hashtable.h \
150 ${backward_srcdir}/heap.h \
151 ${backward_srcdir}/iostream.h \
152 ${backward_srcdir}/iterator.h \
153 ${backward_srcdir}/list.h \
154 ${backward_srcdir}/map.h \
155 ${backward_srcdir}/multimap.h \
156 ${backward_srcdir}/new.h \
157 ${backward_srcdir}/multiset.h \
158 ${backward_srcdir}/pair.h \
159 ${backward_srcdir}/queue.h \
160 ${backward_srcdir}/rope.h \
161 ${backward_srcdir}/set.h \
162 ${backward_srcdir}/slist.h \
163 ${backward_srcdir}/stack.h \
164 ${backward_srcdir}/tempbuf.h \
165 ${backward_srcdir}/tree.h \
166 ${backward_srcdir}/vector.h \
167 ${backward_srcdir}/fstream.h \
168 ${backward_srcdir}/strstream.h \
169 ${backward_srcdir}/strstream \
170 ${backward_srcdir}/backward_warning.h
171
172ext_srcdir = ${glibcpp_srcdir}/include/ext
173ext_builddir = ./ext
174ext_headers = \
2c1bc4eb 175 ${ext_srcdir}/algorithm \
3d90ff93
PE
176 ${ext_srcdir}/hash_map \
177 ${ext_srcdir}/hash_set \
178 ${ext_srcdir}/iterator \
4a9d5109
SW
179 ${ext_srcdir}/rope \
180 ${ext_srcdir}/ropeimpl.h \
4a9d5109 181 ${ext_srcdir}/slist \
3d90ff93 182 ${ext_srcdir}/stl_hash_fun.h \
4a9d5109 183 ${ext_srcdir}/stl_hashtable.h \
3d90ff93 184 ${ext_srcdir}/stl_rope.h
4a9d5109
SW
185
186# This is the common subset of files that all three "C" header models use.
187c_base_srcdir = @C_INCLUDE_DIR@/bits
188c_base_builddir = ./bits
189c_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
4a9d5109
SW
209std_srcdir = ${glibcpp_srcdir}/include/std
210std_builddir = ./
211std_headers = \
212 ${std_srcdir}/algorithm \
213 ${std_srcdir}/bitset \
214 ${std_srcdir}/complex \
215 ${std_srcdir}/deque \
216 ${std_srcdir}/fstream \
217 ${std_srcdir}/functional \
218 ${std_srcdir}/iomanip \
219 ${std_srcdir}/ios \
220 ${std_srcdir}/iosfwd \
221 ${std_srcdir}/iostream \
222 ${std_srcdir}/istream \
223 ${std_srcdir}/iterator \
224 ${std_srcdir}/limits \
225 ${std_srcdir}/list \
226 ${std_srcdir}/locale \
227 ${std_srcdir}/map \
228 ${std_srcdir}/memory \
229 ${std_srcdir}/numeric \
230 ${std_srcdir}/ostream \
231 ${std_srcdir}/queue \
232 ${std_srcdir}/set \
233 ${std_srcdir}/sstream \
234 ${std_srcdir}/stack \
235 ${std_srcdir}/stdexcept \
236 ${std_srcdir}/streambuf \
237 ${std_srcdir}/string \
238 ${std_srcdir}/utility \
239 ${std_srcdir}/valarray \
240 ${std_srcdir}/vector \
241 ${std_srcdir}/cassert \
242 ${std_srcdir}/cctype \
243 ${std_srcdir}/cerrno \
244 ${std_srcdir}/cfloat \
245 ${std_srcdir}/climits \
246 ${std_srcdir}/clocale \
247 ${std_srcdir}/ciso646 \
248 ${std_srcdir}/cmath \
249 ${std_srcdir}/csetjmp \
250 ${std_srcdir}/csignal \
251 ${std_srcdir}/cstdarg \
252 ${std_srcdir}/cstddef \
253 ${std_srcdir}/cstdio \
254 ${std_srcdir}/cstdlib \
255 ${std_srcdir}/cstring \
256 ${std_srcdir}/ctime \
257 ${std_srcdir}/cwchar \
258 ${std_srcdir}/cwctype
259
260target_srcdir = ${glibcpp_srcdir}/@OS_INC_SRCDIR@
261target_builddir = ./${target_alias}/bits
262target_headers = \
263 ${target_srcdir}/ctype_base.h \
264 ${target_srcdir}/ctype_inline.h \
265 ${target_srcdir}/ctype_noninline.h \
266 ${target_srcdir}/os_defines.h \
9f3c078e 267 ${glibcpp_srcdir}/@ATOMICITY_INC_SRCDIR@/atomicity.h \
f295ecef 268 ${glibcpp_srcdir}/@CPU_LIMITS_INC_SRCDIR@/cpu_limits.h
4a9d5109
SW
269
270thread_builddir = ./${target_alias}/bits
271thread_headers = \
272 ${thread_builddir}/gthr.h \
273 ${thread_builddir}/gthr-single.h \
274 ${thread_builddir}/gthr-default.h
275
276# List of all timestamp files. By keeping only one copy of this list, both
277# CLEANFILES and all-local are kept up-to-date.
4a9d5109 278allstamps = stamp-std stamp-bits stamp-c_base stamp-backward stamp-ext \
843312be 279 stamp-target stamp-thread
4a9d5109 280
4a9d5109
SW
281
282# Here are the rules for building the headers
4e10943d 283all-local: ${target_builddir}/c++config.h ${allstamps}
4a9d5109
SW
284
285stamp-std: ${std_headers}
286 @if [ ! -d "${std_builddir}" ]; then \
287 mkdir -p ${std_builddir} ;\
288 fi ;\
289 (cd ${std_builddir} && @LN_S@ $? .) ;\
843312be 290 echo `date` > stamp-std
4a9d5109
SW
291
292stamp-bits: ${bits_headers}
293 @if [ ! -d "${bits_builddir}" ]; then \
294 mkdir -p ${bits_builddir} ;\
295 fi ;\
296 (cd ${bits_builddir} && @LN_S@ $? .) ;\
297 echo `date` > stamp-bits
298
299stamp-c_base: ${c_base_headers}
300 @if [ ! -d "${c_base_builddir}" ]; then \
301 mkdir -p ${c_base_builddir} ;\
302 fi ;\
303 (cd ${c_base_builddir} && @LN_S@ $? .) ;\
304 echo `date` > stamp-c_base
305
4a9d5109
SW
306stamp-backward: ${backward_headers}
307 @if [ ! -d "${backward_builddir}" ]; then \
308 mkdir -p ${backward_builddir} ;\
309 fi ;\
310 (cd ${backward_builddir} && @LN_S@ $? .) ;\
311 echo `date` > stamp-backward
312
313stamp-ext: ${ext_headers}
314 @if [ ! -d "${ext_builddir}" ]; then \
315 mkdir -p ${ext_builddir} ;\
316 fi ;\
317 (cd ${ext_builddir} && @LN_S@ $? .) ;\
318 echo `date` > stamp-ext
319
4e10943d 320# This target is special. The timestamp on a directory gets modified
4a9d5109
SW
321# whenever a file it contains gets modified, and that'll throw off all the
322# build dependencies that need this target. On the other hand, someone
843312be 323# could delete the directory and not the stamp file, faking out make.
4a9d5109 324${target_builddir}: stamp-${target_alias}
4a9d5109
SW
325stamp-${target_alias}:
326 @if [ ! -d ${target_builddir} ]; then \
327 mkdir -p ${target_builddir} ;\
843312be
BK
328 echo `date` > stamp-${target_alias} ;\
329 fi
330
331# Target includes static.
332stamp-target: ${target_headers} ${target_builddir}
333 @cd ${target_builddir} ;\
334 if [ ! -f stamp-target ]; then \
89c06d50 335 @LN_S@ ${target_headers} . ;\
843312be
BK
336 @LN_S@ ${glibcpp_srcdir}/@BASIC_FILE_H@ basic_file_model.h ;\
337 @LN_S@ ${glibcpp_srcdir}/@CSTDIO_H@ c++io.h ;\
338 @LN_S@ ${glibcpp_srcdir}/@CLOCALE_H@ c++locale.h ;\
339 @LN_S@ ${glibcpp_srcdir}/@CMESSAGES_H@ messages_members.h ;\
340 @LN_S@ ${glibcpp_srcdir}/@CCODECVT_H@ codecvt_specializations.h ;\
341 echo `date` > stamp-target; \
4a9d5109 342 fi
4a9d5109 343
843312be 344# Target includes dynamic.
ff144428 345${target_builddir}/c++config.h: ../config.h \
4a9d5109
SW
346 ${glibcpp_srcdir}/include/bits/c++config \
347 ${target_builddir}
348 @cat ${glibcpp_srcdir}/include/bits/c++config > $@ ;\
349 sed -e 's/HAVE_/_GLIBCPP_HAVE_/g' \
350 -e 's/PACKAGE/_GLIBCPP_PACKAGE/g' \
351 -e 's/VERSION/_GLIBCPP_VERSION/g' \
352 -e 's/WORDS_/_GLIBCPP_WORDS_/g' \
353 < ${glibcpp_builddir}/config.h >> $@ ;\
354 echo "#endif // _CPP_CPPCONFIG_" >>$@
355
843312be 356# Target includes for threads
4a9d5109
SW
357glibcpp_thread_h = @glibcpp_thread_h@
358uppercase = [ABCDEFGHIJKLMNOPQRSTUVWXYZ_]
359
843312be
BK
360stamp-thread: ${thread_headers} ${thread_builddir}
361 @echo `date` > stamp-thread
362
363
4a9d5109
SW
364${thread_builddir}/gthr.h:
365 sed -e '/^#/s/\(${uppercase}${uppercase}*\)/_GLIBCPP_\1/g' \
366 -e 's,^#include "\(.*\)",#include <bits/\1>,g' \
533ab4d1 367 < ${toplevel_srcdir}/gcc/gthr.h > $@
4a9d5109
SW
368
369${thread_builddir}/gthr-single.h:
370 sed -e 's/\(UNUSED\)/_GLIBCPP_\1/g' \
371 -e 's/\(GCC${uppercase}*_H\)/_GLIBCPP_\1/g' \
533ab4d1 372 < ${toplevel_srcdir}/gcc/gthr-single.h > $@
4a9d5109
SW
373
374${thread_builddir}/gthr-default.h:
375 sed -e 's/\(UNUSED\)/_GLIBCPP_\1/g' \
376 -e 's/\(GCC${uppercase}*_H\)/_GLIBCPP_\1/g' \
377 -e 's/\(${uppercase}*WEAK\)/_GLIBCPP_\1/g' \
533ab4d1 378 < ${toplevel_srcdir}/gcc/${glibcpp_thread_h} > $@
4a9d5109
SW
379
380# One big happy istallation: just copy everything from the build to the
381# install tree (except for the build stamps).
382gxx_include_dir = @gxx_include_dir@
4a9d5109 383install-data-local:
33590f13 384 for file in `find . ! -name stamp-\* ! -name Makefile -print`; do \
4a9d5109
SW
385 installFile=${gxx_include_dir}/$${file} ;\
386 if [ -d $${file} ]; then \
387 $(INSTALL) -d $${installFile} ;\
388 else \
389 $(INSTALL_DATA) $${file} $${installFile} ;\
390 fi ;\
391 done
392
4e10943d 393# By adding these files here, automake will remove them for 'make clean'
843312be 394#CLEANFILES = ${allstamps}