Commit | Line | Data |
---|---|---|
eb02fd64 | 1 | # |
131a3881 | 2 | # Makefile for directory with subdirs to build. |
2e482734 | 3 | # Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 1997 Free Software Foundation |
eb02fd64 | 4 | # |
4dfe09da RP |
5 | # This file is free software; you can redistribute it and/or modify |
6 | # it under the terms of the GNU General Public License as published by | |
7 | # the Free Software Foundation; either version 2 of the License, or | |
8 | # (at your option) any later version. | |
9 | # | |
10 | # This program is distributed in the hope that it will be useful, | |
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | # GNU General Public License for more details. | |
14 | # | |
15 | # You should have received a copy of the GNU General Public License | |
16 | # along with this program; if not, write to the Free Software | |
8c222f6e | 17 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
4dfe09da | 18 | # |
f149eb99 | 19 | |
eb02fd64 | 20 | srcdir = . |
28f3b094 | 21 | |
4d714963 | 22 | prefix = /usr/local |
7fcfdcf7 | 23 | exec_prefix = $(prefix) |
2ec9f3fd KS |
24 | |
25 | bindir=${exec_prefix}/bin | |
26 | sbindir=${exec_prefix}/sbin | |
27 | libexecdir=${exec_prefix}/libexec | |
28 | datadir=${prefix}/share | |
29 | sysconfdir=${prefix}/etc | |
30 | sharedstatedir=${prefix}/com | |
31 | localstatedir=${prefix}/var | |
32 | libdir=${exec_prefix}/lib | |
33 | includedir=${prefix}/include | |
34 | oldincludedir=/usr/include | |
35 | infodir=${prefix}/info | |
36 | mandir=${prefix}/man | |
37 | ||
a54e05f6 | 38 | tooldir = $(exec_prefix)/$(target) |
7fcfdcf7 | 39 | |
51489233 ILT |
40 | program_transform_name = |
41 | ||
4d714963 RP |
42 | man1dir = $(mandir)/man1 |
43 | man2dir = $(mandir)/man2 | |
44 | man3dir = $(mandir)/man3 | |
45 | man4dir = $(mandir)/man4 | |
46 | man5dir = $(mandir)/man5 | |
47 | man6dir = $(mandir)/man6 | |
48 | man7dir = $(mandir)/man7 | |
49 | man8dir = $(mandir)/man8 | |
50 | man9dir = $(mandir)/man9 | |
04103845 | 51 | GDB_NLM_DEPS = |
4d714963 RP |
52 | |
53 | SHELL = /bin/sh | |
54 | ||
8270cd76 ILT |
55 | # INSTALL_PROGRAM_ARGS is changed by configure.in to use -x for a |
56 | # cygwin32 host. | |
57 | INSTALL_PROGRAM_ARGS = | |
58 | ||
64434418 | 59 | INSTALL = $(SHELL) $$s/install-sh -c |
8270cd76 ILT |
60 | INSTALL_PROGRAM = $(INSTALL) $(INSTALL_PROGRAM_ARGS) |
61 | INSTALL_SCRIPT = $(INSTALL) | |
5cc73086 | 62 | INSTALL_DATA = $(INSTALL) -m 644 |
3c8735af | 63 | |
09985c96 | 64 | INSTALL_DOSREL = install-dosrel-fake |
a987271c | 65 | |
440868a0 | 66 | AS = as |
ec342d7d | 67 | AR = ar |
b5329d84 | 68 | AR_FLAGS = rc |
e85e07cb | 69 | CC = cc |
7b636683 | 70 | |
66957ce4 ILT |
71 | # Special variables passed down in EXTRA_GCC_FLAGS. They are defined |
72 | # here so that they can be overridden by Makefile fragments. | |
753d5049 SC |
73 | HOST_CC = $(CC_FOR_BUILD) |
74 | HOST_PREFIX = | |
75 | HOST_PREFIX_1 = loser- | |
76 | ||
572728c6 | 77 | # These flag values are normally overridden by the configure script. |
f8a6ad66 | 78 | CFLAGS = -g |
572728c6 ILT |
79 | CXXFLAGS = -g -O2 |
80 | ||
3585593d BK |
81 | LIBCFLAGS = $(CFLAGS) |
82 | CFLAGS_FOR_TARGET = $(CFLAGS) | |
276c2d7d | 83 | LDFLAGS_FOR_TARGET = |
3585593d | 84 | LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET) |
04103845 DE |
85 | PICFLAG = |
86 | PICFLAG_FOR_TARGET = | |
7b636683 | 87 | |
a4e879a1 | 88 | # start-sanitize-chill |
7d9f0c54 MW |
89 | CHILLFLAGS = $(CFLAGS) |
90 | CHILL_LIB = -lchill | |
a4e879a1 | 91 | # end-sanitize-chill |
2cf00a36 | 92 | CXX = c++ |
7b636683 | 93 | |
1d5fcc66 | 94 | # Use -O2 to stress test the compiler. |
864a5888 | 95 | LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates |
3585593d | 96 | CXXFLAGS_FOR_TARGET = $(CXXFLAGS) |
2f64ef77 | 97 | LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates |
7b636683 | 98 | |
4d714963 | 99 | RANLIB = ranlib |
b6ae0f10 ILT |
100 | |
101 | DLLTOOL = dlltool | |
d29cd970 | 102 | WINDRES = windres |
b6ae0f10 | 103 | |
51489233 | 104 | NM = nm |
64434418 ILT |
105 | |
106 | LD = ld | |
107 | ||
5cc73086 KR |
108 | # Not plain GZIP, since gzip looks there for extra command-line options. |
109 | GZIPPROG = gzip | |
eb02fd64 | 110 | |
aaefc574 JM |
111 | # These values are substituted by configure. |
112 | DEFAULT_YACC = yacc | |
113 | DEFAULT_LEX = lex | |
114 | ||
3a671555 | 115 | BISON = `if [ -f $$r/bison/bison ] ; then \ |
97036944 | 116 | echo $$r/bison/bison -L $$s/bison/ ; \ |
3a671555 JM |
117 | else \ |
118 | echo bison ; \ | |
119 | fi` | |
120 | ||
121 | YACC = `if [ -f $$r/bison/bison ] ; then \ | |
97036944 | 122 | echo $$r/bison/bison -y -L $$s/bison/ ; \ |
3a671555 JM |
123 | elif [ -f $$r/byacc/byacc ] ; then \ |
124 | echo $$r/byacc/byacc ; \ | |
125 | else \ | |
126 | echo ${DEFAULT_YACC} ; \ | |
06a07944 | 127 | fi` |
2645fb0c | 128 | |
5cc73086 KR |
129 | LEX = `if [ -f $$r/flex/flex ] ; \ |
130 | then echo $$r/flex/flex ; \ | |
aaefc574 | 131 | else echo ${DEFAULT_LEX} ; fi` |
2198e4ba | 132 | |
5cc73086 KR |
133 | M4 = `if [ -f $$r/m4/m4 ] ; \ |
134 | then echo $$r/m4/m4 ; \ | |
65e21701 KR |
135 | else echo m4 ; fi` |
136 | ||
97840afa | 137 | MAKEINFO = `if [ -f $$r/texinfo/makeinfo/Makefile ] ; \ |
5cc73086 | 138 | then echo $$r/texinfo/makeinfo/makeinfo ; \ |
77806c3e | 139 | else echo makeinfo ; fi` |
484fa12d | 140 | |
9823504d ILT |
141 | # This just becomes part of the MAKEINFO definition passed down to |
142 | # sub-makes. It lets flags be given on the command line while still | |
143 | # using the makeinfo from the object tree. | |
144 | MAKEINFOFLAGS = | |
b772d75e | 145 | |
5cc73086 KR |
146 | EXPECT = `if [ -f $$r/expect/expect ] ; \ |
147 | then echo $$r/expect/expect ; \ | |
a54e05f6 KR |
148 | else echo expect ; fi` |
149 | ||
81eb5025 ILT |
150 | RUNTEST = `if [ -f $$s/dejagnu/runtest ] ; \ |
151 | then echo $$s/dejagnu/runtest ; \ | |
6a42d184 DZ |
152 | else echo runtest ; fi` |
153 | ||
f980fcfb | 154 | |
e85e07cb | 155 | # compilers to use to create programs which must be run in the build |
440868a0 ILT |
156 | # environment. |
157 | CC_FOR_BUILD = $(CC) | |
e85e07cb | 158 | CXX_FOR_BUILD = $(CXX) |
440868a0 | 159 | |
9f73dd6a | 160 | SUBDIRS = "this is set via configure, don't edit this" |
6a3958b2 RP |
161 | OTHERS = |
162 | ||
ca2ce3b3 ILT |
163 | # This is set by the configure script to the list of directories which |
164 | # should be built using the target tools. | |
664298e6 | 165 | TARGET_CONFIGDIRS = libiberty libgloss newlib libio librx libstdc++ libg++ winsup opcodes cygmon |
ca2ce3b3 | 166 | |
e66eb658 | 167 | # Target libraries are put under this directory: |
d92eef0c JM |
168 | # Changed by configure to $(target_alias) if cross. |
169 | TARGET_SUBDIR = . | |
e66eb658 | 170 | |
ca2ce3b3 ILT |
171 | # This is set by the configure script to the arguments passed to configure. |
172 | CONFIG_ARGUMENTS = | |
173 | ||
b6ae0f10 ILT |
174 | # This is set by configure to REALLY_SET_LIB_PATH if --enable-shared |
175 | # was used. | |
176 | SET_LIB_PATH = | |
177 | ||
178 | # This is the name of the environment variable used for the path to | |
179 | # the libraries. This may be changed by configure.in. | |
180 | RPATH_ENVVAR = LD_LIBRARY_PATH | |
181 | ||
182 | # configure.in sets SET_LIB_PATH to this if --enable-shared was used. | |
183 | REALLY_SET_LIB_PATH = \ | |
184 | $(RPATH_ENVVAR)=$$r/bfd:$$r/opcodes:$$$(RPATH_ENVVAR); \ | |
185 | export $(RPATH_ENVVAR); | |
186 | ||
a0f47eb7 | 187 | ALL = all.normal |
ff290baf | 188 | INSTALL_TARGET = installdirs \ |
43e1bf25 | 189 | install-gcc \ |
f35c6160 DZ |
190 | $(INSTALL_MODULES) \ |
191 | $(INSTALL_TARGET_MODULES) \ | |
192 | $(INSTALL_X11_MODULES) \ | |
09985c96 | 193 | $(INSTALL_DOSREL) |
753d5049 | 194 | |
fb660409 | 195 | |
51489233 | 196 | CC_FOR_TARGET = ` \ |
72ce05e8 | 197 | if [ -f $$r/gcc/xgcc ] ; then \ |
e66eb658 | 198 | if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \ |
d5a8bfde | 199 | if [ -f $$r/$(TARGET_SUBDIR)/winsup/Makefile ] ; then \ |
abc93570 | 200 | echo $$r/gcc/xgcc -B$$r/gcc/ -B$$r/$(TARGET_SUBDIR)/newlib/ -L$$r/$(TARGET_SUBDIR)/winsup -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \ |
d5a8bfde | 201 | else \ |
81eb5025 | 202 | echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \ |
d5a8bfde | 203 | fi; \ |
753d5049 SC |
204 | else \ |
205 | echo $$r/gcc/xgcc -B$$r/gcc/; \ | |
206 | fi; \ | |
51489233 | 207 | else \ |
378fd382 | 208 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ |
51489233 ILT |
209 | echo $(CC); \ |
210 | else \ | |
ea6d5817 | 211 | t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \ |
51489233 ILT |
212 | fi; \ |
213 | fi` | |
214 | ||
72ce05e8 ILT |
215 | # If CC_FOR_TARGET is not overriden on the command line, then this |
216 | # variable is passed down to the gcc Makefile, where it is used to | |
217 | # build libgcc2.a. We define it here so that it can itself be | |
218 | # overridden on the command line. | |
219 | GCC_FOR_TARGET = $$r/gcc/xgcc -B$$r/gcc/ | |
220 | ||
a4e879a1 | 221 | # start-sanitize-chill |
7d9f0c54 | 222 | CHILL_FOR_TARGET = ` \ |
72ce05e8 | 223 | if [ -f $$r/gcc/xgcc ] ; then \ |
04103845 | 224 | echo $$r/gcc/xgcc -B$$r/gcc/ -L$$r/gcc/ch/runtime/; \ |
7d9f0c54 MW |
225 | else \ |
226 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ | |
227 | echo $(CC); \ | |
228 | else \ | |
ea6d5817 | 229 | t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \ |
7d9f0c54 MW |
230 | fi; \ |
231 | fi` | |
34b3298b | 232 | |
a4e879a1 | 233 | # end-sanitize-chill |
7d9f0c54 | 234 | |
d1bea4c7 | 235 | CXX_FOR_TARGET = ` \ |
72ce05e8 | 236 | if [ -f $$r/gcc/xgcc ] ; then \ |
e66eb658 | 237 | if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \ |
d5a8bfde | 238 | if [ -f $$r/$(TARGET_SUBDIR)/winsup/Makefile ] ; then \ |
abc93570 | 239 | echo $$r/gcc/xgcc -B$$r/gcc/ -B$$r/$(TARGET_SUBDIR)/newlib/ -L$$r/winsup -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \ |
d5a8bfde | 240 | else \ |
81eb5025 | 241 | echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \ |
d5a8bfde | 242 | fi; \ |
753d5049 SC |
243 | else \ |
244 | echo $$r/gcc/xgcc -B$$r/gcc/; \ | |
245 | fi; \ | |
fca4f908 | 246 | else \ |
e85e07cb ILT |
247 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ |
248 | echo $(CXX); \ | |
fca4f908 | 249 | else \ |
2cf00a36 | 250 | t='$(program_transform_name)'; echo c++ | sed -e 's/x/x/' $$t; \ |
fca4f908 MW |
251 | fi; \ |
252 | fi` | |
253 | ||
440868a0 | 254 | AS_FOR_TARGET = ` \ |
ef9a68f7 ILT |
255 | if [ -f $$r/gas/as-new ] ; then \ |
256 | echo $$r/gas/as-new ; \ | |
440868a0 | 257 | else \ |
e85e07cb | 258 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ |
440868a0 ILT |
259 | echo $(AS); \ |
260 | else \ | |
ea6d5817 | 261 | t='$(program_transform_name)'; echo as | sed -e 's/x/x/' $$t ; \ |
81246025 | 262 | fi; \ |
440868a0 ILT |
263 | fi` |
264 | ||
054f9ada | 265 | LD_FOR_TARGET = ` \ |
19ebe123 ILT |
266 | if [ -f $$r/ld/ld-new ] ; then \ |
267 | echo $$r/ld/ld-new ; \ | |
054f9ada JM |
268 | else \ |
269 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ | |
270 | echo $(LD); \ | |
271 | else \ | |
272 | t='$(program_transform_name)'; echo ld | sed -e 's/x/x/' $$t ; \ | |
273 | fi; \ | |
274 | fi` | |
275 | ||
a220ba0f SC |
276 | DLLTOOL_FOR_TARGET = ` \ |
277 | if [ -f $$r/binutils/dlltool ] ; then \ | |
278 | echo $$r/binutils/dlltool ; \ | |
279 | else \ | |
280 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ | |
281 | echo $(DLLTOOL); \ | |
282 | else \ | |
283 | t='$(program_transform_name)'; echo dlltool | sed -e 's/x/x/' $$t ; \ | |
284 | fi; \ | |
285 | fi` | |
286 | ||
d29cd970 ILT |
287 | WINDRES_FOR_TARGET = ` \ |
288 | if [ -f $$r/binutils/windres ] ; then \ | |
289 | echo $$r/binutils/windres ; \ | |
290 | else \ | |
291 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ | |
292 | echo $(WINDRES); \ | |
293 | else \ | |
294 | t='$(program_transform_name)'; echo windres | sed -e 's/x/x/' $$t ; \ | |
295 | fi; \ | |
296 | fi` | |
297 | ||
51489233 | 298 | AR_FOR_TARGET = ` \ |
5cc73086 KR |
299 | if [ -f $$r/binutils/ar ] ; then \ |
300 | echo $$r/binutils/ar ; \ | |
51489233 | 301 | else \ |
378fd382 | 302 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ |
51489233 ILT |
303 | echo $(AR); \ |
304 | else \ | |
ea6d5817 | 305 | t='$(program_transform_name)'; echo ar | sed -e 's/x/x/' $$t ; \ |
81246025 | 306 | fi; \ |
51489233 ILT |
307 | fi` |
308 | ||
309 | RANLIB_FOR_TARGET = ` \ | |
5cc73086 KR |
310 | if [ -f $$r/binutils/ranlib ] ; then \ |
311 | echo $$r/binutils/ranlib ; \ | |
51489233 | 312 | else \ |
378fd382 | 313 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ |
51489233 ILT |
314 | echo $(RANLIB); \ |
315 | else \ | |
ea6d5817 | 316 | t='$(program_transform_name)'; echo ranlib | sed -e 's/x/x/' $$t ; \ |
81246025 | 317 | fi; \ |
51489233 ILT |
318 | fi` |
319 | ||
320 | NM_FOR_TARGET = ` \ | |
0e25edca ILT |
321 | if [ -f $$r/binutils/nm-new ] ; then \ |
322 | echo $$r/binutils/nm-new ; \ | |
51489233 | 323 | else \ |
378fd382 | 324 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ |
51489233 ILT |
325 | echo $(NM); \ |
326 | else \ | |
ea6d5817 | 327 | t='$(program_transform_name)'; echo nm | sed -e 's/x/x/' $$t ; \ |
81246025 | 328 | fi; \ |
51489233 ILT |
329 | fi` |
330 | ||
eb02fd64 | 331 | #### host and target specific makefile fragments come in here. |
ec342d7d | 332 | ### |
eb02fd64 | 333 | |
0ef4728f ILT |
334 | # Flags to pass down to all sub-makes. |
335 | # Please keep these in alphabetical order. | |
336 | BASE_FLAGS_TO_PASS = \ | |
2198e4ba | 337 | "AR_FLAGS=$(AR_FLAGS)" \ |
d09de70e | 338 | "AR_FOR_TARGET=$(AR_FOR_TARGET)" \ |
0ef4728f | 339 | "AS_FOR_TARGET=$(AS_FOR_TARGET)" \ |
378fd382 | 340 | "BISON=$(BISON)" \ |
378fd382 | 341 | "CC_FOR_BUILD=$(CC_FOR_BUILD)" \ |
0ef4728f | 342 | "CC_FOR_TARGET=$(CC_FOR_TARGET)" \ |
2198e4ba | 343 | "CFLAGS=$(CFLAGS)" \ |
3585593d | 344 | "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \ |
a4e879a1 | 345 | $(start-sanitize-chill)\ |
7d9f0c54 MW |
346 | "CHILLFLAGS=$(CHILLFLAGS)" \ |
347 | "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \ | |
348 | "CHILL_LIB=$(CHILL_LIB)" \ | |
a4e879a1 | 349 | $(end-sanitize-chill)\ |
0ef4728f ILT |
350 | "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \ |
351 | "CXXFLAGS=$(CXXFLAGS)" \ | |
3585593d | 352 | "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \ |
0ef4728f | 353 | "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \ |
a220ba0f | 354 | "DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \ |
2198e4ba MT |
355 | "INSTALL=$(INSTALL)" \ |
356 | "INSTALL_DATA=$(INSTALL_DATA)" \ | |
440868a0 | 357 | "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ |
8270cd76 | 358 | "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \ |
378fd382 DZ |
359 | "LDFLAGS=$(LDFLAGS)" \ |
360 | "LEX=$(LEX)" \ | |
054f9ada | 361 | "LD_FOR_TARGET=$(LD_FOR_TARGET)" \ |
3585593d BK |
362 | "LIBCFLAGS=$(LIBCFLAGS)" \ |
363 | "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \ | |
04103845 DE |
364 | "LIBCXXFLAGS=$(LIBCXXFLAGS)" \ |
365 | "LIBCXXFLAGS_FOR_TARGET=$(LIBCXXFLAGS_FOR_TARGET)" \ | |
65e21701 | 366 | "M4=$(M4)" \ |
eb40ca93 | 367 | "MAKE=$(MAKE)" \ |
9823504d | 368 | "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \ |
0ef4728f | 369 | "NM_FOR_TARGET=$(NM_FOR_TARGET)" \ |
04103845 DE |
370 | "PICFLAG=$(PICFLAG)" \ |
371 | "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \ | |
d09de70e | 372 | "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \ |
43e1bf25 | 373 | "RPATH_ENVVAR=$(RPATH_ENVVAR)" \ |
49dfa984 | 374 | "SHELL=$(SHELL)" \ |
a54e05f6 | 375 | "EXPECT=$(EXPECT)" \ |
6a42d184 | 376 | "RUNTEST=$(RUNTEST)" \ |
86365152 | 377 | "RUNTESTFLAGS=$(RUNTESTFLAGS)" \ |
d29cd970 | 378 | "WINDRES_FOR_TARGET=$(WINDRES_FOR_TARGET)" \ |
3a671555 | 379 | "YACC=$(YACC)" \ |
2ec9f3fd KS |
380 | "bindir=$(bindir)" \ |
381 | "datadir=$(datadir)" \ | |
378fd382 | 382 | "exec_prefix=$(exec_prefix)" \ |
2ec9f3fd KS |
383 | "includedir=$(includedir)" \ |
384 | "infodir=$(infodir)" \ | |
385 | "libdir=$(libdir)" \ | |
386 | "libexecdir=$(libexecdir)" \ | |
3173839b | 387 | "lispdir=$(lispdir)" \ |
2ec9f3fd KS |
388 | "localstatedir=$(localstatedir)" \ |
389 | "mandir=$(mandir)" \ | |
390 | "oldincludedir=$(oldincludedir)" \ | |
378fd382 | 391 | "prefix=$(prefix)" \ |
2ec9f3fd KS |
392 | "sbindir=$(sbindir)" \ |
393 | "sharedstatedir=$(sharedstatedir)" \ | |
394 | "sysconfdir=$(sysconfdir)" \ | |
395 | "tooldir=$(tooldir)" | |
2198e4ba | 396 | |
0ef4728f ILT |
397 | # Flags to pass down to most sub-makes, in which we're building with |
398 | # the host environment. | |
6d681784 | 399 | # If any variables are added here, they must be added to do-*, below. |
0ef4728f | 400 | EXTRA_HOST_FLAGS = \ |
6d681784 JG |
401 | 'AR=$(AR)' \ |
402 | 'AS=$(AS)' \ | |
403 | 'CC=$(CC)' \ | |
404 | 'CXX=$(CXX)' \ | |
b6ae0f10 | 405 | 'DLLTOOL=$(DLLTOOL)' \ |
64434418 | 406 | 'LD=$(LD)' \ |
6d681784 | 407 | 'NM=$(NM)' \ |
d29cd970 ILT |
408 | 'RANLIB=$(RANLIB)' \ |
409 | 'WINDRES=$(WINDRES)' | |
0ef4728f | 410 | |
97840afa | 411 | FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) |
0ef4728f | 412 | |
d1bea4c7 DZ |
413 | # Flags that are concerned with the location of the X11 include files |
414 | # and library files | |
054f9ada JM |
415 | # |
416 | # NOTE: until the top-level is getting the values via autoconf, it only | |
417 | # causes problems to have this top-level Makefile overriding the autoconf-set | |
418 | # values in child directories. Only variables that don't conflict with | |
419 | # autoconf'ed ones should be passed by X11_FLAGS_TO_PASS for now. | |
420 | # | |
d1bea4c7 | 421 | X11_FLAGS_TO_PASS = \ |
054f9ada JM |
422 | 'X11_EXTRA_CFLAGS=$(X11_EXTRA_CFLAGS)' \ |
423 | 'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)' | |
d1bea4c7 | 424 | |
0ef4728f ILT |
425 | # Flags to pass down to makes which are built with the target environment. |
426 | # The double $ decreases the length of the command line; the variables | |
427 | # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them. | |
6d681784 | 428 | # If any variables are added here, they must be added to do-*, below. |
0ef4728f ILT |
429 | EXTRA_TARGET_FLAGS = \ |
430 | 'AR=$$(AR_FOR_TARGET)' \ | |
431 | 'AS=$$(AS_FOR_TARGET)' \ | |
432 | 'CC=$$(CC_FOR_TARGET)' \ | |
3585593d | 433 | 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \ |
0ef4728f | 434 | 'CXX=$$(CXX_FOR_TARGET)' \ |
3585593d | 435 | 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \ |
a220ba0f | 436 | 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \ |
054f9ada | 437 | 'LD=$$(LD_FOR_TARGET)' \ |
3585593d BK |
438 | 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \ |
439 | 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \ | |
0ef4728f | 440 | 'NM=$$(NM_FOR_TARGET)' \ |
04103845 | 441 | 'PICFLAG=$$(PICFLAG_FOR_TARGET)' \ |
d29cd970 ILT |
442 | 'RANLIB=$$(RANLIB_FOR_TARGET)' \ |
443 | 'WINDRES=$$(WINDRES_FOR_TARGET)' | |
0ef4728f ILT |
444 | |
445 | TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) | |
51489233 | 446 | |
f4e414f1 ILT |
447 | # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it |
448 | # unfortunately needs the native compiler and the target ar and | |
0ef4728f | 449 | # ranlib. |
66957ce4 ILT |
450 | # If any variables are added here, they must be added to do-*, below. |
451 | # The HOST_* variables are a special case, which are used for the gcc | |
452 | # cross-building scheme. | |
0ef4728f ILT |
453 | EXTRA_GCC_FLAGS = \ |
454 | 'AR=$$(AR_FOR_TARGET)' \ | |
6d681784 JG |
455 | 'AS=$(AS)' \ |
456 | 'CC=$(CC)' \ | |
457 | 'CXX=$(CXX)' \ | |
b6ae0f10 | 458 | 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \ |
a54e05f6 KR |
459 | 'HOST_CC=$(CC_FOR_BUILD)' \ |
460 | 'HOST_PREFIX=$(HOST_PREFIX)' \ | |
461 | 'HOST_PREFIX_1=$(HOST_PREFIX_1)' \ | |
6d681784 | 462 | 'NM=$(NM)' \ |
4c0b7ebc | 463 | 'RANLIB=$$(RANLIB_FOR_TARGET)' \ |
d29cd970 | 464 | 'WINDRES=$$(WINDRES_FOR_TARGET)' \ |
97840afa | 465 | "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \ |
1e321274 JM |
466 | "`if test x'$(LANGUAGES)' != x; then echo 'LANGUAGES=$(LANGUAGES)'; else echo 'XFOO=bar'; fi`" \ |
467 | "`if test x'$(STMP_FIXPROTO)' != x; then echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)'; else echo 'XFOO=bar'; fi`" \ | |
468 | "`if test x'$(LIMITS_H_TEST)' != x; then echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)'; else echo 'XFOO=bar'; fi`" \ | |
469 | "`if test x'$(LIBGCC1_TEST)' != x; then echo 'LIBGCC1_TEST=$(LIBGCC1_TEST)'; else echo 'XFOO=bar'; fi`" \ | |
470 | "`if test x'$(LIBGCC2_CFLAGS)' != x; then echo 'LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)'; else echo 'XFOO=bar'; fi`" \ | |
471 | "`if test x'$(LIBGCC2_DEBUG_CFLAGS)' != x; then echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)'; else echo 'XFOO=bar'; fi`" \ | |
472 | "`if test x'$(LIBGCC2_INCLUDES)' != x; then echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)'; else echo 'XFOO=bar'; fi`" \ | |
473 | "`if test x'$(ENQUIRE)' != x; then echo 'ENQUIRE=$(ENQUIRE)'; else echo 'XFOO=bar'; fi`" \ | |
474 | "`if test x'$(BOOT_CFLAGS)' != x; then echo 'BOOT_CFLAGS=$(BOOT_CFLAGS)'; else echo 'XFOO=bar'; fi`" | |
0ef4728f | 475 | |
34b3298b | 476 | GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) |
f4e414f1 | 477 | |
6a42d184 | 478 | # This is a list of the targets for all of the modules which are compiled |
79337c85 ILT |
479 | # using $(FLAGS_TO_PASS). |
480 | ALL_MODULES = \ | |
53c403df | 481 | all-apache \ |
79337c85 | 482 | all-autoconf \ |
08168809 | 483 | all-automake \ |
5db223e4 | 484 | all-bash \ |
79337c85 ILT |
485 | all-bfd \ |
486 | all-binutils \ | |
3a671555 | 487 | all-bison \ |
79337c85 | 488 | all-byacc \ |
97b951fb | 489 | all-cvssrc \ |
97840afa | 490 | all-db \ |
79337c85 ILT |
491 | all-dejagnu \ |
492 | all-diff \ | |
ac259c28 | 493 | all-dosutils \ |
79337c85 ILT |
494 | all-etc \ |
495 | all-fileutils \ | |
97840afa | 496 | all-findutils \ |
79337c85 ILT |
497 | all-find \ |
498 | all-flex \ | |
499 | all-gas \ | |
500 | all-gawk \ | |
ba26181f | 501 | all-gnuserv \ |
79337c85 ILT |
502 | all-gprof \ |
503 | all-grep \ | |
19b1d034 | 504 | all-grez \ |
79337c85 ILT |
505 | all-gzip \ |
506 | all-hello \ | |
3718029f ILT |
507 | $(start-sanitize-ide) \ |
508 | all-ilu \ | |
509 | $(end-sanitize-ide) \ | |
79337c85 | 510 | all-indent \ |
13d7cbe2 | 511 | all-inet \ |
79337c85 | 512 | all-ispell \ |
97840afa | 513 | all-itcl \ |
c070fb34 ILT |
514 | $(start-sanitize-ide) \ |
515 | all-jstools \ | |
516 | $(end-sanitize-ide) \ | |
79337c85 | 517 | all-ld \ |
67ae6381 | 518 | all-libgui \ |
79337c85 | 519 | all-libiberty \ |
43e1bf25 | 520 | $(start-sanitize-ide) \ |
eebe454c | 521 | all-libide \ |
43e1bf25 | 522 | $(end-sanitize-ide) \ |
79337c85 ILT |
523 | all-m4 \ |
524 | all-make \ | |
525 | all-mmalloc \ | |
526 | all-opcodes \ | |
527 | all-patch \ | |
0f8f1d33 | 528 | all-perl \ |
79337c85 ILT |
529 | all-prms \ |
530 | all-rcs \ | |
531 | all-readline \ | |
275049c0 | 532 | all-release \ |
79337c85 ILT |
533 | all-recode \ |
534 | all-sed \ | |
535 | all-send-pr \ | |
536 | all-shellutils \ | |
537 | all-sim \ | |
abc93570 | 538 | all-snavigator \ |
79337c85 ILT |
539 | all-tar \ |
540 | all-tcl \ | |
541 | all-texinfo \ | |
542 | all-textutils \ | |
543 | all-tgas \ | |
544 | all-time \ | |
545 | all-uudecode \ | |
eebe454c TT |
546 | $(start-sanitize-ide) \ |
547 | all-vmake \ | |
548 | $(end-sanitize-ide) \ | |
753d5049 SC |
549 | all-wdiff |
550 | ||
4f0b8f27 TL |
551 | # This is a list of the check targets for all of the modules which are |
552 | # compiled using $(FLAGS_TO_PASS). | |
553 | # | |
d237841c BC |
554 | # The list is in two parts. The first lists those tools which |
555 | # are tested as part of the host's native tool-chain, and not | |
556 | # tested in a cross configuration. | |
557 | NATIVE_CHECK_MODULES = \ | |
3a671555 | 558 | check-bison \ |
d237841c | 559 | check-byacc \ |
4f0b8f27 TL |
560 | check-flex |
561 | ||
d237841c | 562 | CROSS_CHECK_MODULES = \ |
53c403df | 563 | check-apache \ |
6a42d184 | 564 | check-autoconf \ |
08168809 | 565 | check-automake \ |
5db223e4 | 566 | check-bash \ |
6a42d184 DZ |
567 | check-bfd \ |
568 | check-binutils \ | |
97b951fb | 569 | check-cvssrc \ |
97840afa | 570 | check-db \ |
6a42d184 DZ |
571 | check-dejagnu \ |
572 | check-diff \ | |
573 | check-etc \ | |
574 | check-fileutils \ | |
97840afa | 575 | check-findutils \ |
6a42d184 | 576 | check-find \ |
6a42d184 DZ |
577 | check-gas \ |
578 | check-gawk \ | |
ba26181f | 579 | check-gnuserv \ |
6a42d184 DZ |
580 | check-gprof \ |
581 | check-grep \ | |
582 | check-gzip \ | |
583 | check-hello \ | |
3718029f ILT |
584 | $(start-sanitize-ide) \ |
585 | check-ilu \ | |
586 | $(end-sanitize-ide) \ | |
6a42d184 | 587 | check-indent \ |
13d7cbe2 | 588 | check-inet \ |
6a42d184 | 589 | check-ispell \ |
97840afa | 590 | check-itcl \ |
c070fb34 ILT |
591 | $(start-sanitize-ide) \ |
592 | check-jstools \ | |
593 | $(end-sanitize-ide) \ | |
6a42d184 | 594 | check-ld \ |
67ae6381 | 595 | check-libgui \ |
6a42d184 | 596 | check-libiberty \ |
43e1bf25 | 597 | $(start-sanitize-ide) \ |
eebe454c | 598 | check-libide \ |
43e1bf25 | 599 | $(end-sanitize-ide) \ |
6a42d184 DZ |
600 | check-m4 \ |
601 | check-make \ | |
602 | check-mmcheckoc \ | |
603 | check-opcodes \ | |
604 | check-patch \ | |
0f8f1d33 | 605 | check-perl \ |
6a42d184 DZ |
606 | check-prms \ |
607 | check-rcs \ | |
608 | check-readline \ | |
609 | check-recode \ | |
610 | check-sed \ | |
611 | check-send-pr \ | |
612 | check-shellutils \ | |
abc93570 | 613 | check-snavigator \ |
6a42d184 DZ |
614 | check-sim \ |
615 | check-tar \ | |
616 | check-tcl \ | |
617 | check-texinfo \ | |
618 | check-textutils \ | |
619 | check-tgas \ | |
620 | check-time \ | |
621 | check-uudecode \ | |
eebe454c TT |
622 | $(start-sanitize-ide) \ |
623 | check-vmake \ | |
624 | $(end-sanitize-ide) \ | |
6a42d184 | 625 | check-wdiff |
d237841c BC |
626 | |
627 | CHECK_MODULES=$(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES) | |
6a42d184 DZ |
628 | |
629 | # This is a list of the install targets for all of the modules which are | |
79337c85 | 630 | # compiled using $(FLAGS_TO_PASS). |
27349293 ILT |
631 | # We put install-opcodes before install-binutils because the installed |
632 | # binutils might be on PATH, and they might need the shared opcodes | |
633 | # library. | |
abc93570 ILT |
634 | # We put install-tcl before install-itcl because itcl wants to run a |
635 | # program on installation which uses the Tcl libraries. | |
79337c85 | 636 | INSTALL_MODULES = \ |
53c403df | 637 | install-apache \ |
79337c85 | 638 | install-autoconf \ |
08168809 | 639 | install-automake \ |
5db223e4 | 640 | install-bash \ |
79337c85 | 641 | install-bfd \ |
27349293 | 642 | install-opcodes \ |
79337c85 | 643 | install-binutils \ |
3a671555 | 644 | install-bison \ |
79337c85 | 645 | install-byacc \ |
97b951fb | 646 | install-cvssrc \ |
97840afa | 647 | install-db \ |
79337c85 ILT |
648 | install-dejagnu \ |
649 | install-diff \ | |
753d5049 | 650 | install-dosutils \ |
79337c85 ILT |
651 | install-etc \ |
652 | install-fileutils \ | |
97840afa | 653 | install-findutils \ |
79337c85 ILT |
654 | install-find \ |
655 | install-flex \ | |
656 | install-gas \ | |
657 | install-gawk \ | |
ba26181f | 658 | install-gnuserv \ |
79337c85 ILT |
659 | install-gprof \ |
660 | install-grep \ | |
19b1d034 | 661 | install-grez \ |
79337c85 ILT |
662 | install-gzip \ |
663 | install-hello \ | |
3718029f ILT |
664 | $(start-sanitize-ide) \ |
665 | install-ilu \ | |
666 | $(end-sanitize-ide) \ | |
79337c85 | 667 | install-indent \ |
13d7cbe2 | 668 | install-inet \ |
79337c85 | 669 | install-ispell \ |
abc93570 | 670 | install-tcl \ |
97840afa | 671 | install-itcl \ |
c070fb34 ILT |
672 | $(start-sanitize-ide) \ |
673 | install-jstools \ | |
674 | $(end-sanitize-ide) \ | |
79337c85 | 675 | install-ld \ |
67ae6381 | 676 | install-libgui \ |
79337c85 | 677 | install-libiberty \ |
43e1bf25 | 678 | $(start-sanitize-ide) \ |
eebe454c | 679 | install-libide \ |
43e1bf25 | 680 | $(end-sanitize-ide) \ |
79337c85 ILT |
681 | install-m4 \ |
682 | install-make \ | |
683 | install-mmalloc \ | |
79337c85 | 684 | install-patch \ |
0f8f1d33 | 685 | install-perl \ |
79337c85 ILT |
686 | install-prms \ |
687 | install-rcs \ | |
688 | install-readline \ | |
689 | install-recode \ | |
690 | install-sed \ | |
691 | install-send-pr \ | |
692 | install-shellutils \ | |
693 | install-sim \ | |
abc93570 | 694 | install-snavigator \ |
79337c85 | 695 | install-tar \ |
79337c85 ILT |
696 | install-texinfo \ |
697 | install-textutils \ | |
698 | install-tgas \ | |
699 | install-time \ | |
700 | install-uudecode \ | |
eebe454c TT |
701 | $(start-sanitize-ide) \ |
702 | install-vmake \ | |
703 | $(end-sanitize-ide) \ | |
79337c85 ILT |
704 | install-wdiff |
705 | ||
6a42d184 | 706 | # This is a list of the targets for all of the modules which are compiled |
79337c85 ILT |
707 | # using $(X11_FLAGS_TO_PASS). |
708 | ALL_X11_MODULES = \ | |
709 | all-emacs \ | |
4d802af9 | 710 | all-emacs19 \ |
04103845 | 711 | all-gdb \ |
79337c85 | 712 | all-expect \ |
65e21701 | 713 | all-gash \ |
0f8f1d33 | 714 | all-guile \ |
79337c85 | 715 | all-tclX \ |
9239dc26 ILT |
716 | all-tk \ |
717 | all-tix | |
79337c85 | 718 | |
6a42d184 DZ |
719 | # This is a list of the check targets for all of the modules which are |
720 | # compiled using $(X11_FLAGS_TO_PASS). | |
721 | CHECK_X11_MODULES = \ | |
722 | check-emacs \ | |
04103845 | 723 | check-gdb \ |
0f8f1d33 | 724 | check-guile \ |
6a42d184 | 725 | check-expect \ |
65e21701 | 726 | check-gash \ |
9239dc26 ILT |
727 | check-tclX \ |
728 | check-tk \ | |
729 | check-tix | |
6a42d184 | 730 | |
79337c85 ILT |
731 | # This is a list of the install targets for all the modules which are |
732 | # compiled using $(X11_FLAGS_TO_PASS). | |
733 | INSTALL_X11_MODULES = \ | |
734 | install-emacs \ | |
4d802af9 | 735 | install-emacs19 \ |
04103845 | 736 | install-gdb \ |
0f8f1d33 | 737 | install-guile \ |
79337c85 | 738 | install-expect \ |
65e21701 | 739 | install-gash \ |
79337c85 | 740 | install-tclX \ |
9239dc26 ILT |
741 | install-tk \ |
742 | install-tix | |
fca4f908 | 743 | |
6a42d184 | 744 | # This is a list of the targets for all of the modules which are compiled |
79337c85 ILT |
745 | # using $(TARGET_FLAGS_TO_PASS). |
746 | ALL_TARGET_MODULES = \ | |
ab1cbc67 PB |
747 | all-target-libio \ |
748 | all-target-libstdc++ \ | |
749 | all-target-librx \ | |
750 | all-target-libg++ \ | |
751 | all-target-newlib \ | |
752 | all-target-winsup \ | |
753 | all-target-libgloss \ | |
4c0b7ebc | 754 | all-target-libiberty \ |
10be59aa | 755 | all-target-gperf \ |
664298e6 BM |
756 | all-target-examples \ |
757 | all-target-cygmon | |
79337c85 | 758 | |
ca2ce3b3 ILT |
759 | # This is a list of the configure targets for all of the modules which |
760 | # are compiled using the target tools. | |
761 | CONFIGURE_TARGET_MODULES = \ | |
ab1cbc67 PB |
762 | configure-target-libio \ |
763 | configure-target-libstdc++ \ | |
764 | configure-target-librx \ | |
765 | configure-target-libg++ \ | |
766 | configure-target-newlib \ | |
767 | configure-target-winsup \ | |
768 | configure-target-libgloss \ | |
4c0b7ebc | 769 | configure-target-libiberty \ |
10be59aa | 770 | configure-target-gperf \ |
664298e6 BM |
771 | configure-target-examples \ |
772 | configure-target-cygmon | |
ca2ce3b3 | 773 | |
6a42d184 DZ |
774 | # This is a list of the check targets for all of the modules which are |
775 | # compiled using $(TARGET_FLAGS_TO_PASS). | |
776 | CHECK_TARGET_MODULES = \ | |
ab1cbc67 PB |
777 | check-target-libio \ |
778 | check-target-libstdc++ \ | |
779 | check-target-libg++ \ | |
780 | check-target-newlib \ | |
781 | check-target-winsup \ | |
10be59aa BK |
782 | check-target-libiberty \ |
783 | check-target-gperf | |
6a42d184 DZ |
784 | |
785 | # This is a list of the install targets for all of the modules which are | |
79337c85 ILT |
786 | # compiled using $(TARGET_FLAGS_TO_PASS). |
787 | INSTALL_TARGET_MODULES = \ | |
ab1cbc67 PB |
788 | install-target-libio \ |
789 | install-target-libstdc++ \ | |
790 | install-target-libg++ \ | |
791 | install-target-newlib \ | |
792 | install-target-winsup \ | |
793 | install-target-libgloss \ | |
10be59aa BK |
794 | install-target-libiberty \ |
795 | install-target-gperf | |
7481617f | 796 | |
7508666f MM |
797 | # This is a list of the targets for which we can do a clean-{target}. |
798 | CLEAN_MODULES = \ | |
13d7cbe2 | 799 | clean-apache \ |
7508666f | 800 | clean-autoconf \ |
08168809 | 801 | clean-automake \ |
5db223e4 | 802 | clean-bash \ |
7508666f MM |
803 | clean-bfd \ |
804 | clean-binutils \ | |
3a671555 | 805 | clean-bison \ |
7508666f | 806 | clean-byacc \ |
97b951fb | 807 | clean-cvssrc \ |
97840afa | 808 | clean-db \ |
7508666f MM |
809 | clean-dejagnu \ |
810 | clean-diff \ | |
811 | clean-dosutils \ | |
812 | clean-etc \ | |
813 | clean-fileutils \ | |
97840afa | 814 | clean-findutils \ |
7508666f MM |
815 | clean-find \ |
816 | clean-flex \ | |
817 | clean-gas \ | |
818 | clean-gawk \ | |
ba26181f | 819 | clean-gnuserv \ |
7508666f MM |
820 | clean-gprof \ |
821 | clean-grep \ | |
822 | clean-grez \ | |
823 | clean-gzip \ | |
824 | clean-hello \ | |
3718029f ILT |
825 | $(start-sanitize-ide) \ |
826 | clean-ilu \ | |
827 | $(end-sanitize-ide) \ | |
7508666f | 828 | clean-indent \ |
13d7cbe2 | 829 | clean-inet \ |
7508666f | 830 | clean-ispell \ |
97840afa | 831 | clean-itcl \ |
c070fb34 ILT |
832 | $(start-sanitize-ide) \ |
833 | clean-jstools \ | |
834 | $(end-sanitize-ide) \ | |
7508666f | 835 | clean-ld \ |
67ae6381 | 836 | clean-libgui \ |
7508666f | 837 | clean-libiberty \ |
43e1bf25 | 838 | $(start-sanitize-ide) \ |
eebe454c | 839 | clean-libide \ |
43e1bf25 | 840 | $(end-sanitize-ide) \ |
7508666f MM |
841 | clean-m4 \ |
842 | clean-make \ | |
843 | clean-mmalloc \ | |
844 | clean-opcodes \ | |
845 | clean-patch \ | |
846 | clean-perl \ | |
847 | clean-prms \ | |
848 | clean-rcs \ | |
849 | clean-readline \ | |
850 | clean-release \ | |
851 | clean-recode \ | |
852 | clean-sed \ | |
853 | clean-send-pr \ | |
854 | clean-shellutils \ | |
855 | clean-sim \ | |
abc93570 | 856 | clean-snavigator \ |
7508666f MM |
857 | clean-tar \ |
858 | clean-tcl \ | |
859 | clean-texinfo \ | |
860 | clean-textutils \ | |
861 | clean-tgas \ | |
862 | clean-time \ | |
863 | clean-uudecode \ | |
eebe454c TT |
864 | $(start-sanitize-ide) \ |
865 | clean-vmake \ | |
866 | $(end-sanitize-ide) \ | |
7508666f MM |
867 | clean-wdiff |
868 | ||
869 | # All of the target modules that can be cleaned | |
870 | CLEAN_TARGET_MODULES = \ | |
871 | clean-target-libio \ | |
872 | clean-target-libstdc++ \ | |
873 | clean-target-librx \ | |
874 | clean-target-libg++ \ | |
875 | clean-target-newlib \ | |
876 | clean-target-winsup \ | |
877 | clean-target-libgloss \ | |
878 | clean-target-libiberty \ | |
10be59aa | 879 | clean-target-gperf \ |
664298e6 BM |
880 | clean-target-examples \ |
881 | clean-target-cygmon | |
7508666f MM |
882 | |
883 | # All of the x11 modules that can be cleaned | |
884 | CLEAN_X11_MODULES = \ | |
885 | clean-emacs \ | |
886 | clean-emacs19 \ | |
887 | clean-gdb \ | |
888 | clean-expect \ | |
889 | clean-gash \ | |
890 | clean-guile \ | |
891 | clean-tclX \ | |
9239dc26 ILT |
892 | clean-tk \ |
893 | clean-tix | |
7508666f | 894 | |
79337c85 | 895 | # The first rule in the file had better be this one. Don't put any above it. |
a59b94d2 | 896 | all: all.normal |
79337c85 ILT |
897 | .PHONY: all |
898 | ||
899 | # The target built for a native build. | |
900 | .PHONY: all.normal | |
901 | all.normal: \ | |
902 | $(ALL_MODULES) \ | |
46d0ca81 | 903 | $(ALL_X11_MODULES) \ |
2e482734 | 904 | $(ALL_TARGET_MODULES) \ |
79337c85 ILT |
905 | all-gcc |
906 | ||
0ef4728f | 907 | # Do a target for all the subdirectories. A ``make do-X'' will do a |
53222cbd RP |
908 | # ``make X'' in all subdirectories (because, in general, there is a |
909 | # dependency (below) of X upon do-X, a ``make X'' will also do this, | |
910 | # but it may do additional work as well). | |
0ef4728f ILT |
911 | # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once, |
912 | # because it is so large that it can easily overflow the command line | |
913 | # length limit on some systems. | |
79337c85 | 914 | DO_X = \ |
79337c85 ILT |
915 | do-clean \ |
916 | do-distclean \ | |
917 | do-dvi \ | |
918 | do-info \ | |
919 | do-install-info \ | |
920 | do-installcheck \ | |
921 | do-mostlyclean \ | |
ca2ce3b3 | 922 | do-maintainer-clean \ |
753d5049 | 923 | do-TAGS |
79337c85 ILT |
924 | .PHONY: $(DO_X) |
925 | $(DO_X): | |
0ef4728f | 926 | @target=`echo $@ | sed -e 's/^do-//'`; \ |
5cc73086 | 927 | r=`pwd`; export r; \ |
81eb5025 | 928 | s=`cd $(srcdir); pwd`; export s; \ |
b6ae0f10 | 929 | $(SET_LIB_PATH) \ |
ab1cbc67 | 930 | for i in $(SUBDIRS) -dummy-; do \ |
36286a3e | 931 | if [ -f ./$$i/Makefile ]; then \ |
0ef4728f | 932 | case $$i in \ |
0ef4728f | 933 | gcc) \ |
6d681784 | 934 | for flag in $(EXTRA_GCC_FLAGS); do \ |
0f8f1d33 | 935 | eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \ |
6d681784 | 936 | done; \ |
0ef4728f ILT |
937 | ;; \ |
938 | *) \ | |
6d681784 | 939 | for flag in $(EXTRA_HOST_FLAGS); do \ |
0f8f1d33 | 940 | eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \ |
6d681784 | 941 | done; \ |
0ef4728f ILT |
942 | ;; \ |
943 | esac ; \ | |
d29cd970 | 944 | export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES; \ |
0ef4728f | 945 | if (cd ./$$i; \ |
6d681784 | 946 | $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ |
64434418 | 947 | "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ |
753d5049 | 948 | "RANLIB=$${RANLIB}" \ |
d29cd970 | 949 | "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ |
6d681784 | 950 | $${target}); \ |
0ef4728f ILT |
951 | then true; else exit 1; fi; \ |
952 | else true; fi; \ | |
ec7a8792 ILT |
953 | done |
954 | @target=`echo $@ | sed -e 's/^do-//'`; \ | |
955 | r=`pwd`; export r; \ | |
81eb5025 | 956 | s=`cd $(srcdir); pwd`; export s; \ |
b6ae0f10 | 957 | $(SET_LIB_PATH) \ |
ab1cbc67 PB |
958 | for i in $(TARGET_CONFIGDIRS) -dummy-; do \ |
959 | if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \ | |
960 | for flag in $(EXTRA_TARGET_FLAGS); do \ | |
0f8f1d33 | 961 | eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \ |
ab1cbc67 | 962 | done; \ |
d29cd970 | 963 | export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES; \ |
ab1cbc67 PB |
964 | if (cd $(TARGET_SUBDIR)/$$i; \ |
965 | $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ | |
64434418 | 966 | "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ |
ab1cbc67 | 967 | "RANLIB=$${RANLIB}" \ |
d29cd970 | 968 | "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ |
ab1cbc67 PB |
969 | $${target}); \ |
970 | then true; else exit 1; fi; \ | |
971 | else true; fi; \ | |
0ef4728f | 972 | done |
fb90daeb | 973 | |
79337c85 ILT |
974 | # Here are the targets which correspond to the do-X targets. |
975 | ||
65088029 | 976 | .PHONY: info installcheck dvi install-info |
ca2ce3b3 ILT |
977 | .PHONY: clean distclean mostlyclean maintainer-clean realclean |
978 | .PHONY: local-clean local-distclean local-maintainer-clean | |
0ef4728f | 979 | info: do-info |
1a14993c | 980 | installcheck: do-installcheck |
0ef4728f | 981 | dvi: do-dvi |
9a9e8e7f | 982 | |
97840afa TT |
983 | # Make sure makeinfo is built before we do a `make info'. |
984 | do-info: all-texinfo | |
985 | ||
f35c6160 | 986 | install-info: do-install-info dir.info |
81eb5025 | 987 | s=`cd $(srcdir); pwd`; export s; \ |
72c09fbc SC |
988 | if [ -f dir.info ] ; then \ |
989 | $(INSTALL_DATA) dir.info $(infodir)/dir.info ; \ | |
50fbe976 | 990 | else true ; fi |
4d714963 | 991 | |
0ef4728f | 992 | local-clean: |
7fed4078 | 993 | -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E |
3b30df82 | 994 | |
0ef4728f | 995 | local-distclean: |
2e482734 | 996 | -rm -f Makefile config.status config.cache |
8c5bc3e3 ILT |
997 | -if [ "$(TARGET_SUBDIR)" != "." ]; then \ |
998 | rm -rf $(TARGET_SUBDIR); \ | |
999 | else true; fi | |
7fcfdcf7 | 1000 | |
ca2ce3b3 ILT |
1001 | local-maintainer-clean: |
1002 | @echo "This command is intended for maintainers to use;" | |
1003 | @echo "it deletes files that may require special tools to rebuild." | |
1004 | ||
0ef4728f ILT |
1005 | clean: do-clean local-clean |
1006 | mostlyclean: do-mostlyclean local-clean | |
1007 | distclean: do-distclean local-clean local-distclean | |
ca2ce3b3 ILT |
1008 | maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean |
1009 | maintainer-clean: local-distclean | |
1010 | realclean: maintainer-clean | |
0ef4728f | 1011 | |
7508666f MM |
1012 | # This rule is used to clean specific modules. |
1013 | .PHONY: $(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc | |
1014 | $(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc: | |
1015 | @dir=`echo $@ | sed -e 's/clean-//'`; \ | |
1016 | if [ -f ./$${dir}/Makefile ] ; then \ | |
1017 | r=`pwd`; export r; \ | |
81eb5025 | 1018 | s=`cd $(srcdir); pwd`; export s; \ |
7508666f MM |
1019 | $(SET_LIB_PATH) \ |
1020 | (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) clean); \ | |
1021 | else \ | |
1022 | true; \ | |
1023 | fi | |
1024 | ||
1025 | .PHONY: $(CLEAN_TARGET_MODULES) | |
1026 | $(CLEAN_TARGET_MODULES): | |
1027 | @dir=`echo $@ | sed -e 's/clean-target-//'`; \ | |
062aded9 | 1028 | rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \ |
7508666f MM |
1029 | if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \ |
1030 | r=`pwd`; export r; \ | |
81eb5025 | 1031 | s=`cd $(srcdir); pwd`; export s; \ |
7508666f MM |
1032 | $(SET_LIB_PATH) \ |
1033 | (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) clean); \ | |
1034 | else \ | |
1035 | true; \ | |
1036 | fi | |
1037 | ||
1038 | clean-target: $(CLEAN_TARGET_MODULES) | |
1039 | ||
65088029 ILT |
1040 | # Check target. |
1041 | ||
1042 | .PHONY: check | |
1043 | check: $(CHECK_MODULES) \ | |
1044 | $(CHECK_TARGET_MODULES) \ | |
1045 | $(CHECK_X11_MODULES) \ | |
1046 | check-gcc | |
1047 | ||
79337c85 | 1048 | # Installation targets. |
4d714963 | 1049 | |
04103845 | 1050 | .PHONY: install uninstall source-vault binary-vault vault-install |
98a33b6d | 1051 | install: $(INSTALL_TARGET) |
b26ff9d8 | 1052 | |
79337c85 ILT |
1053 | uninstall: |
1054 | @echo "the uninstall target is not supported in this tree" | |
1055 | ||
04103845 DE |
1056 | source-vault: |
1057 | $(MAKE) -f ./release/Build-A-Release \ | |
1058 | host=$(host_alias) source-vault | |
1059 | ||
1060 | binary-vault: | |
1061 | $(MAKE) -f ./release/Build-A-Release \ | |
1062 | host=$(host_alias) target=$(target_alias) | |
1063 | ||
275049c0 JK |
1064 | vault-install: |
1065 | @if [ -f ./release/vault-install ] ; then \ | |
1066 | ./release/vault-install $(host_alias) $(target_alias) ; \ | |
96bfa612 KR |
1067 | else \ |
1068 | true ; \ | |
275049c0 JK |
1069 | fi |
1070 | ||
79337c85 | 1071 | .PHONY: install.all |
06a07944 RP |
1072 | install.all: install-no-fixedincludes |
1073 | @if [ -f ./gcc/Makefile ] ; then \ | |
5cc73086 | 1074 | r=`pwd` ; export r ; \ |
b6ae0f10 | 1075 | $(SET_LIB_PATH) \ |
06a07944 RP |
1076 | (cd ./gcc; \ |
1077 | $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \ | |
1078 | else \ | |
1079 | true ; \ | |
1080 | fi | |
5a63b336 | 1081 | |
424c7ca7 | 1082 | # inet-install is used because the I*Net wants DejaGNU installed but |
f2b43566 | 1083 | # not built. Similarly, gzip is built but not installed. |
424c7ca7 | 1084 | inet-install: |
f2b43566 | 1085 | $(MAKE) INSTALL_MODULES="`echo $(INSTALL_MODULES) | sed -e 's/install-dejagnu//' -e 's/install-gzip//'`" install |
424c7ca7 | 1086 | |
96bfa612 | 1087 | # install-no-fixedincludes is used because Cygnus can not distribute |
79337c85 ILT |
1088 | # the fixed header files. |
1089 | .PHONY: install-no-fixedincludes | |
1090 | install-no-fixedincludes: \ | |
ff290baf | 1091 | installdirs \ |
79337c85 ILT |
1092 | $(INSTALL_MODULES) \ |
1093 | $(INSTALL_TARGET_MODULES) \ | |
96bfa612 | 1094 | $(INSTALL_X11_MODULES) \ |
f35c6160 | 1095 | gcc-no-fixedincludes |
d1bea4c7 | 1096 | |
5cc24596 | 1097 | # Install the gcc headers files, but not the fixed include files, |
79337c85 ILT |
1098 | # which Cygnus is not allowed to distribute. This rule is very |
1099 | # dependent on the workings of the gcc Makefile.in. | |
1100 | .PHONY: gcc-no-fixedincludes | |
06a07944 | 1101 | gcc-no-fixedincludes: |
5cc24596 PB |
1102 | @if [ -f ./gcc/Makefile ]; then \ |
1103 | rm -rf gcc/tmp-include; \ | |
1104 | mv gcc/include gcc/tmp-include 2>/dev/null; \ | |
1105 | mkdir gcc/include; \ | |
7f9cb3b2 | 1106 | cp $(srcdir)/gcc/gsyslimits.h gcc/include/syslimits.h; \ |
753d5049 | 1107 | touch gcc/stmp-fixinc gcc/include/fixed; \ |
a54e05f6 | 1108 | rm -f gcc/stmp-headers gcc/stmp-int-hdrs; \ |
5cc73086 | 1109 | r=`pwd`; export r; \ |
81eb5025 | 1110 | s=`cd $(srcdir); pwd` ; export s; \ |
b6ae0f10 | 1111 | $(SET_LIB_PATH) \ |
5cc24596 PB |
1112 | (cd ./gcc; \ |
1113 | $(MAKE) $(GCC_FLAGS_TO_PASS) install); \ | |
1114 | rm -rf gcc/include; \ | |
1115 | mv gcc/tmp-include gcc/include 2>/dev/null; \ | |
1116 | else true; fi | |
dcbfc14d | 1117 | |
2ec9f3fd KS |
1118 | # start-sanitize-ide |
1119 | # Install Foundry. Avoid installing a bunch of stuff we don't need. | |
1120 | install-foundry: | |
1121 | mods="$(INSTALL_MODULES)"; \ | |
1122 | x11_mods="$(INSTALL_X11_MODULES)"; \ | |
1123 | for d in install-tcl install-tk install-itcl install-tix install-ilu; do \ | |
1124 | mods="`echo $${mods} | sed -e "s/$$d//"`"; \ | |
1125 | x11_mods="`echo $${x11_mods} | sed -e "s/$$d//"`"; \ | |
1126 | done; \ | |
1127 | $(MAKE) INSTALL_MODULES="$${mods}" INSTALL_X11_MODULES="$${x11_mods}" install | |
1128 | for d in tcl tk itcl tix ilu; do \ | |
1129 | if [ -f $$d/Makefile ]; then \ | |
1130 | r=`pwd`; export r; \ | |
1131 | s=`cd $(srcdir); pwd`; export s; \ | |
1132 | $(SET_LIB_PATH) \ | |
1133 | (cd $$d; $(MAKE) $(FLAGS_TO_PASS) install-minimal); \ | |
1134 | else \ | |
1135 | true; \ | |
1136 | fi; \ | |
1137 | done | |
1138 | # end-sanitize-ide | |
1139 | ||
79337c85 ILT |
1140 | # This rule is used to build the modules which use FLAGS_TO_PASS. To |
1141 | # build a target all-X means to cd to X and make all. | |
3de70f1d | 1142 | # |
055cca84 | 1143 | # all-gui, and all-libproc are handled specially because |
4d802af9 MT |
1144 | # they are still experimental, and if they fail to build, that |
1145 | # shouldn't stop "make all". | |
04103845 DE |
1146 | .PHONY: $(ALL_MODULES) all-gui all-libproc |
1147 | $(ALL_MODULES) all-gui all-libproc: | |
79337c85 | 1148 | @dir=`echo $@ | sed -e 's/all-//'`; \ |
472af17f ILT |
1149 | if [ -f ./$${dir}/Makefile ] ; then \ |
1150 | r=`pwd`; export r; \ | |
81eb5025 | 1151 | s=`cd $(srcdir); pwd`; export s; \ |
b6ae0f10 | 1152 | $(SET_LIB_PATH) \ |
472af17f | 1153 | (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) all); \ |
07362bd9 | 1154 | else \ |
79337c85 | 1155 | true; \ |
07362bd9 DZ |
1156 | fi |
1157 | ||
80cbf870 ILT |
1158 | # These rules are used to check the modules which use FLAGS_TO_PASS. |
1159 | # To build a target check-X means to cd to X and make check. Some | |
1160 | # modules are only tested in a native toolchain. | |
4f0b8f27 | 1161 | |
d237841c BC |
1162 | .PHONY: $(CHECK_MODULES) $(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES) |
1163 | $(NATIVE_CHECK_MODULES): | |
39cc6dae RS |
1164 | @if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ |
1165 | dir=`echo $@ | sed -e 's/check-//'`; \ | |
472af17f ILT |
1166 | if [ -f ./$${dir}/Makefile ] ; then \ |
1167 | r=`pwd`; export r; \ | |
81eb5025 | 1168 | s=`cd $(srcdir); pwd`; export s; \ |
b6ae0f10 | 1169 | $(SET_LIB_PATH) \ |
472af17f ILT |
1170 | (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \ |
1171 | else \ | |
1172 | true; \ | |
4f0b8f27 TL |
1173 | fi; \ |
1174 | fi | |
1175 | ||
1176 | $(CROSS_CHECK_MODULES): | |
6a42d184 DZ |
1177 | @dir=`echo $@ | sed -e 's/check-//'`; \ |
1178 | if [ -f ./$${dir}/Makefile ] ; then \ | |
5cc73086 | 1179 | r=`pwd`; export r; \ |
81eb5025 | 1180 | s=`cd $(srcdir); pwd`; export s; \ |
b6ae0f10 | 1181 | $(SET_LIB_PATH) \ |
6a42d184 DZ |
1182 | (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \ |
1183 | else \ | |
1184 | true; \ | |
1185 | fi | |
1186 | ||
79337c85 ILT |
1187 | # This rule is used to install the modules which use FLAGS_TO_PASS. |
1188 | # To build a target install-X means to cd to X and make install. | |
1189 | .PHONY: $(INSTALL_MODULES) | |
ff290baf | 1190 | $(INSTALL_MODULES): installdirs |
79337c85 ILT |
1191 | @dir=`echo $@ | sed -e 's/install-//'`; \ |
1192 | if [ -f ./$${dir}/Makefile ] ; then \ | |
5cc73086 | 1193 | r=`pwd`; export r; \ |
81eb5025 | 1194 | s=`cd $(srcdir); pwd`; export s; \ |
b6ae0f10 | 1195 | $(SET_LIB_PATH) \ |
f35c6160 | 1196 | (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \ |
07362bd9 | 1197 | else \ |
79337c85 | 1198 | true; \ |
07362bd9 DZ |
1199 | fi |
1200 | ||
ca2ce3b3 ILT |
1201 | # This rule is used to configure the modules which are built with the |
1202 | # target tools. | |
1203 | .PHONY: $(CONFIGURE_TARGET_MODULES) | |
1204 | $(CONFIGURE_TARGET_MODULES): | |
ab1cbc67 | 1205 | @dir=`echo $@ | sed -e 's/configure-target-//'`; \ |
354a86c7 | 1206 | if [ -d $(TARGET_SUBDIR)/$${dir} ]; then \ |
59d3634c | 1207 | r=`pwd`; export r; \ |
f2b43566 ILT |
1208 | $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/$${dir}/tmpmulti.out 2> /dev/null; \ |
1209 | if [ -s $(TARGET_SUBDIR)/$${dir}/tmpmulti.out ]; then \ | |
1210 | if [ -f $(TARGET_SUBDIR)/$${dir}/multilib.out ]; then \ | |
1211 | if cmp $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out > /dev/null; then \ | |
1212 | rm -f $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \ | |
1213 | else \ | |
1214 | echo "Multilibs changed for $${dir}, reconfiguring"; \ | |
1215 | rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/Makefile; \ | |
1216 | mv $(TARGET_SUBDIR)/$${dir}/tmpmulti.out $(TARGET_SUBDIR)/$${dir}/multilib.out; \ | |
1217 | fi; \ | |
354a86c7 | 1218 | else \ |
354a86c7 MM |
1219 | mv $(TARGET_SUBDIR)/$${dir}/tmpmulti.out $(TARGET_SUBDIR)/$${dir}/multilib.out; \ |
1220 | fi; \ | |
062aded9 | 1221 | fi; \ |
354a86c7 MM |
1222 | fi; exit 0 # break command into two pieces |
1223 | @dir=`echo $@ | sed -e 's/configure-target-//'`; \ | |
3e288e27 SG |
1224 | if [ ! -d $(TARGET_SUBDIR) ]; then \ |
1225 | true; \ | |
1226 | elif [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \ | |
ca2ce3b3 ILT |
1227 | true; \ |
1228 | elif echo " $(TARGET_CONFIGDIRS) " | grep " $${dir} " >/dev/null 2>&1; then \ | |
efd7b806 | 1229 | if [ -d $(srcdir)/$${dir} ]; then \ |
ab1cbc67 | 1230 | [ -d $(TARGET_SUBDIR)/$${dir} ] || mkdir $(TARGET_SUBDIR)/$${dir};\ |
efd7b806 | 1231 | r=`pwd`; export r; \ |
81eb5025 | 1232 | s=`cd $(srcdir); pwd`; export s; \ |
b6ae0f10 | 1233 | $(SET_LIB_PATH) \ |
efd7b806 SC |
1234 | AR="$(AR_FOR_TARGET)"; export AR; \ |
1235 | AS="$(AS_FOR_TARGET)"; export AS; \ | |
1236 | CC="$(CC_FOR_TARGET)"; export CC; \ | |
1237 | CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ | |
1238 | CXX="$(CXX_FOR_TARGET)"; export CXX; \ | |
1239 | CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ | |
b6ae0f10 | 1240 | DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ |
054f9ada | 1241 | LD="$(LD_FOR_TARGET)"; export LD; \ |
276c2d7d | 1242 | LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ |
efd7b806 SC |
1243 | NM="$(NM_FOR_TARGET)"; export NM; \ |
1244 | RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ | |
d29cd970 | 1245 | WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ |
19b1d034 | 1246 | echo Configuring in $(TARGET_SUBDIR)/$${dir}; \ |
ab1cbc67 | 1247 | cd $(TARGET_SUBDIR)/$${dir}; \ |
283a2b3d DE |
1248 | case $(srcdir) in \ |
1249 | /*) \ | |
1250 | topdir=$(srcdir) ;; \ | |
1251 | *) \ | |
1252 | case "$(TARGET_SUBDIR)" in \ | |
1253 | .) topdir="../$(srcdir)" ;; \ | |
1254 | *) topdir="../../$(srcdir)" ;; \ | |
1255 | esac ;; \ | |
1256 | esac; \ | |
1257 | if [ "$(srcdir)" = "." ] ; then \ | |
1258 | if [ "$(TARGET_SUBDIR)" != "." ] ; then \ | |
81eb5025 | 1259 | if $(SHELL) $$s/symlink-tree $${topdir}/$${dir} "no-such-file" ; then \ |
0f8f1d33 TT |
1260 | if [ -f Makefile ]; then \ |
1261 | if $(MAKE) distclean; then \ | |
1262 | true; \ | |
1263 | else \ | |
1264 | exit 1; \ | |
1265 | fi; \ | |
1266 | else \ | |
1267 | true; \ | |
1268 | fi; \ | |
283a2b3d DE |
1269 | else \ |
1270 | exit 1; \ | |
1271 | fi; \ | |
1272 | else \ | |
1273 | true; \ | |
1274 | fi; \ | |
1275 | srcdiroption="--srcdir=."; \ | |
1276 | libsrcdir="."; \ | |
1277 | else \ | |
1278 | srcdiroption="--srcdir=$${topdir}/$${dir}"; \ | |
81eb5025 | 1279 | libsrcdir="$$s/$${dir}"; \ |
283a2b3d DE |
1280 | fi; \ |
1281 | if [ -f $${libsrcdir}/configure ] ; then \ | |
1282 | $(SHELL) $${libsrcdir}/configure \ | |
1283 | $(CONFIG_ARGUMENTS) $${srcdiroption} \ | |
1284 | --with-target-subdir="$(TARGET_SUBDIR)"; \ | |
19b1d034 | 1285 | else \ |
81eb5025 | 1286 | $(SHELL) $$s/configure \ |
283a2b3d DE |
1287 | $(CONFIG_ARGUMENTS) $${srcdiroption} \ |
1288 | --with-target-subdir="$(TARGET_SUBDIR)"; \ | |
19b1d034 | 1289 | fi; \ |
efd7b806 SC |
1290 | else \ |
1291 | true; \ | |
9908eb6a | 1292 | fi; \ |
ca2ce3b3 ILT |
1293 | else \ |
1294 | true; \ | |
1295 | fi | |
1296 | ||
6a42d184 DZ |
1297 | # This rule is used to build the modules which use TARGET_FLAGS_TO_PASS. |
1298 | # To build a target all-X means to cd to X and make all. | |
79337c85 ILT |
1299 | .PHONY: $(ALL_TARGET_MODULES) |
1300 | $(ALL_TARGET_MODULES): | |
ab1cbc67 PB |
1301 | @dir=`echo $@ | sed -e 's/all-target-//'`; \ |
1302 | if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \ | |
5cc73086 | 1303 | r=`pwd`; export r; \ |
81eb5025 | 1304 | s=`cd $(srcdir); pwd`; export s; \ |
b6ae0f10 | 1305 | $(SET_LIB_PATH) \ |
ab1cbc67 | 1306 | (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \ |
07362bd9 | 1307 | else \ |
79337c85 | 1308 | true; \ |
07362bd9 DZ |
1309 | fi |
1310 | ||
6a42d184 DZ |
1311 | # This rule is used to check the modules which use TARGET_FLAGS_TO_PASS. |
1312 | # To build a target install-X means to cd to X and make install. | |
1313 | .PHONY: $(CHECK_TARGET_MODULES) | |
1314 | $(CHECK_TARGET_MODULES): | |
136ca05d | 1315 | @dir=`echo $@ | sed -e 's/check-target-//'`; \ |
ab1cbc67 | 1316 | if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \ |
5cc73086 | 1317 | r=`pwd`; export r; \ |
81eb5025 | 1318 | s=`cd $(srcdir); pwd`; export s; \ |
b6ae0f10 | 1319 | $(SET_LIB_PATH) \ |
ab1cbc67 | 1320 | (cd $(TARGET_SUBDIR)/$${dir};$(MAKE) $(TARGET_FLAGS_TO_PASS) check);\ |
6a42d184 DZ |
1321 | else \ |
1322 | true; \ | |
1323 | fi | |
1324 | ||
79337c85 ILT |
1325 | # This rule is used to install the modules which use |
1326 | # TARGET_FLAGS_TO_PASS. To build a target install-X means to cd to X | |
1327 | # and make install. | |
1328 | .PHONY: $(INSTALL_TARGET_MODULES) | |
ff290baf | 1329 | $(INSTALL_TARGET_MODULES): installdirs |
ab1cbc67 PB |
1330 | @dir=`echo $@ | sed -e 's/install-target-//'`; \ |
1331 | if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \ | |
5cc73086 | 1332 | r=`pwd`; export r; \ |
81eb5025 | 1333 | s=`cd $(srcdir); pwd`; export s; \ |
b6ae0f10 | 1334 | $(SET_LIB_PATH) \ |
ab1cbc67 PB |
1335 | (cd $(TARGET_SUBDIR)/$${dir}; \ |
1336 | $(MAKE) $(TARGET_FLAGS_TO_PASS) install); \ | |
07362bd9 | 1337 | else \ |
79337c85 | 1338 | true; \ |
07362bd9 DZ |
1339 | fi |
1340 | ||
6a42d184 | 1341 | # This rule is used to build the modules which use X11_FLAGS_TO_PASS. |
79337c85 ILT |
1342 | # To build a target all-X means to cd to X and make all. |
1343 | .PHONY: $(ALL_X11_MODULES) | |
1344 | $(ALL_X11_MODULES): | |
1345 | @dir=`echo $@ | sed -e 's/all-//'`; \ | |
1346 | if [ -f ./$${dir}/Makefile ] ; then \ | |
5cc73086 | 1347 | r=`pwd`; export r; \ |
81eb5025 | 1348 | s=`cd $(srcdir); pwd`; export s; \ |
b6ae0f10 | 1349 | $(SET_LIB_PATH) \ |
79337c85 ILT |
1350 | (cd $${dir}; \ |
1351 | $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all); \ | |
07362bd9 | 1352 | else \ |
79337c85 | 1353 | true; \ |
07362bd9 DZ |
1354 | fi |
1355 | ||
6a42d184 DZ |
1356 | # This rule is used to check the modules which use X11_FLAGS_TO_PASS. |
1357 | # To build a target check-X means to cd to X and make all. | |
1358 | .PHONY: $(CHECK_X11_MODULES) | |
1359 | $(CHECK_X11_MODULES): | |
1360 | @dir=`echo $@ | sed -e 's/check-//'`; \ | |
1361 | if [ -f ./$${dir}/Makefile ] ; then \ | |
5cc73086 | 1362 | r=`pwd`; export r; \ |
81eb5025 | 1363 | s=`cd $(srcdir); pwd`; export s; \ |
b6ae0f10 | 1364 | $(SET_LIB_PATH) \ |
6a42d184 DZ |
1365 | (cd $${dir}; \ |
1366 | $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check); \ | |
1367 | else \ | |
1368 | true; \ | |
1369 | fi | |
1370 | ||
1371 | # This rule is used to install the modules which use X11_FLAGS_TO_PASS. | |
79337c85 ILT |
1372 | # To build a target install-X means to cd to X and make install. |
1373 | .PHONY: $(INSTALL_X11_MODULES) | |
48a3d5e5 | 1374 | $(INSTALL_X11_MODULES): installdirs |
6a42d184 | 1375 | @dir=`echo $@ | sed -e 's/install-//'`; \ |
79337c85 | 1376 | if [ -f ./$${dir}/Makefile ] ; then \ |
5cc73086 | 1377 | r=`pwd`; export r; \ |
81eb5025 | 1378 | s=`cd $(srcdir); pwd`; export s; \ |
b6ae0f10 | 1379 | $(SET_LIB_PATH) \ |
79337c85 ILT |
1380 | (cd $${dir}; \ |
1381 | $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install); \ | |
07362bd9 | 1382 | else \ |
79337c85 | 1383 | true; \ |
07362bd9 DZ |
1384 | fi |
1385 | ||
79337c85 ILT |
1386 | # gcc is the only module which uses GCC_FLAGS_TO_PASS. |
1387 | .PHONY: all-gcc | |
1388 | all-gcc: | |
1389 | @if [ -f ./gcc/Makefile ] ; then \ | |
5cc73086 | 1390 | r=`pwd`; export r; \ |
81eb5025 | 1391 | s=`cd $(srcdir); pwd`; export s; \ |
b6ae0f10 | 1392 | $(SET_LIB_PATH) \ |
79337c85 | 1393 | (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) all); \ |
07362bd9 | 1394 | else \ |
79337c85 | 1395 | true; \ |
07362bd9 DZ |
1396 | fi |
1397 | ||
4c0b7ebc DE |
1398 | .PHONY: all-bootstrap |
1399 | all-bootstrap: | |
1400 | @if [ -f ./gcc/Makefile ] ; then \ | |
1401 | r=`pwd`; export r; \ | |
81eb5025 | 1402 | s=`cd $(srcdir); pwd`; export s; \ |
b6ae0f10 | 1403 | $(SET_LIB_PATH) \ |
4c0b7ebc DE |
1404 | (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) bootstrap); \ |
1405 | else \ | |
1406 | true; \ | |
1407 | fi | |
1408 | ||
65088029 ILT |
1409 | .PHONY: check-gcc |
1410 | check-gcc: | |
1411 | @if [ -f ./gcc/Makefile ] ; then \ | |
5cc73086 | 1412 | r=`pwd`; export r; \ |
81eb5025 | 1413 | s=`cd $(srcdir); pwd`; export s; \ |
b6ae0f10 | 1414 | $(SET_LIB_PATH) \ |
65088029 ILT |
1415 | (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check); \ |
1416 | else \ | |
1417 | true; \ | |
1418 | fi | |
1419 | ||
79337c85 ILT |
1420 | .PHONY: install-gcc |
1421 | install-gcc: | |
1422 | @if [ -f ./gcc/Makefile ] ; then \ | |
5cc73086 | 1423 | r=`pwd`; export r; \ |
81eb5025 | 1424 | s=`cd $(srcdir); pwd`; export s; \ |
b6ae0f10 | 1425 | $(SET_LIB_PATH) \ |
79337c85 | 1426 | (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) install); \ |
07362bd9 | 1427 | else \ |
79337c85 | 1428 | true; \ |
07362bd9 DZ |
1429 | fi |
1430 | ||
753d5049 SC |
1431 | |
1432 | # EXPERIMENTAL STUFF | |
1433 | # This rule is used to install the modules which use FLAGS_TO_PASS. | |
1434 | # To build a target install-X means to cd to X and make install. | |
09985c96 | 1435 | .PHONY: install-dosrel |
ff290baf | 1436 | install-dosrel: installdirs info |
753d5049 SC |
1437 | @dir=`echo $@ | sed -e 's/install-//'`; \ |
1438 | if [ -f ./$${dir}/Makefile ] ; then \ | |
1439 | r=`pwd`; export r; \ | |
81eb5025 | 1440 | s=`cd $(srcdir); pwd`; export s; \ |
b6ae0f10 | 1441 | $(SET_LIB_PATH) \ |
753d5049 SC |
1442 | (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \ |
1443 | else \ | |
1444 | true; \ | |
1445 | fi | |
1446 | ||
09985c96 | 1447 | install-dosrel-fake: |
a987271c | 1448 | |
753d5049 | 1449 | |
79337c85 | 1450 | # This is a list of inter-dependencies among modules. |
53c403df | 1451 | all-apache: |
3a671555 | 1452 | all-autoconf: all-m4 all-texinfo |
08168809 | 1453 | all-automake: |
5db223e4 | 1454 | all-bash: |
79337c85 | 1455 | all-bfd: |
3a671555 | 1456 | all-binutils: all-libiberty all-opcodes all-bfd all-flex all-bison all-byacc |
97036944 | 1457 | all-bison: all-texinfo |
79337c85 | 1458 | all-byacc: |
97b951fb | 1459 | all-cvssrc: |
664298e6 BM |
1460 | configure-target-cygmon: $(ALL_GCC) |
1461 | all-target-cygmon: configure-target-cygmon all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio | |
2e482734 | 1462 | all-db: |
4d802af9 | 1463 | all-dejagnu: all-tcl all-expect all-tk |
79337c85 ILT |
1464 | all-diff: all-libiberty |
1465 | all-emacs: | |
3a671555 | 1466 | all-emacs19: all-bison all-byacc |
79337c85 | 1467 | all-etc: |
4c0b7ebc DE |
1468 | configure-target-examples: $(ALL_GCC) |
1469 | all-target-examples: configure-target-examples | |
c6ba9ae0 | 1470 | all-expect: all-tcl all-tk |
275049c0 | 1471 | all-fileutils: all-libiberty |
97840afa | 1472 | all-findutils: |
79337c85 | 1473 | all-find: |
3a671555 | 1474 | all-flex: all-libiberty all-bison all-byacc |
79337c85 | 1475 | all-gas: all-libiberty all-opcodes all-bfd |
65e21701 | 1476 | all-gash: all-tcl |
79337c85 | 1477 | all-gawk: |
fc3524a9 | 1478 | ALL_GCC = all-gcc |
3a671555 JM |
1479 | all-gcc: all-bison all-byacc all-binutils all-gas all-ld |
1480 | all-bootstrap: all-libiberty all-bison all-byacc all-binutils all-gas all-ld | |
43e1bf25 JL |
1481 | GDB_TK = all-tk all-tcl all-itcl all-tix all-libgui |
1482 | # start-sanitize-ide | |
67ae6381 | 1483 | GDB_TK = all-tk all-tcl all-itcl all-tix all-libgui all-libide |
43e1bf25 | 1484 | # end-sanitize-ide |
3a671555 | 1485 | all-gdb: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-bison all-byacc all-sim $(gdbnlmrequirements) $(GDB_TK) |
ba26181f | 1486 | all-gnuserv: |
10be59aa | 1487 | configure-target-gperf: $(ALL_GCC) |
97b951fb | 1488 | all-target-gperf: configure-target-gperf all-target-libiberty all-target-libstdc++ |
b6ae0f10 | 1489 | all-gprof: all-libiberty all-bfd all-opcodes |
6214eb23 | 1490 | all-grep: all-libiberty |
b6ae0f10 | 1491 | all-grez: all-libiberty all-bfd all-opcodes |
ab1cbc67 | 1492 | all-gui: all-gdb all-libproc all-target-librx |
0f8f1d33 | 1493 | all-guile: |
79337c85 ILT |
1494 | all-gzip: all-libiberty |
1495 | all-hello: all-libiberty | |
3718029f ILT |
1496 | # start-sanitize-ide |
1497 | all-ilu: | |
1498 | # end-sanitize-ide | |
79337c85 | 1499 | all-indent: |
8d1d94b6 | 1500 | all-inet: all-tcl all-send-pr all-perl |
3585593d | 1501 | all-ispell: all-emacs19 |
754a6784 | 1502 | all-itcl: all-tcl all-tk |
c070fb34 | 1503 | # start-sanitize-ide |
67ae6381 | 1504 | all-jstools: all-tcl all-tk all-tix all-libgui all-libide |
c070fb34 | 1505 | # end-sanitize-ide |
3a671555 | 1506 | all-ld: all-libiberty all-bfd all-opcodes all-bison all-byacc all-flex |
283a2b3d | 1507 | configure-target-libg++: $(ALL_GCC) configure-target-librx |
ab1cbc67 PB |
1508 | all-target-libg++: configure-target-libg++ all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio all-target-librx all-target-libstdc++ |
1509 | configure-target-libgloss: $(ALL_GCC) | |
283a2b3d | 1510 | all-target-libgloss: configure-target-libgloss configure-target-newlib |
ab1cbc67 PB |
1511 | configure-target-libio: $(ALL_GCC) |
1512 | all-target-libio: configure-target-libio all-gas all-ld all-gcc all-target-libiberty all-target-newlib | |
2ec9f3fd | 1513 | check-target-libio: all-target-libstdc++ |
67ae6381 | 1514 | all-libgui: all-tcl all-tk all-itcl |
79337c85 | 1515 | all-libiberty: |
87d36c31 | 1516 | # start-sanitize-ide |
43e1bf25 | 1517 | all-libide: all-tcl all-tk all-itcl all-ilu all-libgui |
87d36c31 | 1518 | # end-sanitize-ide |
ab1cbc67 PB |
1519 | configure-target-librx: $(ALL_GCC) configure-target-newlib |
1520 | all-target-librx: configure-target-librx | |
1521 | configure-target-libstdc++: $(ALL_GCC) | |
1522 | all-target-libstdc++: configure-target-libstdc++ all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio | |
79337c85 ILT |
1523 | all-m4: all-libiberty |
1524 | all-make: all-libiberty | |
1525 | all-mmalloc: | |
ab1cbc67 PB |
1526 | configure-target-newlib: $(ALL_GCC) |
1527 | all-target-newlib: configure-target-newlib all-binutils all-gas all-gcc | |
b6ae0f10 | 1528 | all-opcodes: all-bfd all-libiberty |
be2c65d3 | 1529 | all-patch: all-libiberty |
0f8f1d33 | 1530 | all-perl: |
b255ccdb | 1531 | all-prms: all-libiberty |
79337c85 ILT |
1532 | all-rcs: |
1533 | all-readline: | |
1534 | all-recode: all-libiberty | |
ac259c28 JM |
1535 | all-sed: all-libiberty |
1536 | all-send-pr: all-prms | |
79337c85 | 1537 | all-shellutils: |
97036944 | 1538 | all-sim: all-libiberty all-bfd all-opcodes all-readline |
abc93570 | 1539 | all-snavigator: all-tcl all-tk all-tix all-itcl all-db all-grep |
07362bd9 | 1540 | all-tar: all-libiberty |
79337c85 ILT |
1541 | all-tcl: |
1542 | all-tclX: all-tcl all-tk | |
1543 | all-tk: all-tcl | |
1544 | all-texinfo: all-libiberty | |
1545 | all-textutils: | |
b6ae0f10 | 1546 | all-tgas: all-libiberty all-bfd all-opcodes |
79337c85 | 1547 | all-time: |
c446cc8b | 1548 | all-tix: all-tcl all-tk |
eebe454c | 1549 | # start-sanitize-ide |
67ae6381 | 1550 | all-vmake: all-tcl all-tk all-itcl all-tix all-libgui all-libide |
eebe454c | 1551 | # end-sanitize-ide |
79337c85 | 1552 | all-wdiff: |
97840afa | 1553 | all-target-winsup: all-target-newlib all-target-libiberty all-target-librx all-target-libio configure-target-winsup |
ab1cbc67 | 1554 | configure-target-winsup: configure-target-newlib |
79337c85 | 1555 | all-uudecode: all-libiberty |
ab1cbc67 PB |
1556 | configure-target-libiberty: $(ALL_GCC) |
1557 | all-target-libiberty: configure-target-libiberty all-gcc all-ld all-target-newlib | |
0f8f1d33 TT |
1558 | all-target: $(ALL_TARGET_MODULES) |
1559 | install-target: $(INSTALL_TARGET_MODULES) | |
abc93570 ILT |
1560 | # start-sanitize-gdbtk |
1561 | install-gdbtk: install-tcl install-tk install-itcl install-tix install-libgui install-gdb | |
1562 | #end-sanitize-gdbtk | |
79337c85 | 1563 | ### other supporting targets |
07362bd9 | 1564 | |
79337c85 ILT |
1565 | MAKEDIRS= \ |
1566 | $(prefix) \ | |
9deb9485 | 1567 | $(exec_prefix) |
ff290baf ILT |
1568 | .PHONY: installdirs |
1569 | installdirs: mkinstalldirs | |
fab3dd2d | 1570 | $(SHELL) $(srcdir)/mkinstalldirs $(MAKEDIRS) |
23e3e7f9 | 1571 | |
79337c85 ILT |
1572 | dir.info: do-install-info |
1573 | if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \ | |
1574 | $(srcdir)/texinfo/gen-info-dir $(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \ | |
1575 | mv -f dir.info.new dir.info ; \ | |
1576 | else true ; \ | |
72c09fbc | 1577 | fi |
6b7e5998 | 1578 | |
b1cceba2 DZ |
1579 | dist: |
1580 | @echo "Building a full distribution of this tree isn't done" | |
1581 | @echo "via 'make dist'. Check out the etc/ subdirectory" | |
1582 | ||
eb02fd64 RP |
1583 | etags tags: TAGS |
1584 | ||
753d5049 SC |
1585 | # Right now this just builds TAGS in each subdirectory. emacs19 has the |
1586 | # ability to use several tags files at once, so there is probably no need | |
1587 | # to combine them into one big TAGS file (like CVS 1.3 does). We could | |
1588 | # (if we felt like it) have this Makefile write a piece of elisp which | |
1589 | # the user could load to tell emacs19 where all the TAGS files we just | |
1590 | # built are. | |
1591 | TAGS: do-TAGS | |
eb02fd64 | 1592 | |
eb02fd64 RP |
1593 | # with the gnu make, this is done automatically. |
1594 | ||
01ec9588 | 1595 | Makefile: Makefile.in configure.in $(host_makefile_frag) $(target_makefile_frag) |
a26878d1 | 1596 | $(SHELL) ./config.status |
eb02fd64 | 1597 | |
11954bf1 | 1598 | # |
01ec9588 | 1599 | # Support for building net releases |
11954bf1 | 1600 | |
01ec9588 JK |
1601 | # Files in devo used in any net release. |
1602 | # ChangeLog omitted because it may refer to files which are not in this | |
1603 | # distribution (perhaps it would be better to include it anyway). | |
d94d255d | 1604 | DEVO_SUPPORT= README Makefile.in configure configure.in \ |
9823504d | 1605 | config.guess config.sub config move-if-change \ |
5f69e8bc | 1606 | mpw-README mpw-build.in mpw-config.in mpw-configure mpw-install \ |
08499fc2 | 1607 | COPYING COPYING.LIB install-sh config-ml.in symlink-tree \ |
6e68a23e | 1608 | mkinstalldirs ltconfig ltmain.sh missing ylwrap |
01ec9588 JK |
1609 | |
1610 | # Files in devo/etc used in any net release. | |
1611 | # ChangeLog omitted because it may refer to files which are not in this | |
1612 | # distribution (perhaps it would be better to include it anyway). | |
f046ec67 JM |
1613 | ETC_SUPPORT= Makefile.in configure configure.in standards.texi \ |
1614 | make-stds.texi standards.info* | |
01ec9588 | 1615 | |
40e16078 KR |
1616 | # When you use `make setup-dirs' or `make taz' you should always redefine |
1617 | # this macro. | |
1618 | SUPPORT_FILES = list-of-support-files-for-tool-in-question | |
40e16078 | 1619 | |
a54e05f6 KR |
1620 | .PHONY: taz |
1621 | ||
484fa12d JW |
1622 | taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) \ |
1623 | texinfo/texinfo.tex texinfo/gpl.texinfo texinfo/lgpl.texinfo | |
484fa12d JW |
1624 | # Take out texinfo from a few places; make simple BISON=bison line. |
1625 | sed -e '/^all\.normal: /s/\all-texinfo //' \ | |
1626 | -e '/^ install-texinfo /d' \ | |
484fa12d JW |
1627 | <Makefile.in >tmp |
1628 | mv -f tmp Makefile.in | |
65e21701 | 1629 | # |
1d5fcc66 PB |
1630 | $(start-sanitize-Sanitize) |
1631 | @if [ -f .Sanitize ] ; then echo "RUN Sanitize FIRST!" ; false ; fi ; | |
1632 | $(end-sanitize-Sanitize) | |
40e16078 | 1633 | ./configure sun4 |
ab1cbc67 PB |
1634 | [ -z "$(CONFIGURE_TARGET_MODULES)" ] \ |
1635 | || $(MAKE) $(CONFIGURE_TARGET_MODULES) ALL_GCC="" \ | |
aaefc574 | 1636 | CC_FOR_TARGET="$(CC)" CXX_FOR_TARGET="$(CXX)" |
6b9e3a78 | 1637 | # Make links, and run "make diststuff" or "make info" when needed. |
a54e05f6 | 1638 | rm -rf proto-toplev ; mkdir proto-toplev |
7f9cb3b2 | 1639 | set -e ; dirs="$(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES)" ; \ |
a54e05f6 KR |
1640 | for d in $$dirs ; do \ |
1641 | if [ -d $$d ]; then \ | |
ab1cbc67 PB |
1642 | if [ ! -f $$d/Makefile ] ; then true ; \ |
1643 | elif grep '^diststuff:' $$d/Makefile >/dev/null ; then \ | |
1644 | (cd $$d ; $(MAKE) diststuff ) || exit 1 ; \ | |
6b9e3a78 | 1645 | elif grep '^info:' $$d/Makefile >/dev/null ; then \ |
ab1cbc67 | 1646 | (cd $$d ; $(MAKE) info ) || exit 1 ; \ |
6b9e3a78 | 1647 | fi ; \ |
7f9cb3b2 KR |
1648 | if [ -d $$d/proto-$$d.dir ]; then \ |
1649 | ln -s ../$$d/proto-$$d.dir proto-toplev/$$d ; \ | |
1650 | else \ | |
1651 | ln -s ../$$d proto-toplev/$$d ; \ | |
1652 | fi ; \ | |
a54e05f6 | 1653 | else ln -s ../$$d proto-toplev/$$d ; fi ; \ |
40e16078 | 1654 | done |
3dbe0fa2 | 1655 | cd etc ; $(MAKE) info |
5600fbd2 | 1656 | $(MAKE) distclean |
a54e05f6 | 1657 | # |
40e16078 | 1658 | mkdir proto-toplev/etc |
15408b3b KR |
1659 | (cd proto-toplev/etc; \ |
1660 | for i in $(ETC_SUPPORT); do \ | |
40e16078 | 1661 | ln -s ../../etc/$$i . ; \ |
15408b3b | 1662 | done) |
a54e05f6 | 1663 | # |
04103845 | 1664 | # Take out texinfo from configurable dirs |
40e16078 KR |
1665 | rm proto-toplev/configure.in |
1666 | sed -e '/^host_tools=/s/texinfo //' \ | |
40e16078 | 1667 | <configure.in >proto-toplev/configure.in |
a54e05f6 | 1668 | # |
40e16078 | 1669 | mkdir proto-toplev/texinfo |
8d190aa3 KR |
1670 | ln -s ../../texinfo/texinfo.tex proto-toplev/texinfo/ |
1671 | ln -s ../../texinfo/gpl.texinfo proto-toplev/texinfo/ | |
1672 | ln -s ../../texinfo/lgpl.texinfo proto-toplev/texinfo/ | |
1673 | if test -r texinfo/util/tex3patch ; then \ | |
1674 | mkdir proto-toplev/texinfo/util && \ | |
1675 | ln -s ../../../texinfo/util/tex3patch proto-toplev/texinfo/util ; \ | |
1676 | else true; fi | |
a561909f | 1677 | chmod og=u `find . -print` |
19ebe123 ILT |
1678 | if grep AM_INIT_AUTOMAKE $(TOOL)/configure.in >/dev/null 2>&1; then \ |
1679 | ver=`sed < $(TOOL)/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'`; \ | |
1680 | else \ | |
1681 | ver=`sed <$(TOOL)/Makefile.in -n 's/^VERSION *= *//p'`; \ | |
1682 | fi; \ | |
1683 | $(MAKE) -f Makefile.in do-tar-gz TOOL=$(TOOL) VER=$$ver | |
b5dbae28 KR |
1684 | |
1685 | do-tar-gz: | |
1686 | echo "==> Making $(TOOL)-$(VER).tar.gz" | |
1687 | -rm -f $(TOOL)-$(VER) | |
1688 | ln -s proto-toplev $(TOOL)-$(VER) | |
1689 | tar cfh $(TOOL)-$(VER).tar $(TOOL)-$(VER) | |
1690 | $(GZIPPROG) -v -9 $(TOOL)-$(VER).tar | |
40e16078 | 1691 | |
484fa12d | 1692 | TEXINFO_SUPPORT= texinfo/texinfo.tex texinfo/gpl.texinfo texinfo/lgpl.texinfo |
7f9cb3b2 | 1693 | DIST_SUPPORT= $(DEVO_SUPPORT) $(TEXINFO_SUPPORT) |
40e16078 | 1694 | |
96bfa612 | 1695 | .PHONY: gas.tar.gz |
2e482734 | 1696 | GAS_SUPPORT_DIRS= bfd include libiberty opcodes setup.com makefile.vms |
96bfa612 | 1697 | gas.tar.gz: $(DIST_SUPPORT) $(GAS_SUPPORT_DIRS) gas |
484fa12d JW |
1698 | $(MAKE) -f Makefile.in taz TOOL=gas \ |
1699 | SUPPORT_FILES="$(GAS_SUPPORT_DIRS)" | |
40e16078 | 1700 | |
7f9cb3b2 | 1701 | # The FSF "binutils" release includes gprof and ld. |
96bfa612 | 1702 | .PHONY: binutils.tar.gz |
2e482734 | 1703 | BINUTILS_SUPPORT_DIRS= bfd gas include libiberty opcodes ld gprof setup.com makefile.vms |
96bfa612 | 1704 | binutils.tar.gz: $(DIST_SUPPORT) $(BINUTILS_SUPPORT_DIRS) binutils |
484fa12d | 1705 | $(MAKE) -f Makefile.in taz TOOL=binutils \ |
2492f942 | 1706 | SUPPORT_FILES="$(BINUTILS_SUPPORT_DIRS) makeall.bat configure.bat" |
7f9cb3b2 | 1707 | |
96bfa612 | 1708 | .PHONY: gas+binutils.tar.gz |
a54e05f6 | 1709 | GASB_SUPPORT_DIRS= $(GAS_SUPPORT_DIRS) binutils ld gprof |
96bfa612 | 1710 | gas+binutils.tar.gz: $(DIST_SUPPORT) $(GASB_SUPPORT_DIRS) gas |
484fa12d | 1711 | $(MAKE) -f Makefile.in taz TOOL=gas \ |
2492f942 | 1712 | SUPPORT_FILES="$(GASB_SUPPORT_DIRS) makeall.bat configure.bat" |
79337c85 | 1713 | |
5600fbd2 | 1714 | .PHONY: libg++.tar.gz |
ab1cbc67 | 1715 | LIBGXX_SUPPORT_DIRS=include libstdc++ libio librx libiberty |
5600fbd2 | 1716 | libg++.tar.gz: $(DIST_SUPPORT) libg++ |
484fa12d JW |
1717 | $(MAKE) -f Makefile.in taz TOOL=libg++ \ |
1718 | SUPPORT_FILES="$(LIBGXX_SUPPORT_DIRS)" | |
5600fbd2 | 1719 | |
49dfa984 JM |
1720 | GNATS_SUPPORT_DIRS=include libiberty send-pr |
1721 | gnats.tar.gz: $(DIST_SUPPORT) $(GNATS_SUPPORT_DIRS) gnats | |
a0bd8e18 | 1722 | $(MAKE) -f Makefile.in taz TOOL=gnats \ |
49dfa984 JM |
1723 | SUPPORT_FILES="$(GNATS_SUPPORT_DIRS)" |
1724 | ||
1d5fcc66 | 1725 | .PHONY: gdb.tar.gz |
81597186 | 1726 | GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline sim utils |
ca2ce3b3 | 1727 | GDBTK_SUPPORT_DIRS= `if [ -d tcl -a -d tk ] ; then echo tcl tk ; fi` |
1d5fcc66 PB |
1728 | gdb.tar.gz: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb |
1729 | $(MAKE) -f Makefile.in taz TOOL=gdb \ | |
ca2ce3b3 | 1730 | SUPPORT_FILES="$(GDB_SUPPORT_DIRS) $(GDBTK_SUPPORT_DIRS)" |
1d5fcc66 | 1731 | |
7166a308 | 1732 | .PHONY: newlib.tar.gz |
a220ba0f | 1733 | NEWLIB_SUPPORT_DIRS=libgloss |
04103845 | 1734 | # taz configures for the sun4 target which won't configure newlib. |
a220ba0f SC |
1735 | # We need newlib configured so that the .info files are made. |
1736 | # Unfortunately, it is not enough to just configure newlib separately: | |
1737 | # taz will build the .info files but since SUBDIRS won't contain newlib, | |
1738 | # distclean won't be run (leaving Makefile, config.status, and the tmp files | |
1739 | # used in building the .info files, eg: *.def, *.ref). | |
4c0b7ebc DE |
1740 | # The problem isn't solvable however without a lot of extra work because |
1741 | # target libraries are built in subdir $(target_alias) which gets nuked during | |
1742 | # the make distclean. For now punt on the issue of shipping newlib info files | |
1743 | # with newlib net releases and wait for a day when some native target (sun4?) | |
1744 | # supports newlib (if only minimally). | |
7166a308 KR |
1745 | newlib.tar.gz: $(DIST_SUPPORT) $(NEWLIB_SUPPORT_DIRS) newlib |
1746 | $(MAKE) -f Makefile.in taz TOOL=newlib \ | |
1747 | SUPPORT_FILES="$(NEWLIB_SUPPORT_DIRS)" \ | |
6b9e3a78 | 1748 | DEVO_SUPPORT="$(DEVO_SUPPORT) COPYING.NEWLIB" newlib |
7166a308 | 1749 | |
79337c85 | 1750 | .NOEXPORT: |
05992891 | 1751 | MAKEOVERRIDES= |
79337c85 ILT |
1752 | |
1753 | # start-sanitize-chill | |
1754 | ## This is ugly, but I don't want GNU make to put these variables in | |
1755 | ## the environment. Older makes will see this as a set of targets | |
1756 | ## with no dependencies and no actions. | |
1757 | unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET : | |
1758 | # end-sanitize-chill | |
1759 | ||
eb02fd64 | 1760 | # end of Makefile.in |