]>
Commit | Line | Data |
---|---|---|
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 | ||
4a9d5109 SW |
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 \ | |
4a9d5109 SW |
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 = \ | |
2c1bc4eb | 146 | ${ext_srcdir}/algorithm \ |
01b0d4b8 | 147 | ${ext_srcdir}/functional \ |
3d90ff93 PE |
148 | ${ext_srcdir}/hash_map \ |
149 | ${ext_srcdir}/hash_set \ | |
150 | ${ext_srcdir}/iterator \ | |
f53d0ff1 | 151 | ${ext_srcdir}/memory \ |
01b0d4b8 | 152 | ${ext_srcdir}/numeric \ |
3b007b5d | 153 | ${ext_srcdir}/rb_tree \ |
4a9d5109 SW |
154 | ${ext_srcdir}/rope \ |
155 | ${ext_srcdir}/ropeimpl.h \ | |
4a9d5109 | 156 | ${ext_srcdir}/slist \ |
3d90ff93 | 157 | ${ext_srcdir}/stl_hash_fun.h \ |
4a9d5109 | 158 | ${ext_srcdir}/stl_hashtable.h \ |
3d90ff93 | 159 | ${ext_srcdir}/stl_rope.h |
4a9d5109 SW |
160 | |
161 | # This is the common subset of files that all three "C" header models use. | |
30c1fa76 | 162 | c_base_srcdir = @C_INCLUDE_DIR@ |
54c1bf78 | 163 | c_base_builddir = ./ |
4a9d5109 | 164 | c_base_headers = \ |
54c1bf78 BK |
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 \ | |
4a9d5109 SW |
183 | ${c_base_srcdir}/cmath.tcc |
184 | ||
4a9d5109 SW |
185 | std_srcdir = ${glibcpp_srcdir}/include/std |
186 | std_builddir = ./ | |
187 | std_headers = \ | |
066930bb PE |
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 | |
4a9d5109 SW |
217 | |
218 | target_srcdir = ${glibcpp_srcdir}/@OS_INC_SRCDIR@ | |
219 | target_builddir = ./${target_alias}/bits | |
220 | target_headers = \ | |
221 | ${target_srcdir}/ctype_base.h \ | |
222 | ${target_srcdir}/ctype_inline.h \ | |
223 | ${target_srcdir}/ctype_noninline.h \ | |
224 | ${target_srcdir}/os_defines.h \ | |
9f3c078e | 225 | ${glibcpp_srcdir}/@ATOMICITY_INC_SRCDIR@/atomicity.h \ |
f295ecef | 226 | ${glibcpp_srcdir}/@CPU_LIMITS_INC_SRCDIR@/cpu_limits.h |
7bfea936 LR |
227 | # These extra_target_headers files are all built with ad hoc naming rules. |
228 | extra_target_headers = \ | |
229 | ${target_builddir}/basic_file_model.h \ | |
230 | ${target_builddir}/c++config.h \ | |
231 | ${target_builddir}/c++io.h \ | |
232 | ${target_builddir}/c++locale.h \ | |
233 | ${target_builddir}/messages_members.h \ | |
234 | ${target_builddir}/codecvt_specializations.h | |
4a9d5109 SW |
235 | |
236 | thread_builddir = ./${target_alias}/bits | |
237 | thread_headers = \ | |
238 | ${thread_builddir}/gthr.h \ | |
239 | ${thread_builddir}/gthr-single.h \ | |
240 | ${thread_builddir}/gthr-default.h | |
241 | ||
242 | # List of all timestamp files. By keeping only one copy of this list, both | |
243 | # CLEANFILES and all-local are kept up-to-date. | |
4a9d5109 | 244 | allstamps = stamp-std stamp-bits stamp-c_base stamp-backward stamp-ext \ |
843312be | 245 | stamp-target stamp-thread |
4a9d5109 | 246 | |
4a9d5109 SW |
247 | |
248 | # Here are the rules for building the headers | |
4e10943d | 249 | all-local: ${target_builddir}/c++config.h ${allstamps} |
4a9d5109 | 250 | |
066930bb PE |
251 | # This rule is slightly different, in that we must change the name of the |
252 | # local file from std_foo.h to foo. | |
4a9d5109 SW |
253 | stamp-std: ${std_headers} |
254 | @if [ ! -d "${std_builddir}" ]; then \ | |
255 | mkdir -p ${std_builddir} ;\ | |
256 | fi ;\ | |
066930bb PE |
257 | (cd ${std_builddir} && for h in $?; do \ |
258 | official_name=`echo $$h | sed -e 's,.*/std_,,' -e 's,\.h$$,,'` ;\ | |
259 | @LN_S@ $$h ./$${official_name || true} ;\ | |
260 | done) ;\ | |
843312be | 261 | echo `date` > stamp-std |
4a9d5109 SW |
262 | |
263 | stamp-bits: ${bits_headers} | |
264 | @if [ ! -d "${bits_builddir}" ]; then \ | |
265 | mkdir -p ${bits_builddir} ;\ | |
266 | fi ;\ | |
7bfea936 | 267 | (cd ${bits_builddir} && @LN_S@ $? . || true) ;\ |
4a9d5109 SW |
268 | echo `date` > stamp-bits |
269 | ||
270 | stamp-c_base: ${c_base_headers} | |
271 | @if [ ! -d "${c_base_builddir}" ]; then \ | |
272 | mkdir -p ${c_base_builddir} ;\ | |
273 | fi ;\ | |
7bfea936 | 274 | (cd ${c_base_builddir} && @LN_S@ $? . || true) ;\ |
4a9d5109 SW |
275 | echo `date` > stamp-c_base |
276 | ||
4a9d5109 SW |
277 | stamp-backward: ${backward_headers} |
278 | @if [ ! -d "${backward_builddir}" ]; then \ | |
279 | mkdir -p ${backward_builddir} ;\ | |
280 | fi ;\ | |
7bfea936 | 281 | (cd ${backward_builddir} && @LN_S@ $? . || true) ;\ |
4a9d5109 SW |
282 | echo `date` > stamp-backward |
283 | ||
284 | stamp-ext: ${ext_headers} | |
285 | @if [ ! -d "${ext_builddir}" ]; then \ | |
286 | mkdir -p ${ext_builddir} ;\ | |
287 | fi ;\ | |
7bfea936 | 288 | (cd ${ext_builddir} && @LN_S@ $? . || true) ;\ |
4a9d5109 SW |
289 | echo `date` > stamp-ext |
290 | ||
4e10943d | 291 | # This target is special. The timestamp on a directory gets modified |
4a9d5109 SW |
292 | # whenever a file it contains gets modified, and that'll throw off all the |
293 | # build dependencies that need this target. On the other hand, someone | |
843312be | 294 | # could delete the directory and not the stamp file, faking out make. |
4a9d5109 | 295 | ${target_builddir}: stamp-${target_alias} |
4a9d5109 SW |
296 | stamp-${target_alias}: |
297 | @if [ ! -d ${target_builddir} ]; then \ | |
298 | mkdir -p ${target_builddir} ;\ | |
843312be BK |
299 | echo `date` > stamp-${target_alias} ;\ |
300 | fi | |
301 | ||
302 | # Target includes static. | |
303 | stamp-target: ${target_headers} ${target_builddir} | |
304 | @cd ${target_builddir} ;\ | |
305 | if [ ! -f stamp-target ]; then \ | |
7bfea936 LR |
306 | @LN_S@ ${target_headers} . || true ;\ |
307 | @LN_S@ ${glibcpp_srcdir}/@BASIC_FILE_H@ basic_file_model.h || true ;\ | |
308 | @LN_S@ ${glibcpp_srcdir}/@CSTDIO_H@ c++io.h || true ;\ | |
309 | @LN_S@ ${glibcpp_srcdir}/@CLOCALE_H@ c++locale.h || true ;\ | |
310 | @LN_S@ ${glibcpp_srcdir}/@CMESSAGES_H@ messages_members.h || true ;\ | |
311 | @LN_S@ ${glibcpp_srcdir}/@CCODECVT_H@ codecvt_specializations.h || true ;\ | |
843312be | 312 | echo `date` > stamp-target; \ |
4a9d5109 | 313 | fi |
4a9d5109 | 314 | |
843312be | 315 | # Target includes dynamic. |
ff144428 | 316 | ${target_builddir}/c++config.h: ../config.h \ |
4a9d5109 SW |
317 | ${glibcpp_srcdir}/include/bits/c++config \ |
318 | ${target_builddir} | |
319 | @cat ${glibcpp_srcdir}/include/bits/c++config > $@ ;\ | |
320 | sed -e 's/HAVE_/_GLIBCPP_HAVE_/g' \ | |
321 | -e 's/PACKAGE/_GLIBCPP_PACKAGE/g' \ | |
322 | -e 's/VERSION/_GLIBCPP_VERSION/g' \ | |
323 | -e 's/WORDS_/_GLIBCPP_WORDS_/g' \ | |
324 | < ${glibcpp_builddir}/config.h >> $@ ;\ | |
325 | echo "#endif // _CPP_CPPCONFIG_" >>$@ | |
326 | ||
843312be | 327 | # Target includes for threads |
4a9d5109 SW |
328 | glibcpp_thread_h = @glibcpp_thread_h@ |
329 | uppercase = [ABCDEFGHIJKLMNOPQRSTUVWXYZ_] | |
330 | ||
843312be BK |
331 | stamp-thread: ${thread_headers} ${thread_builddir} |
332 | @echo `date` > stamp-thread | |
333 | ||
334 | ||
4a9d5109 SW |
335 | ${thread_builddir}/gthr.h: |
336 | sed -e '/^#/s/\(${uppercase}${uppercase}*\)/_GLIBCPP_\1/g' \ | |
337 | -e 's,^#include "\(.*\)",#include <bits/\1>,g' \ | |
533ab4d1 | 338 | < ${toplevel_srcdir}/gcc/gthr.h > $@ |
4a9d5109 SW |
339 | |
340 | ${thread_builddir}/gthr-single.h: | |
341 | sed -e 's/\(UNUSED\)/_GLIBCPP_\1/g' \ | |
342 | -e 's/\(GCC${uppercase}*_H\)/_GLIBCPP_\1/g' \ | |
533ab4d1 | 343 | < ${toplevel_srcdir}/gcc/gthr-single.h > $@ |
4a9d5109 SW |
344 | |
345 | ${thread_builddir}/gthr-default.h: | |
346 | sed -e 's/\(UNUSED\)/_GLIBCPP_\1/g' \ | |
347 | -e 's/\(GCC${uppercase}*_H\)/_GLIBCPP_\1/g' \ | |
348 | -e 's/\(${uppercase}*WEAK\)/_GLIBCPP_\1/g' \ | |
533ab4d1 | 349 | < ${toplevel_srcdir}/gcc/${glibcpp_thread_h} > $@ |
4a9d5109 | 350 | |
7bfea936 LR |
351 | # For robustness sake (in light of junk files or in-source |
352 | # configuration), copy from the build or source tree to the install | |
353 | # tree using only the human-maintained file lists and directory | |
354 | # components. Yes, with minor differences, this is sheer duplication | |
355 | # of the staging rules above using $(INSTALL_DATA) instead of LN_S and | |
356 | # `$(INSTALL) -d' instead of `mkdir -p'. In particular, | |
357 | # extra_target_headers are taken out of the build tree staging area; | |
358 | # the rest are taken from the original source tree. | |
4a9d5109 | 359 | gxx_include_dir = @gxx_include_dir@ |
4a9d5109 | 360 | install-data-local: |
7bfea936 LR |
361 | $(INSTALL) -d ${gxx_include_dir} |
362 | $(INSTALL) -d ${gxx_include_dir}/${bits_builddir} | |
363 | for file in ${bits_headers}; do \ | |
364 | $(INSTALL_DATA) $${file} ${gxx_include_dir}/${bits_builddir}; done | |
365 | $(INSTALL) -d ${gxx_include_dir}/${backward_builddir} | |
366 | for file in ${backward_headers}; do \ | |
367 | $(INSTALL_DATA) $${file} ${gxx_include_dir}/${backward_builddir}; done | |
368 | $(INSTALL) -d ${gxx_include_dir}/${ext_builddir} | |
369 | for file in ${ext_headers}; do \ | |
370 | $(INSTALL_DATA) $${file} ${gxx_include_dir}/${ext_builddir}; done | |
371 | $(INSTALL) -d ${gxx_include_dir}/${c_base_builddir} | |
372 | for file in ${c_base_headers}; do \ | |
373 | $(INSTALL_DATA) $${file} ${gxx_include_dir}/${c_base_builddir}; done | |
374 | $(INSTALL) -d ${gxx_include_dir}/${std_builddir} | |
375 | for file in ${std_headers}; do \ | |
376 | $(INSTALL_DATA) $${file} ${gxx_include_dir}/${std_builddir}; done | |
377 | $(INSTALL) -d ${gxx_include_dir}/${target_builddir} | |
378 | for file in ${target_headers} ${extra_target_headers}; do \ | |
379 | $(INSTALL_DATA) $${file} ${gxx_include_dir}/${target_builddir}; done | |
380 | $(INSTALL) -d ${gxx_include_dir}/${thread_builddir} | |
381 | for file in ${thread_headers}; do \ | |
382 | $(INSTALL_DATA) $${file} ${gxx_include_dir}/${thread_builddir}; done | |
4a9d5109 | 383 | |
4e10943d | 384 | # By adding these files here, automake will remove them for 'make clean' |
843312be | 385 | #CLEANFILES = ${allstamps} |