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