]>
Commit | Line | Data |
---|---|---|
eb02fd64 | 1 | # |
131a3881 | 2 | # Makefile for directory with subdirs to build. |
79337c85 | 3 | # Copyright (C) 1990, 1991, 1992, 1993 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 | |
17 | # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ | |
18 | # | |
f149eb99 | 19 | |
eb02fd64 | 20 | srcdir = . |
28f3b094 | 21 | |
4d714963 | 22 | prefix = /usr/local |
eb02fd64 | 23 | |
7fcfdcf7 SC |
24 | exec_prefix = $(prefix) |
25 | bindir = $(exec_prefix)/bin | |
26 | libdir = $(exec_prefix)/lib | |
a54e05f6 | 27 | tooldir = $(exec_prefix)/$(target) |
7fcfdcf7 | 28 | |
51489233 ILT |
29 | program_transform_name = |
30 | ||
4d714963 | 31 | datadir = $(prefix)/lib |
7fcfdcf7 | 32 | mandir = $(prefix)/man |
4d714963 RP |
33 | man1dir = $(mandir)/man1 |
34 | man2dir = $(mandir)/man2 | |
35 | man3dir = $(mandir)/man3 | |
36 | man4dir = $(mandir)/man4 | |
37 | man5dir = $(mandir)/man5 | |
38 | man6dir = $(mandir)/man6 | |
39 | man7dir = $(mandir)/man7 | |
40 | man8dir = $(mandir)/man8 | |
41 | man9dir = $(mandir)/man9 | |
7fcfdcf7 | 42 | infodir = $(prefix)/info |
4d714963 RP |
43 | includedir = $(prefix)/include |
44 | docdir = $(datadir)/doc | |
04103845 | 45 | GDB_NLM_DEPS = |
4d714963 RP |
46 | |
47 | SHELL = /bin/sh | |
48 | ||
f35c6160 | 49 | INSTALL = $${srcroot}/install.sh -c |
4d714963 | 50 | INSTALL_PROGRAM = $(INSTALL) |
5cc73086 | 51 | INSTALL_DATA = $(INSTALL) -m 644 |
fe560b9f | 52 | INSTALL_XFORM = $(INSTALL) -t='$(program_transform_name)' |
3c8735af | 53 | |
09985c96 | 54 | INSTALL_DOSREL = install-dosrel-fake |
a987271c | 55 | |
440868a0 | 56 | AS = as |
ec342d7d | 57 | AR = ar |
b5329d84 | 58 | AR_FLAGS = rc |
e85e07cb | 59 | CC = cc |
7b636683 | 60 | |
66957ce4 ILT |
61 | # Special variables passed down in EXTRA_GCC_FLAGS. They are defined |
62 | # here so that they can be overridden by Makefile fragments. | |
753d5049 SC |
63 | HOST_CC = $(CC_FOR_BUILD) |
64 | HOST_PREFIX = | |
65 | HOST_PREFIX_1 = loser- | |
66 | ||
7b636683 JK |
67 | # We don't specify -g -O because many compilers don't support -g -O, |
68 | # and/or -O is broken in and of itself. | |
f8a6ad66 | 69 | CFLAGS = -g |
3585593d BK |
70 | LIBCFLAGS = $(CFLAGS) |
71 | CFLAGS_FOR_TARGET = $(CFLAGS) | |
72 | LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET) | |
04103845 DE |
73 | PICFLAG = |
74 | PICFLAG_FOR_TARGET = | |
7b636683 | 75 | |
a4e879a1 | 76 | # start-sanitize-chill |
7d9f0c54 MW |
77 | CHILLFLAGS = $(CFLAGS) |
78 | CHILL_LIB = -lchill | |
a4e879a1 | 79 | # end-sanitize-chill |
e85e07cb | 80 | CXX = gcc |
7b636683 | 81 | |
1d5fcc66 | 82 | # Use -O2 to stress test the compiler. |
864a5888 PB |
83 | CXXFLAGS = -g -O2 |
84 | LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates | |
3585593d | 85 | CXXFLAGS_FOR_TARGET = $(CXXFLAGS) |
2f64ef77 | 86 | LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates |
7b636683 | 87 | |
4d714963 | 88 | RANLIB = ranlib |
51489233 | 89 | NM = nm |
5cc73086 KR |
90 | # Not plain GZIP, since gzip looks there for extra command-line options. |
91 | GZIPPROG = gzip | |
eb02fd64 | 92 | |
40e16078 | 93 | # BISON: This line sed'ed to BISON = bison -y for FSF releases, don't remove. |
5cc73086 KR |
94 | BISON = `if [ -f $$r/byacc/byacc ] ; \ |
95 | then echo $$r/byacc/byacc ; \ | |
378fd382 | 96 | else echo byacc ; \ |
06a07944 | 97 | fi` |
2645fb0c | 98 | |
5cc73086 KR |
99 | LEX = `if [ -f $$r/flex/flex ] ; \ |
100 | then echo $$r/flex/flex ; \ | |
2198e4ba MT |
101 | else echo flex ; fi` |
102 | ||
5cc73086 KR |
103 | M4 = `if [ -f $$r/m4/m4 ] ; \ |
104 | then echo $$r/m4/m4 ; \ | |
65e21701 KR |
105 | else echo m4 ; fi` |
106 | ||
5cc73086 KR |
107 | MAKEINFO = `if [ -f $$r/texinfo/makeinfo/makeinfo ] ; \ |
108 | then echo $$r/texinfo/makeinfo/makeinfo ; \ | |
77806c3e | 109 | else echo makeinfo ; fi` |
484fa12d | 110 | |
9823504d ILT |
111 | # This just becomes part of the MAKEINFO definition passed down to |
112 | # sub-makes. It lets flags be given on the command line while still | |
113 | # using the makeinfo from the object tree. | |
114 | MAKEINFOFLAGS = | |
b772d75e | 115 | |
5cc73086 KR |
116 | EXPECT = `if [ -f $$r/expect/expect ] ; \ |
117 | then echo $$r/expect/expect ; \ | |
a54e05f6 KR |
118 | else echo expect ; fi` |
119 | ||
120 | RUNTEST = `if [ -f $${srcroot}/dejagnu/runtest ] ; \ | |
121 | then echo $${srcroot}/dejagnu/runtest ; \ | |
6a42d184 DZ |
122 | else echo runtest ; fi` |
123 | ||
f980fcfb JG |
124 | |
125 | # libraries that may need to be augmented on a system-by-system basis | |
126 | X11_LIB = -lX11 | |
127 | ||
e85e07cb | 128 | # compilers to use to create programs which must be run in the build |
440868a0 ILT |
129 | # environment. |
130 | CC_FOR_BUILD = $(CC) | |
e85e07cb | 131 | CXX_FOR_BUILD = $(CXX) |
440868a0 | 132 | |
9f73dd6a | 133 | SUBDIRS = "this is set via configure, don't edit this" |
6a3958b2 RP |
134 | OTHERS = |
135 | ||
a0f47eb7 | 136 | ALL = all.normal |
f35c6160 DZ |
137 | INSTALL_TARGET = install-dirs \ |
138 | $(INSTALL_MODULES) \ | |
139 | $(INSTALL_TARGET_MODULES) \ | |
140 | $(INSTALL_X11_MODULES) \ | |
753d5049 | 141 | install-gcc \ |
09985c96 | 142 | $(INSTALL_DOSREL) |
753d5049 | 143 | |
fb660409 | 144 | |
51489233 | 145 | CC_FOR_TARGET = ` \ |
5cc73086 | 146 | if [ -f $$r/gcc/Makefile ] ; then \ |
753d5049 SC |
147 | if [ -f $$r/newlib/Makefile ] ; then \ |
148 | echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/newlib/targ-include -idirafter $${srcroot}/newlib/libc/include -nostdinc; \ | |
149 | else \ | |
150 | echo $$r/gcc/xgcc -B$$r/gcc/; \ | |
151 | fi; \ | |
51489233 | 152 | else \ |
378fd382 | 153 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ |
51489233 ILT |
154 | echo $(CC); \ |
155 | else \ | |
ea6d5817 | 156 | t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \ |
51489233 ILT |
157 | fi; \ |
158 | fi` | |
159 | ||
a4e879a1 | 160 | # start-sanitize-chill |
7d9f0c54 | 161 | CHILL_FOR_TARGET = ` \ |
5cc73086 | 162 | if [ -f $$r/gcc/Makefile ] ; then \ |
04103845 | 163 | echo $$r/gcc/xgcc -B$$r/gcc/ -L$$r/gcc/ch/runtime/; \ |
7d9f0c54 MW |
164 | else \ |
165 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ | |
166 | echo $(CC); \ | |
167 | else \ | |
ea6d5817 | 168 | t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \ |
7d9f0c54 MW |
169 | fi; \ |
170 | fi` | |
34b3298b | 171 | |
a4e879a1 | 172 | # end-sanitize-chill |
7d9f0c54 | 173 | |
d1bea4c7 | 174 | CXX_FOR_TARGET = ` \ |
5cc73086 | 175 | if [ -f $$r/gcc/Makefile ] ; then \ |
753d5049 SC |
176 | if [ -f $$r/newlib/Makefile ] ; then \ |
177 | echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/newlib/targ-include -idirafter $${srcroot}/newlib/libc/include -nostdinc; \ | |
178 | else \ | |
179 | echo $$r/gcc/xgcc -B$$r/gcc/; \ | |
180 | fi; \ | |
fca4f908 | 181 | else \ |
e85e07cb ILT |
182 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ |
183 | echo $(CXX); \ | |
fca4f908 | 184 | else \ |
ea6d5817 | 185 | t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \ |
fca4f908 MW |
186 | fi; \ |
187 | fi` | |
188 | ||
440868a0 | 189 | AS_FOR_TARGET = ` \ |
ea6d5817 | 190 | if [ -f $$r/gas/as.new ] ; then \ |
5cc73086 | 191 | echo $$r/gas/as.new ; \ |
440868a0 | 192 | else \ |
e85e07cb | 193 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ |
440868a0 ILT |
194 | echo $(AS); \ |
195 | else \ | |
ea6d5817 | 196 | t='$(program_transform_name)'; echo as | sed -e 's/x/x/' $$t ; \ |
81246025 | 197 | fi; \ |
440868a0 ILT |
198 | fi` |
199 | ||
a220ba0f SC |
200 | DLLTOOL_FOR_TARGET = ` \ |
201 | if [ -f $$r/binutils/dlltool ] ; then \ | |
202 | echo $$r/binutils/dlltool ; \ | |
203 | else \ | |
204 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ | |
205 | echo $(DLLTOOL); \ | |
206 | else \ | |
207 | t='$(program_transform_name)'; echo dlltool | sed -e 's/x/x/' $$t ; \ | |
208 | fi; \ | |
209 | fi` | |
210 | ||
51489233 | 211 | AR_FOR_TARGET = ` \ |
5cc73086 KR |
212 | if [ -f $$r/binutils/ar ] ; then \ |
213 | echo $$r/binutils/ar ; \ | |
51489233 | 214 | else \ |
378fd382 | 215 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ |
51489233 ILT |
216 | echo $(AR); \ |
217 | else \ | |
ea6d5817 | 218 | t='$(program_transform_name)'; echo ar | sed -e 's/x/x/' $$t ; \ |
81246025 | 219 | fi; \ |
51489233 ILT |
220 | fi` |
221 | ||
222 | RANLIB_FOR_TARGET = ` \ | |
5cc73086 KR |
223 | if [ -f $$r/binutils/ranlib ] ; then \ |
224 | echo $$r/binutils/ranlib ; \ | |
51489233 | 225 | else \ |
378fd382 | 226 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ |
51489233 ILT |
227 | echo $(RANLIB); \ |
228 | else \ | |
ea6d5817 | 229 | t='$(program_transform_name)'; echo ranlib | sed -e 's/x/x/' $$t ; \ |
81246025 | 230 | fi; \ |
51489233 ILT |
231 | fi` |
232 | ||
233 | NM_FOR_TARGET = ` \ | |
ea6d5817 | 234 | if [ -f $$r/binutils/nm.new ] ; then \ |
753d5049 | 235 | echo $$r/binutils/nm.new ; \ |
51489233 | 236 | else \ |
378fd382 | 237 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ |
51489233 ILT |
238 | echo $(NM); \ |
239 | else \ | |
ea6d5817 | 240 | t='$(program_transform_name)'; echo nm | sed -e 's/x/x/' $$t ; \ |
81246025 | 241 | fi; \ |
51489233 ILT |
242 | fi` |
243 | ||
eb02fd64 | 244 | #### host and target specific makefile fragments come in here. |
ec342d7d | 245 | ### |
eb02fd64 | 246 | |
0ef4728f ILT |
247 | # Flags to pass down to all sub-makes. |
248 | # Please keep these in alphabetical order. | |
249 | BASE_FLAGS_TO_PASS = \ | |
2198e4ba | 250 | "AR_FLAGS=$(AR_FLAGS)" \ |
d09de70e | 251 | "AR_FOR_TARGET=$(AR_FOR_TARGET)" \ |
0ef4728f | 252 | "AS_FOR_TARGET=$(AS_FOR_TARGET)" \ |
378fd382 | 253 | "BISON=$(BISON)" \ |
378fd382 | 254 | "CC_FOR_BUILD=$(CC_FOR_BUILD)" \ |
0ef4728f | 255 | "CC_FOR_TARGET=$(CC_FOR_TARGET)" \ |
2198e4ba | 256 | "CFLAGS=$(CFLAGS)" \ |
3585593d | 257 | "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \ |
a4e879a1 | 258 | $(start-sanitize-chill)\ |
7d9f0c54 MW |
259 | "CHILLFLAGS=$(CHILLFLAGS)" \ |
260 | "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \ | |
261 | "CHILL_LIB=$(CHILL_LIB)" \ | |
a4e879a1 | 262 | $(end-sanitize-chill)\ |
0ef4728f ILT |
263 | "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \ |
264 | "CXXFLAGS=$(CXXFLAGS)" \ | |
3585593d | 265 | "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \ |
0ef4728f | 266 | "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \ |
a220ba0f | 267 | "DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \ |
a9a2f22f | 268 | "GCC_FOR_TARGET=$(CC_FOR_TARGET)" \ |
2198e4ba MT |
269 | "INSTALL=$(INSTALL)" \ |
270 | "INSTALL_DATA=$(INSTALL_DATA)" \ | |
440868a0 | 271 | "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ |
f35c6160 | 272 | "INSTALL_XFORM=$(INSTALL_XFORM)" \ |
378fd382 DZ |
273 | "LDFLAGS=$(LDFLAGS)" \ |
274 | "LEX=$(LEX)" \ | |
3585593d BK |
275 | "LIBCFLAGS=$(LIBCFLAGS)" \ |
276 | "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \ | |
04103845 DE |
277 | "LIBCXXFLAGS=$(LIBCXXFLAGS)" \ |
278 | "LIBCXXFLAGS_FOR_TARGET=$(LIBCXXFLAGS_FOR_TARGET)" \ | |
65e21701 | 279 | "M4=$(M4)" \ |
9823504d | 280 | "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \ |
0ef4728f | 281 | "NM_FOR_TARGET=$(NM_FOR_TARGET)" \ |
04103845 DE |
282 | "PICFLAG=$(PICFLAG)" \ |
283 | "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \ | |
d09de70e | 284 | "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \ |
49dfa984 | 285 | "SHELL=$(SHELL)" \ |
a54e05f6 | 286 | "EXPECT=$(EXPECT)" \ |
6a42d184 | 287 | "RUNTEST=$(RUNTEST)" \ |
86365152 | 288 | "RUNTESTFLAGS=$(RUNTESTFLAGS)" \ |
5cc73086 | 289 | "YACC=$(BISON)" \ |
378fd382 DZ |
290 | "exec_prefix=$(exec_prefix)" \ |
291 | "prefix=$(prefix)" \ | |
292 | "tooldir=$(tooldir)" | |
2198e4ba | 293 | |
0ef4728f ILT |
294 | # Flags to pass down to most sub-makes, in which we're building with |
295 | # the host environment. | |
6d681784 | 296 | # If any variables are added here, they must be added to do-*, below. |
0ef4728f | 297 | EXTRA_HOST_FLAGS = \ |
6d681784 JG |
298 | 'AR=$(AR)' \ |
299 | 'AS=$(AS)' \ | |
300 | 'CC=$(CC)' \ | |
301 | 'CXX=$(CXX)' \ | |
302 | 'NM=$(NM)' \ | |
753d5049 | 303 | 'RANLIB=$(RANLIB)' |
0ef4728f ILT |
304 | |
305 | FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) | |
306 | ||
d1bea4c7 DZ |
307 | # Flags that are concerned with the location of the X11 include files |
308 | # and library files | |
309 | X11_FLAGS_TO_PASS = \ | |
310 | "X11_INCLUDE_FLAGS=$(X11_INCLUDE_FLAGS)" \ | |
f980fcfb JG |
311 | "X11_LIB_FLAGS=$(X11_LIB_FLAGS)" \ |
312 | "X11_LIB=$(X11_LIB)" | |
d1bea4c7 | 313 | |
0ef4728f ILT |
314 | # Flags to pass down to makes which are built with the target environment. |
315 | # The double $ decreases the length of the command line; the variables | |
316 | # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them. | |
6d681784 | 317 | # If any variables are added here, they must be added to do-*, below. |
0ef4728f ILT |
318 | EXTRA_TARGET_FLAGS = \ |
319 | 'AR=$$(AR_FOR_TARGET)' \ | |
320 | 'AS=$$(AS_FOR_TARGET)' \ | |
321 | 'CC=$$(CC_FOR_TARGET)' \ | |
3585593d | 322 | 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \ |
0ef4728f | 323 | 'CXX=$$(CXX_FOR_TARGET)' \ |
3585593d | 324 | 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \ |
a220ba0f | 325 | 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \ |
3585593d BK |
326 | 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \ |
327 | 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \ | |
0ef4728f | 328 | 'NM=$$(NM_FOR_TARGET)' \ |
04103845 | 329 | 'PICFLAG=$$(PICFLAG_FOR_TARGET)' \ |
753d5049 | 330 | 'RANLIB=$$(RANLIB_FOR_TARGET)' |
0ef4728f ILT |
331 | |
332 | TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) | |
51489233 | 333 | |
f4e414f1 ILT |
334 | # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it |
335 | # unfortunately needs the native compiler and the target ar and | |
0ef4728f | 336 | # ranlib. |
66957ce4 ILT |
337 | # If any variables are added here, they must be added to do-*, below. |
338 | # The HOST_* variables are a special case, which are used for the gcc | |
339 | # cross-building scheme. | |
0ef4728f ILT |
340 | EXTRA_GCC_FLAGS = \ |
341 | 'AR=$$(AR_FOR_TARGET)' \ | |
6d681784 JG |
342 | 'AS=$(AS)' \ |
343 | 'CC=$(CC)' \ | |
344 | 'CXX=$(CXX)' \ | |
a54e05f6 KR |
345 | 'HOST_CC=$(CC_FOR_BUILD)' \ |
346 | 'HOST_PREFIX=$(HOST_PREFIX)' \ | |
347 | 'HOST_PREFIX_1=$(HOST_PREFIX_1)' \ | |
6d681784 | 348 | 'NM=$(NM)' \ |
753d5049 | 349 | 'RANLIB=$$(RANLIB_FOR_TARGET)' |
0ef4728f | 350 | |
34b3298b | 351 | GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) |
f4e414f1 | 352 | |
6a42d184 | 353 | # This is a list of the targets for all of the modules which are compiled |
79337c85 ILT |
354 | # using $(FLAGS_TO_PASS). |
355 | ALL_MODULES = \ | |
356 | all-autoconf \ | |
357 | all-bfd \ | |
358 | all-binutils \ | |
359 | all-byacc \ | |
360 | all-cvs \ | |
361 | all-dejagnu \ | |
362 | all-diff \ | |
ac259c28 | 363 | all-dosutils \ |
79337c85 ILT |
364 | all-etc \ |
365 | all-fileutils \ | |
366 | all-find \ | |
367 | all-flex \ | |
368 | all-gas \ | |
369 | all-gawk \ | |
79337c85 ILT |
370 | all-gprof \ |
371 | all-grep \ | |
372 | all-gzip \ | |
373 | all-hello \ | |
374 | all-indent \ | |
375 | all-ispell \ | |
376 | all-ld \ | |
377 | all-libiberty \ | |
378 | all-m4 \ | |
379 | all-make \ | |
380 | all-mmalloc \ | |
381 | all-opcodes \ | |
382 | all-patch \ | |
383 | all-prms \ | |
384 | all-rcs \ | |
385 | all-readline \ | |
275049c0 | 386 | all-release \ |
79337c85 ILT |
387 | all-recode \ |
388 | all-sed \ | |
389 | all-send-pr \ | |
390 | all-shellutils \ | |
391 | all-sim \ | |
392 | all-tar \ | |
393 | all-tcl \ | |
394 | all-texinfo \ | |
395 | all-textutils \ | |
396 | all-tgas \ | |
397 | all-time \ | |
398 | all-uudecode \ | |
753d5049 SC |
399 | all-wdiff |
400 | ||
6a42d184 DZ |
401 | # This is a list of the check targets for all of the modules which are |
402 | # compiled using $(FLAGS_TO_PASS). | |
4f0b8f27 TL |
403 | # This is a list of the check targets for all of the modules which are |
404 | # compiled using $(FLAGS_TO_PASS). | |
405 | # | |
d237841c BC |
406 | # The list is in two parts. The first lists those tools which |
407 | # are tested as part of the host's native tool-chain, and not | |
408 | # tested in a cross configuration. | |
409 | NATIVE_CHECK_MODULES = \ | |
410 | check-byacc \ | |
4f0b8f27 TL |
411 | check-flex |
412 | ||
d237841c | 413 | CROSS_CHECK_MODULES = \ |
6a42d184 DZ |
414 | check-autoconf \ |
415 | check-bfd \ | |
416 | check-binutils \ | |
6a42d184 DZ |
417 | check-cvs \ |
418 | check-dejagnu \ | |
419 | check-diff \ | |
420 | check-etc \ | |
421 | check-fileutils \ | |
422 | check-find \ | |
6a42d184 DZ |
423 | check-gas \ |
424 | check-gawk \ | |
6a42d184 DZ |
425 | check-gprof \ |
426 | check-grep \ | |
427 | check-gzip \ | |
428 | check-hello \ | |
429 | check-indent \ | |
430 | check-ispell \ | |
431 | check-ld \ | |
432 | check-libiberty \ | |
433 | check-m4 \ | |
434 | check-make \ | |
435 | check-mmcheckoc \ | |
436 | check-opcodes \ | |
437 | check-patch \ | |
438 | check-prms \ | |
439 | check-rcs \ | |
440 | check-readline \ | |
441 | check-recode \ | |
442 | check-sed \ | |
443 | check-send-pr \ | |
444 | check-shellutils \ | |
445 | check-sim \ | |
446 | check-tar \ | |
447 | check-tcl \ | |
448 | check-texinfo \ | |
449 | check-textutils \ | |
450 | check-tgas \ | |
451 | check-time \ | |
452 | check-uudecode \ | |
453 | check-wdiff | |
d237841c BC |
454 | |
455 | CHECK_MODULES=$(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES) | |
6a42d184 DZ |
456 | |
457 | # This is a list of the install targets for all of the modules which are | |
79337c85 ILT |
458 | # compiled using $(FLAGS_TO_PASS). |
459 | INSTALL_MODULES = \ | |
460 | install-autoconf \ | |
461 | install-bfd \ | |
462 | install-binutils \ | |
463 | install-byacc \ | |
464 | install-cvs \ | |
465 | install-dejagnu \ | |
466 | install-diff \ | |
753d5049 | 467 | install-dosutils \ |
79337c85 ILT |
468 | install-etc \ |
469 | install-fileutils \ | |
470 | install-find \ | |
471 | install-flex \ | |
472 | install-gas \ | |
473 | install-gawk \ | |
79337c85 ILT |
474 | install-gprof \ |
475 | install-grep \ | |
476 | install-gzip \ | |
477 | install-hello \ | |
478 | install-indent \ | |
479 | install-ispell \ | |
480 | install-ld \ | |
481 | install-libiberty \ | |
482 | install-m4 \ | |
483 | install-make \ | |
484 | install-mmalloc \ | |
485 | install-opcodes \ | |
486 | install-patch \ | |
487 | install-prms \ | |
488 | install-rcs \ | |
489 | install-readline \ | |
490 | install-recode \ | |
491 | install-sed \ | |
492 | install-send-pr \ | |
493 | install-shellutils \ | |
494 | install-sim \ | |
495 | install-tar \ | |
496 | install-tcl \ | |
497 | install-texinfo \ | |
498 | install-textutils \ | |
499 | install-tgas \ | |
500 | install-time \ | |
501 | install-uudecode \ | |
502 | install-wdiff | |
503 | ||
6a42d184 | 504 | # This is a list of the targets for all of the modules which are compiled |
79337c85 ILT |
505 | # using $(X11_FLAGS_TO_PASS). |
506 | ALL_X11_MODULES = \ | |
507 | all-emacs \ | |
4d802af9 | 508 | all-emacs19 \ |
04103845 | 509 | all-gdb \ |
79337c85 | 510 | all-expect \ |
65e21701 | 511 | all-gash \ |
79337c85 ILT |
512 | all-tclX \ |
513 | all-tk | |
514 | ||
6a42d184 DZ |
515 | # This is a list of the check targets for all of the modules which are |
516 | # compiled using $(X11_FLAGS_TO_PASS). | |
517 | CHECK_X11_MODULES = \ | |
518 | check-emacs \ | |
04103845 | 519 | check-gdb \ |
6a42d184 | 520 | check-expect \ |
65e21701 | 521 | check-gash \ |
6a42d184 DZ |
522 | check-tclX \ |
523 | check-tk | |
524 | ||
79337c85 ILT |
525 | # This is a list of the install targets for all the modules which are |
526 | # compiled using $(X11_FLAGS_TO_PASS). | |
527 | INSTALL_X11_MODULES = \ | |
528 | install-emacs \ | |
4d802af9 | 529 | install-emacs19 \ |
04103845 | 530 | install-gdb \ |
79337c85 | 531 | install-expect \ |
65e21701 | 532 | install-gash \ |
79337c85 ILT |
533 | install-tclX \ |
534 | install-tk | |
fca4f908 | 535 | |
6a42d184 | 536 | # This is a list of the targets for all of the modules which are compiled |
79337c85 ILT |
537 | # using $(TARGET_FLAGS_TO_PASS). |
538 | ALL_TARGET_MODULES = \ | |
539 | $(start-sanitize-chill) \ | |
540 | all-chillrt \ | |
541 | $(end-sanitize-chill) \ | |
6214eb23 | 542 | all-libio \ |
4be4b991 | 543 | all-libstdc++ \ |
1d5fcc66 | 544 | all-librx \ |
79337c85 ILT |
545 | all-libg++ \ |
546 | all-newlib \ | |
15408b3b | 547 | all-libgloss \ |
79337c85 ILT |
548 | all-xiberty |
549 | ||
6a42d184 DZ |
550 | # This is a list of the check targets for all of the modules which are |
551 | # compiled using $(TARGET_FLAGS_TO_PASS). | |
552 | CHECK_TARGET_MODULES = \ | |
553 | $(start-sanitize-chill) \ | |
554 | check-chillrt \ | |
555 | $(end-sanitize-chill) \ | |
6214eb23 | 556 | check-libio \ |
4be4b991 | 557 | check-libstdc++ \ |
6a42d184 DZ |
558 | check-libg++ \ |
559 | check-newlib \ | |
560 | check-xiberty | |
561 | ||
562 | # This is a list of the install targets for all of the modules which are | |
79337c85 ILT |
563 | # compiled using $(TARGET_FLAGS_TO_PASS). |
564 | INSTALL_TARGET_MODULES = \ | |
565 | $(start-sanitize-chill) \ | |
566 | install-chillrt \ | |
567 | $(end-sanitize-chill) \ | |
6214eb23 | 568 | install-libio \ |
4be4b991 | 569 | install-libstdc++ \ |
79337c85 ILT |
570 | install-libg++ \ |
571 | install-newlib \ | |
15408b3b | 572 | install-libgloss \ |
79337c85 | 573 | install-xiberty |
4d714963 | 574 | |
79337c85 ILT |
575 | # This is a shell case of all modules which are compiled using |
576 | # $(TARGET_FLAGS_TO_PASS), used in the do-X rule. | |
4be4b991 | 577 | TARGET_LIBS = libio | libstdc++ | librx | libg++ | newlib | xiberty |
a4e879a1 | 578 | # start-sanitize-chill |
4be4b991 | 579 | TARGET_LIBS = chillrt | libio | libstdc++ | librx | libg++ | newlib | xiberty |
a4e879a1 | 580 | # end-sanitize-chill |
7481617f | 581 | |
79337c85 | 582 | # The first rule in the file had better be this one. Don't put any above it. |
a59b94d2 | 583 | all: all.normal |
79337c85 ILT |
584 | .PHONY: all |
585 | ||
586 | # The target built for a native build. | |
587 | .PHONY: all.normal | |
588 | all.normal: \ | |
589 | $(ALL_MODULES) \ | |
590 | $(ALL_TARGET_MODULES) \ | |
46d0ca81 | 591 | $(ALL_X11_MODULES) \ |
79337c85 ILT |
592 | all-gcc |
593 | ||
0ef4728f | 594 | # Do a target for all the subdirectories. A ``make do-X'' will do a |
53222cbd RP |
595 | # ``make X'' in all subdirectories (because, in general, there is a |
596 | # dependency (below) of X upon do-X, a ``make X'' will also do this, | |
597 | # but it may do additional work as well). | |
0ef4728f ILT |
598 | # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once, |
599 | # because it is so large that it can easily overflow the command line | |
600 | # length limit on some systems. | |
79337c85 | 601 | DO_X = \ |
79337c85 ILT |
602 | do-clean \ |
603 | do-distclean \ | |
604 | do-dvi \ | |
605 | do-info \ | |
606 | do-install-info \ | |
607 | do-installcheck \ | |
608 | do-mostlyclean \ | |
753d5049 SC |
609 | do-realclean \ |
610 | do-TAGS | |
79337c85 ILT |
611 | .PHONY: $(DO_X) |
612 | $(DO_X): | |
0ef4728f | 613 | @target=`echo $@ | sed -e 's/^do-//'`; \ |
5cc73086 | 614 | r=`pwd`; export r; \ |
0ef4728f ILT |
615 | srcroot=`cd $(srcdir); pwd`; export srcroot; \ |
616 | for i in $(SUBDIRS); do \ | |
36286a3e | 617 | if [ -f ./$$i/Makefile ]; then \ |
0ef4728f ILT |
618 | case $$i in \ |
619 | $(TARGET_LIBS) ) \ | |
6d681784 JG |
620 | for flag in $(EXTRA_TARGET_FLAGS); do \ |
621 | eval `echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \ | |
622 | done; \ | |
0ef4728f ILT |
623 | ;; \ |
624 | gcc) \ | |
6d681784 JG |
625 | for flag in $(EXTRA_GCC_FLAGS); do \ |
626 | eval `echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \ | |
627 | done; \ | |
0ef4728f ILT |
628 | ;; \ |
629 | *) \ | |
6d681784 JG |
630 | for flag in $(EXTRA_HOST_FLAGS); do \ |
631 | eval `echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \ | |
632 | done; \ | |
0ef4728f ILT |
633 | ;; \ |
634 | esac ; \ | |
753d5049 | 635 | export AR AS CC CXX NM RANLIB; \ |
0ef4728f | 636 | if (cd ./$$i; \ |
6d681784 JG |
637 | $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ |
638 | "CC=$${CC}" "CXX=$${CXX}" "NM=$${NM}" \ | |
753d5049 | 639 | "RANLIB=$${RANLIB}" \ |
6d681784 | 640 | $${target}); \ |
0ef4728f ILT |
641 | then true; else exit 1; fi; \ |
642 | else true; fi; \ | |
643 | done | |
fb90daeb | 644 | |
79337c85 ILT |
645 | # Here are the targets which correspond to the do-X targets. |
646 | ||
65088029 | 647 | .PHONY: info installcheck dvi install-info |
79337c85 | 648 | .PHONY: clean distclean mostlyclean realclean local-clean local-distclean |
0ef4728f | 649 | info: do-info |
1a14993c | 650 | installcheck: do-installcheck |
0ef4728f | 651 | dvi: do-dvi |
9a9e8e7f | 652 | |
f35c6160 DZ |
653 | install-info: do-install-info dir.info |
654 | srcroot=`cd $(srcdir); pwd`; export srcroot; \ | |
72c09fbc SC |
655 | if [ -f dir.info ] ; then \ |
656 | $(INSTALL_DATA) dir.info $(infodir)/dir.info ; \ | |
50fbe976 | 657 | else true ; fi |
4d714963 | 658 | |
0ef4728f | 659 | local-clean: |
7fed4078 | 660 | -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E |
3b30df82 | 661 | |
0ef4728f | 662 | local-distclean: |
7fed4078 | 663 | -rm -f Makefile config.status |
7fcfdcf7 | 664 | |
0ef4728f ILT |
665 | clean: do-clean local-clean |
666 | mostlyclean: do-mostlyclean local-clean | |
667 | distclean: do-distclean local-clean local-distclean | |
668 | realclean: do-realclean local-clean local-distclean | |
669 | ||
65088029 ILT |
670 | # Check target. |
671 | ||
672 | .PHONY: check | |
673 | check: $(CHECK_MODULES) \ | |
674 | $(CHECK_TARGET_MODULES) \ | |
675 | $(CHECK_X11_MODULES) \ | |
676 | check-gcc | |
677 | ||
79337c85 | 678 | # Installation targets. |
4d714963 | 679 | |
04103845 | 680 | .PHONY: install uninstall source-vault binary-vault vault-install |
98a33b6d | 681 | install: $(INSTALL_TARGET) |
b26ff9d8 | 682 | |
79337c85 ILT |
683 | uninstall: |
684 | @echo "the uninstall target is not supported in this tree" | |
685 | ||
04103845 DE |
686 | source-vault: |
687 | $(MAKE) -f ./release/Build-A-Release \ | |
688 | host=$(host_alias) source-vault | |
689 | ||
690 | binary-vault: | |
691 | $(MAKE) -f ./release/Build-A-Release \ | |
692 | host=$(host_alias) target=$(target_alias) | |
693 | ||
275049c0 JK |
694 | vault-install: |
695 | @if [ -f ./release/vault-install ] ; then \ | |
696 | ./release/vault-install $(host_alias) $(target_alias) ; \ | |
96bfa612 KR |
697 | else \ |
698 | true ; \ | |
275049c0 JK |
699 | fi |
700 | ||
79337c85 | 701 | .PHONY: install.all |
06a07944 RP |
702 | install.all: install-no-fixedincludes |
703 | @if [ -f ./gcc/Makefile ] ; then \ | |
5cc73086 | 704 | r=`pwd` ; export r ; \ |
06a07944 RP |
705 | (cd ./gcc; \ |
706 | $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \ | |
707 | else \ | |
708 | true ; \ | |
709 | fi | |
5a63b336 | 710 | |
96bfa612 | 711 | # install-no-fixedincludes is used because Cygnus can not distribute |
79337c85 ILT |
712 | # the fixed header files. |
713 | .PHONY: install-no-fixedincludes | |
714 | install-no-fixedincludes: \ | |
715 | install-dirs \ | |
79337c85 ILT |
716 | $(INSTALL_MODULES) \ |
717 | $(INSTALL_TARGET_MODULES) \ | |
96bfa612 | 718 | $(INSTALL_X11_MODULES) \ |
f35c6160 | 719 | gcc-no-fixedincludes |
d1bea4c7 | 720 | |
5cc24596 | 721 | # Install the gcc headers files, but not the fixed include files, |
79337c85 ILT |
722 | # which Cygnus is not allowed to distribute. This rule is very |
723 | # dependent on the workings of the gcc Makefile.in. | |
724 | .PHONY: gcc-no-fixedincludes | |
06a07944 | 725 | gcc-no-fixedincludes: |
5cc24596 PB |
726 | @if [ -f ./gcc/Makefile ]; then \ |
727 | rm -rf gcc/tmp-include; \ | |
728 | mv gcc/include gcc/tmp-include 2>/dev/null; \ | |
729 | mkdir gcc/include; \ | |
7f9cb3b2 | 730 | cp $(srcdir)/gcc/gsyslimits.h gcc/include/syslimits.h; \ |
753d5049 | 731 | touch gcc/stmp-fixinc gcc/include/fixed; \ |
a54e05f6 | 732 | rm -f gcc/stmp-headers gcc/stmp-int-hdrs; \ |
5cc73086 | 733 | r=`pwd`; export r; \ |
5cc24596 PB |
734 | srcroot=`cd $(srcdir); pwd` ; export srcroot; \ |
735 | (cd ./gcc; \ | |
736 | $(MAKE) $(GCC_FLAGS_TO_PASS) install); \ | |
737 | rm -rf gcc/include; \ | |
738 | mv gcc/tmp-include gcc/include 2>/dev/null; \ | |
739 | else true; fi | |
dcbfc14d | 740 | |
79337c85 ILT |
741 | # This rule is used to build the modules which use FLAGS_TO_PASS. To |
742 | # build a target all-X means to cd to X and make all. | |
3de70f1d | 743 | # |
055cca84 | 744 | # all-gui, and all-libproc are handled specially because |
4d802af9 MT |
745 | # they are still experimental, and if they fail to build, that |
746 | # shouldn't stop "make all". | |
04103845 DE |
747 | .PHONY: $(ALL_MODULES) all-gui all-libproc |
748 | $(ALL_MODULES) all-gui all-libproc: | |
79337c85 | 749 | @dir=`echo $@ | sed -e 's/all-//'`; \ |
472af17f ILT |
750 | if [ -f ./$${dir}/Makefile ] ; then \ |
751 | r=`pwd`; export r; \ | |
752 | srcroot=`cd $(srcdir); pwd`; export srcroot; \ | |
753 | (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) all); \ | |
07362bd9 | 754 | else \ |
79337c85 | 755 | true; \ |
07362bd9 DZ |
756 | fi |
757 | ||
80cbf870 ILT |
758 | # These rules are used to check the modules which use FLAGS_TO_PASS. |
759 | # To build a target check-X means to cd to X and make check. Some | |
760 | # modules are only tested in a native toolchain. | |
4f0b8f27 | 761 | |
d237841c BC |
762 | .PHONY: $(CHECK_MODULES) $(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES) |
763 | $(NATIVE_CHECK_MODULES): | |
39cc6dae RS |
764 | @if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ |
765 | dir=`echo $@ | sed -e 's/check-//'`; \ | |
472af17f ILT |
766 | if [ -f ./$${dir}/Makefile ] ; then \ |
767 | r=`pwd`; export r; \ | |
768 | srcroot=`cd $(srcdir); pwd`; export srcroot; \ | |
769 | (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \ | |
770 | else \ | |
771 | true; \ | |
4f0b8f27 TL |
772 | fi; \ |
773 | fi | |
774 | ||
775 | $(CROSS_CHECK_MODULES): | |
6a42d184 DZ |
776 | @dir=`echo $@ | sed -e 's/check-//'`; \ |
777 | if [ -f ./$${dir}/Makefile ] ; then \ | |
5cc73086 | 778 | r=`pwd`; export r; \ |
6a42d184 DZ |
779 | srcroot=`cd $(srcdir); pwd`; export srcroot; \ |
780 | (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \ | |
781 | else \ | |
782 | true; \ | |
783 | fi | |
784 | ||
79337c85 ILT |
785 | # This rule is used to install the modules which use FLAGS_TO_PASS. |
786 | # To build a target install-X means to cd to X and make install. | |
787 | .PHONY: $(INSTALL_MODULES) | |
788 | $(INSTALL_MODULES): install-dirs | |
789 | @dir=`echo $@ | sed -e 's/install-//'`; \ | |
790 | if [ -f ./$${dir}/Makefile ] ; then \ | |
5cc73086 | 791 | r=`pwd`; export r; \ |
79337c85 | 792 | srcroot=`cd $(srcdir); pwd`; export srcroot; \ |
f35c6160 | 793 | (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \ |
07362bd9 | 794 | else \ |
79337c85 | 795 | true; \ |
07362bd9 DZ |
796 | fi |
797 | ||
6a42d184 DZ |
798 | # This rule is used to build the modules which use TARGET_FLAGS_TO_PASS. |
799 | # To build a target all-X means to cd to X and make all. | |
79337c85 ILT |
800 | .PHONY: $(ALL_TARGET_MODULES) |
801 | $(ALL_TARGET_MODULES): | |
802 | @dir=`echo $@ | sed -e 's/all-//'`; \ | |
803 | if [ -f ./$${dir}/Makefile ] ; then \ | |
5cc73086 | 804 | r=`pwd`; export r; \ |
79337c85 ILT |
805 | srcroot=`cd $(srcdir); pwd`; export srcroot; \ |
806 | (cd $${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \ | |
07362bd9 | 807 | else \ |
79337c85 | 808 | true; \ |
07362bd9 DZ |
809 | fi |
810 | ||
6a42d184 DZ |
811 | # This rule is used to check the modules which use TARGET_FLAGS_TO_PASS. |
812 | # To build a target install-X means to cd to X and make install. | |
813 | .PHONY: $(CHECK_TARGET_MODULES) | |
814 | $(CHECK_TARGET_MODULES): | |
815 | @dir=`echo $@ | sed -e 's/check-//'`; \ | |
816 | if [ -f ./$${dir}/Makefile ] ; then \ | |
5cc73086 | 817 | r=`pwd`; export r; \ |
6a42d184 DZ |
818 | srcroot=`cd $(srcdir); pwd`; export srcroot; \ |
819 | (cd $${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) check); \ | |
820 | else \ | |
821 | true; \ | |
822 | fi | |
823 | ||
79337c85 ILT |
824 | # This rule is used to install the modules which use |
825 | # TARGET_FLAGS_TO_PASS. To build a target install-X means to cd to X | |
826 | # and make install. | |
827 | .PHONY: $(INSTALL_TARGET_MODULES) | |
828 | $(INSTALL_TARGET_MODULES): install-dirs | |
829 | @dir=`echo $@ | sed -e 's/install-//'`; \ | |
830 | if [ -f ./$${dir}/Makefile ] ; then \ | |
5cc73086 | 831 | r=`pwd`; export r; \ |
79337c85 ILT |
832 | srcroot=`cd $(srcdir); pwd`; export srcroot; \ |
833 | (cd $${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) install); \ | |
07362bd9 | 834 | else \ |
79337c85 | 835 | true; \ |
07362bd9 DZ |
836 | fi |
837 | ||
6a42d184 | 838 | # This rule is used to build the modules which use X11_FLAGS_TO_PASS. |
79337c85 ILT |
839 | # To build a target all-X means to cd to X and make all. |
840 | .PHONY: $(ALL_X11_MODULES) | |
841 | $(ALL_X11_MODULES): | |
842 | @dir=`echo $@ | sed -e 's/all-//'`; \ | |
843 | if [ -f ./$${dir}/Makefile ] ; then \ | |
5cc73086 | 844 | r=`pwd`; export r; \ |
79337c85 ILT |
845 | srcroot=`cd $(srcdir); pwd`; export srcroot; \ |
846 | (cd $${dir}; \ | |
847 | $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all); \ | |
07362bd9 | 848 | else \ |
79337c85 | 849 | true; \ |
07362bd9 DZ |
850 | fi |
851 | ||
6a42d184 DZ |
852 | # This rule is used to check the modules which use X11_FLAGS_TO_PASS. |
853 | # To build a target check-X means to cd to X and make all. | |
854 | .PHONY: $(CHECK_X11_MODULES) | |
855 | $(CHECK_X11_MODULES): | |
856 | @dir=`echo $@ | sed -e 's/check-//'`; \ | |
857 | if [ -f ./$${dir}/Makefile ] ; then \ | |
5cc73086 | 858 | r=`pwd`; export r; \ |
6a42d184 DZ |
859 | srcroot=`cd $(srcdir); pwd`; export srcroot; \ |
860 | (cd $${dir}; \ | |
861 | $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check); \ | |
862 | else \ | |
863 | true; \ | |
864 | fi | |
865 | ||
866 | # This rule is used to install the modules which use X11_FLAGS_TO_PASS. | |
79337c85 ILT |
867 | # To build a target install-X means to cd to X and make install. |
868 | .PHONY: $(INSTALL_X11_MODULES) | |
869 | $(INSTALL_X11_MODULES): | |
6a42d184 | 870 | @dir=`echo $@ | sed -e 's/install-//'`; \ |
79337c85 | 871 | if [ -f ./$${dir}/Makefile ] ; then \ |
5cc73086 | 872 | r=`pwd`; export r; \ |
79337c85 ILT |
873 | srcroot=`cd $(srcdir); pwd`; export srcroot; \ |
874 | (cd $${dir}; \ | |
875 | $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install); \ | |
07362bd9 | 876 | else \ |
79337c85 | 877 | true; \ |
07362bd9 DZ |
878 | fi |
879 | ||
79337c85 ILT |
880 | # gcc is the only module which uses GCC_FLAGS_TO_PASS. |
881 | .PHONY: all-gcc | |
882 | all-gcc: | |
883 | @if [ -f ./gcc/Makefile ] ; then \ | |
5cc73086 | 884 | r=`pwd`; export r; \ |
79337c85 ILT |
885 | srcroot=`cd $(srcdir); pwd`; export srcroot; \ |
886 | (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) all); \ | |
07362bd9 | 887 | else \ |
79337c85 | 888 | true; \ |
07362bd9 DZ |
889 | fi |
890 | ||
65088029 ILT |
891 | .PHONY: check-gcc |
892 | check-gcc: | |
893 | @if [ -f ./gcc/Makefile ] ; then \ | |
5cc73086 | 894 | r=`pwd`; export r; \ |
65088029 ILT |
895 | srcroot=`cd $(srcdir); pwd`; export srcroot; \ |
896 | (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check); \ | |
897 | else \ | |
898 | true; \ | |
899 | fi | |
900 | ||
79337c85 ILT |
901 | .PHONY: install-gcc |
902 | install-gcc: | |
903 | @if [ -f ./gcc/Makefile ] ; then \ | |
5cc73086 | 904 | r=`pwd`; export r; \ |
79337c85 ILT |
905 | srcroot=`cd $(srcdir); pwd`; export srcroot; \ |
906 | (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) install); \ | |
07362bd9 | 907 | else \ |
79337c85 | 908 | true; \ |
07362bd9 DZ |
909 | fi |
910 | ||
753d5049 SC |
911 | |
912 | # EXPERIMENTAL STUFF | |
913 | # This rule is used to install the modules which use FLAGS_TO_PASS. | |
914 | # To build a target install-X means to cd to X and make install. | |
09985c96 SC |
915 | .PHONY: install-dosrel |
916 | install-dosrel: install-dirs info | |
753d5049 SC |
917 | @dir=`echo $@ | sed -e 's/install-//'`; \ |
918 | if [ -f ./$${dir}/Makefile ] ; then \ | |
919 | r=`pwd`; export r; \ | |
920 | srcroot=`cd $(srcdir); pwd`; export srcroot; \ | |
921 | (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \ | |
922 | else \ | |
923 | true; \ | |
924 | fi | |
925 | ||
09985c96 | 926 | install-dosrel-fake: |
a987271c | 927 | |
753d5049 | 928 | |
79337c85 | 929 | # This is a list of inter-dependencies among modules. |
65e21701 | 930 | all-autoconf: all-m4 |
79337c85 | 931 | all-bfd: |
dfe44004 | 932 | all-binutils: all-libiberty all-opcodes all-bfd all-flex all-byacc |
79337c85 ILT |
933 | all-byacc: |
934 | # start-sanitize-chill | |
935 | all-chillrt: all-binutils all-gas all-gcc all-newlib | |
936 | # end-sanitize-chill | |
937 | all-cvs: | |
4d802af9 | 938 | all-dejagnu: all-tcl all-expect all-tk |
79337c85 ILT |
939 | all-diff: all-libiberty |
940 | all-emacs: | |
1d5fcc66 | 941 | all-emacs19: all-byacc |
79337c85 | 942 | all-etc: |
c6ba9ae0 | 943 | all-expect: all-tcl all-tk |
275049c0 | 944 | all-fileutils: all-libiberty |
79337c85 | 945 | all-find: |
7dcc0664 | 946 | all-flex: all-libiberty all-byacc |
79337c85 | 947 | all-gas: all-libiberty all-opcodes all-bfd |
65e21701 | 948 | all-gash: all-tcl |
79337c85 | 949 | all-gawk: |
04103845 DE |
950 | all-gcc: all-libiberty all-byacc all-binutils all-gas all-ld |
951 | all-gdb: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-byacc all-sim $(gdbnlmrequirements) | |
79337c85 | 952 | all-gprof: all-libiberty all-bfd |
6214eb23 | 953 | all-grep: all-libiberty |
4d802af9 | 954 | all-gui: all-gdb all-libproc all-librx |
79337c85 ILT |
955 | all-gzip: all-libiberty |
956 | all-hello: all-libiberty | |
957 | all-indent: | |
3585593d | 958 | all-ispell: all-emacs19 |
79337c85 | 959 | all-ld: all-libiberty all-bfd all-byacc all-flex |
04103845 | 960 | all-libg++: all-gas all-ld all-gcc all-xiberty all-newlib all-libio all-librx all-libstdc++ |
ea6d5817 | 961 | all-libio: all-gas all-ld all-gcc all-xiberty all-newlib |
79337c85 | 962 | all-libiberty: |
ea6d5817 | 963 | all-libstdc++: all-gas all-ld all-gcc all-xiberty all-newlib all-libio |
79337c85 ILT |
964 | all-m4: all-libiberty |
965 | all-make: all-libiberty | |
966 | all-mmalloc: | |
ea6d5817 | 967 | all-newlib: all-binutils all-gas all-gcc |
275049c0 | 968 | all-opcodes: all-bfd |
79337c85 | 969 | all-patch: |
b255ccdb | 970 | all-prms: all-libiberty |
79337c85 ILT |
971 | all-rcs: |
972 | all-readline: | |
973 | all-recode: all-libiberty | |
ac259c28 JM |
974 | all-sed: all-libiberty |
975 | all-send-pr: all-prms | |
79337c85 ILT |
976 | all-shellutils: |
977 | all-sim: all-libiberty all-bfd | |
07362bd9 | 978 | all-tar: all-libiberty |
79337c85 ILT |
979 | all-tcl: |
980 | all-tclX: all-tcl all-tk | |
981 | all-tk: all-tcl | |
982 | all-texinfo: all-libiberty | |
983 | all-textutils: | |
984 | all-tgas: all-libiberty all-bfd | |
985 | all-time: | |
986 | all-wdiff: | |
987 | all-uudecode: all-libiberty | |
055cca84 | 988 | all-xiberty: all-gcc all-ld all-newlib |
07362bd9 | 989 | |
79337c85 | 990 | ### other supporting targets |
07362bd9 | 991 | |
79337c85 ILT |
992 | MAKEDIRS= \ |
993 | $(prefix) \ | |
994 | $(exec_prefix) \ | |
995 | $(tooldir) | |
fca4f908 | 996 | |
79337c85 ILT |
997 | .PHONY: install-dirs |
998 | install-dirs: | |
999 | @for i in $(MAKEDIRS) ; do \ | |
1000 | echo Making $$i... ; \ | |
62cd4a20 | 1001 | parent=`echo $$i | sed -e 's@/[^/]*$$@@' | sed -e 's@^$$@/@'`; \ |
79337c85 ILT |
1002 | if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi ; \ |
1003 | if [ ! -d $$i ] ; then \ | |
1004 | if mkdir $$i ; then \ | |
1005 | true ; \ | |
1006 | else \ | |
1007 | exit 1 ; \ | |
1008 | fi ; \ | |
1009 | else \ | |
1010 | true ; \ | |
1011 | fi ; \ | |
1012 | done | |
23e3e7f9 | 1013 | |
618f57a9 | 1014 | |
79337c85 ILT |
1015 | dir.info: do-install-info |
1016 | if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \ | |
1017 | $(srcdir)/texinfo/gen-info-dir $(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \ | |
1018 | mv -f dir.info.new dir.info ; \ | |
1019 | else true ; \ | |
72c09fbc | 1020 | fi |
6b7e5998 | 1021 | |
b1cceba2 DZ |
1022 | dist: |
1023 | @echo "Building a full distribution of this tree isn't done" | |
1024 | @echo "via 'make dist'. Check out the etc/ subdirectory" | |
1025 | ||
eb02fd64 RP |
1026 | etags tags: TAGS |
1027 | ||
753d5049 SC |
1028 | # Right now this just builds TAGS in each subdirectory. emacs19 has the |
1029 | # ability to use several tags files at once, so there is probably no need | |
1030 | # to combine them into one big TAGS file (like CVS 1.3 does). We could | |
1031 | # (if we felt like it) have this Makefile write a piece of elisp which | |
1032 | # the user could load to tell emacs19 where all the TAGS files we just | |
1033 | # built are. | |
1034 | TAGS: do-TAGS | |
eb02fd64 | 1035 | |
eb02fd64 RP |
1036 | # with the gnu make, this is done automatically. |
1037 | ||
01ec9588 | 1038 | Makefile: Makefile.in configure.in $(host_makefile_frag) $(target_makefile_frag) |
a26878d1 | 1039 | $(SHELL) ./config.status |
eb02fd64 | 1040 | |
11954bf1 | 1041 | # |
01ec9588 | 1042 | # Support for building net releases |
11954bf1 | 1043 | |
01ec9588 JK |
1044 | # Files in devo used in any net release. |
1045 | # ChangeLog omitted because it may refer to files which are not in this | |
1046 | # distribution (perhaps it would be better to include it anyway). | |
d94d255d | 1047 | DEVO_SUPPORT= README Makefile.in configure configure.in \ |
9823504d | 1048 | config.guess config.sub config move-if-change \ |
2492f942 | 1049 | COPYING COPYING.LIB install.sh |
01ec9588 JK |
1050 | |
1051 | # Files in devo/etc used in any net release. | |
1052 | # ChangeLog omitted because it may refer to files which are not in this | |
1053 | # distribution (perhaps it would be better to include it anyway). | |
6d681784 | 1054 | ETC_SUPPORT= Makefile.in cfg-paper.texi configure.in configure.man \ |
275049c0 | 1055 | configure.texi standards.texi make-stds.texi |
15408b3b | 1056 | ETC_SUPPORT_PFX=configure.info standards.info cfg-paper.info |
01ec9588 | 1057 | |
40e16078 KR |
1058 | # When you use `make setup-dirs' or `make taz' you should always redefine |
1059 | # this macro. | |
1060 | SUPPORT_FILES = list-of-support-files-for-tool-in-question | |
7f9cb3b2 | 1061 | # Directories that might want `make diststuff' run. |
7166a308 | 1062 | DISTSTUFFDIRS= ld gprof gdb libg++ binutils gnats gas |
65e21701 KR |
1063 | # Files where "byacc" (Cygnus version) should be changed to "bison -y" (FSF). |
1064 | DISTBISONFILES= binutils/Makefile.in gas/Makefile.in gdb/Makefile.in | |
ea18081d | 1065 | # Directories where "info" should be built. |
15408b3b | 1066 | DISTDOCDIRS= ld gprof binutils gas bfd libg++ libio gdb gnats send-pr etc |
40e16078 | 1067 | |
a54e05f6 KR |
1068 | .PHONY: taz |
1069 | ||
484fa12d JW |
1070 | taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) \ |
1071 | texinfo/texinfo.tex texinfo/gpl.texinfo texinfo/lgpl.texinfo | |
1072 | # Make sure "diststuff" files get built properly. | |
65e21701 KR |
1073 | for f in $(DISTBISONFILES) ; do \ |
1074 | if [ -r $$f ]; then \ | |
7b636683 | 1075 | sed '/^BISON *=.*$$/s/.*/BISON = bison -y/' <$$f >tmp ; \ |
65e21701 KR |
1076 | mv -f tmp $$f ; \ |
1077 | else true; fi ; \ | |
1078 | done | |
484fa12d JW |
1079 | # Take out texinfo from a few places; make simple BISON=bison line. |
1080 | sed -e '/^all\.normal: /s/\all-texinfo //' \ | |
1081 | -e '/^ install-texinfo /d' \ | |
1082 | -e '/^BISON = /,/^$$/d' \ | |
1083 | -e '/^# BISON:/s/.*/BISON = bison -y/' \ | |
1084 | <Makefile.in >tmp | |
1085 | mv -f tmp Makefile.in | |
65e21701 | 1086 | # |
1d5fcc66 PB |
1087 | $(start-sanitize-Sanitize) |
1088 | @if [ -f .Sanitize ] ; then echo "RUN Sanitize FIRST!" ; false ; fi ; | |
1089 | $(end-sanitize-Sanitize) | |
40e16078 | 1090 | ./configure sun4 |
484fa12d JW |
1091 | # Doc files don't change; include them in distribution. |
1092 | for f in $(DISTDOCDIRS) ; do \ | |
1093 | if [ -r $$f/Makefile ]; then \ | |
ea18081d | 1094 | (cd $$f ; $(MAKE) info) || exit 1 ; \ |
484fa12d JW |
1095 | else true ; fi ; \ |
1096 | done | |
7f9cb3b2 | 1097 | # Make links, and run "make diststuff" when needed. |
a54e05f6 KR |
1098 | # The `echo' for setting `p' is to convert all whitespace to spaces. |
1099 | # Then the `case' further below should tell whether $$d is in | |
7f9cb3b2 | 1100 | # DISTSTUFFDIRS. |
a54e05f6 | 1101 | rm -rf proto-toplev ; mkdir proto-toplev |
7f9cb3b2 KR |
1102 | set -e ; dirs="$(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES)" ; \ |
1103 | p=" `echo $(DISTSTUFFDIRS)` " ; \ | |
a54e05f6 KR |
1104 | for d in $$dirs ; do \ |
1105 | if [ -d $$d ]; then \ | |
7f9cb3b2 KR |
1106 | case " $$p " in \ |
1107 | *" $$d "*) \ | |
04103845 | 1108 | (cd $$d ; $(MAKE) diststuff ) || exit 1 ;; \ |
a54e05f6 | 1109 | esac ; \ |
7f9cb3b2 KR |
1110 | if [ -d $$d/proto-$$d.dir ]; then \ |
1111 | ln -s ../$$d/proto-$$d.dir proto-toplev/$$d ; \ | |
1112 | else \ | |
1113 | ln -s ../$$d proto-toplev/$$d ; \ | |
1114 | fi ; \ | |
a54e05f6 | 1115 | else ln -s ../$$d proto-toplev/$$d ; fi ; \ |
40e16078 | 1116 | done |
5600fbd2 | 1117 | $(MAKE) distclean |
a54e05f6 | 1118 | # |
40e16078 | 1119 | mkdir proto-toplev/etc |
15408b3b KR |
1120 | (cd proto-toplev/etc; \ |
1121 | for i in $(ETC_SUPPORT); do \ | |
40e16078 | 1122 | ln -s ../../etc/$$i . ; \ |
15408b3b KR |
1123 | done ; \ |
1124 | for i in $(ETC_SUPPORT_PFX); do \ | |
1125 | ln -s ../../etc/$$i* . ; \ | |
1126 | done) | |
a54e05f6 | 1127 | # |
04103845 | 1128 | # Take out texinfo from configurable dirs |
40e16078 KR |
1129 | rm proto-toplev/configure.in |
1130 | sed -e '/^host_tools=/s/texinfo //' \ | |
40e16078 | 1131 | <configure.in >proto-toplev/configure.in |
a54e05f6 | 1132 | # |
40e16078 KR |
1133 | mkdir proto-toplev/texinfo |
1134 | ln -s ../../texinfo/texinfo.tex proto-toplev/texinfo/ | |
7f9cb3b2 | 1135 | ln -s ../../texinfo/gpl.texinfo proto-toplev/texinfo/ |
484fa12d | 1136 | ln -s ../../texinfo/lgpl.texinfo proto-toplev/texinfo/ |
40e16078 | 1137 | ln -s ../../texinfo/tex3patch proto-toplev/texinfo/ |
a561909f | 1138 | chmod og=u `find . -print` |
7f9cb3b2 | 1139 | (VER=`sed <$(TOOL)/Makefile.in -n 's/^VERSION *= *//p'`; \ |
1d2bb445 | 1140 | echo "==> Making $(TOOL)-$$VER.tar.gz"; \ |
a59b94d2 | 1141 | rm -f $(TOOL)-$$VER; ln -s proto-toplev $(TOOL)-$$VER; \ |
40e16078 | 1142 | tar cfh - $(TOOL)-$$VER \ |
5cc73086 | 1143 | | $(GZIPPROG) -v -9 >$(TOOL)-$$VER.tar.gz ) |
40e16078 | 1144 | |
484fa12d | 1145 | TEXINFO_SUPPORT= texinfo/texinfo.tex texinfo/gpl.texinfo texinfo/lgpl.texinfo |
7f9cb3b2 | 1146 | DIST_SUPPORT= $(DEVO_SUPPORT) $(TEXINFO_SUPPORT) |
40e16078 | 1147 | |
96bfa612 | 1148 | .PHONY: gas.tar.gz |
7f9cb3b2 | 1149 | GAS_SUPPORT_DIRS= bfd include libiberty opcodes |
96bfa612 | 1150 | gas.tar.gz: $(DIST_SUPPORT) $(GAS_SUPPORT_DIRS) gas |
484fa12d JW |
1151 | $(MAKE) -f Makefile.in taz TOOL=gas \ |
1152 | SUPPORT_FILES="$(GAS_SUPPORT_DIRS)" | |
40e16078 | 1153 | |
7f9cb3b2 | 1154 | # The FSF "binutils" release includes gprof and ld. |
96bfa612 | 1155 | .PHONY: binutils.tar.gz |
4be4b991 | 1156 | BINUTILS_SUPPORT_DIRS= bfd gas include libiberty opcodes ld gprof |
96bfa612 | 1157 | binutils.tar.gz: $(DIST_SUPPORT) $(BINUTILS_SUPPORT_DIRS) binutils |
484fa12d | 1158 | $(MAKE) -f Makefile.in taz TOOL=binutils \ |
2492f942 | 1159 | SUPPORT_FILES="$(BINUTILS_SUPPORT_DIRS) makeall.bat configure.bat" |
7f9cb3b2 | 1160 | |
96bfa612 | 1161 | .PHONY: gas+binutils.tar.gz |
a54e05f6 | 1162 | GASB_SUPPORT_DIRS= $(GAS_SUPPORT_DIRS) binutils ld gprof |
96bfa612 | 1163 | gas+binutils.tar.gz: $(DIST_SUPPORT) $(GASB_SUPPORT_DIRS) gas |
484fa12d | 1164 | $(MAKE) -f Makefile.in taz TOOL=gas \ |
2492f942 | 1165 | SUPPORT_FILES="$(GASB_SUPPORT_DIRS) makeall.bat configure.bat" |
79337c85 | 1166 | |
5600fbd2 | 1167 | .PHONY: libg++.tar.gz |
ea6d5817 | 1168 | LIBGXX_SUPPORT_DIRS=include libstdc++ libio librx libiberty xiberty |
5600fbd2 | 1169 | libg++.tar.gz: $(DIST_SUPPORT) libg++ |
484fa12d JW |
1170 | $(MAKE) -f Makefile.in taz TOOL=libg++ \ |
1171 | SUPPORT_FILES="$(LIBGXX_SUPPORT_DIRS)" | |
5600fbd2 | 1172 | |
49dfa984 JM |
1173 | GNATS_SUPPORT_DIRS=include libiberty send-pr |
1174 | gnats.tar.gz: $(DIST_SUPPORT) $(GNATS_SUPPORT_DIRS) gnats | |
a0bd8e18 | 1175 | $(MAKE) -f Makefile.in taz TOOL=gnats \ |
49dfa984 JM |
1176 | SUPPORT_FILES="$(GNATS_SUPPORT_DIRS)" |
1177 | ||
1d5fcc66 | 1178 | .PHONY: gdb.tar.gz |
04103845 | 1179 | GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline sim |
1d5fcc66 PB |
1180 | gdb.tar.gz: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb |
1181 | $(MAKE) -f Makefile.in taz TOOL=gdb \ | |
1182 | SUPPORT_FILES="$(GDB_SUPPORT_DIRS)" | |
1183 | ||
7166a308 | 1184 | .PHONY: newlib.tar.gz |
a220ba0f | 1185 | NEWLIB_SUPPORT_DIRS=libgloss |
04103845 | 1186 | # taz configures for the sun4 target which won't configure newlib. |
a220ba0f SC |
1187 | # We need newlib configured so that the .info files are made. |
1188 | # Unfortunately, it is not enough to just configure newlib separately: | |
1189 | # taz will build the .info files but since SUBDIRS won't contain newlib, | |
1190 | # distclean won't be run (leaving Makefile, config.status, and the tmp files | |
1191 | # used in building the .info files, eg: *.def, *.ref). | |
1192 | # Compensate here by configuring newlib for a simple (no multilib support) | |
1193 | # cross target (sparc64), building the info files, and doing make distclean | |
1194 | # ourselves. | |
7166a308 | 1195 | newlib.tar.gz: $(DIST_SUPPORT) $(NEWLIB_SUPPORT_DIRS) newlib |
04103845 DE |
1196 | rootme=`pwd` ; \ |
1197 | cd newlib && ../configure --srcdir $$rootme/newlib \ | |
1198 | --host sun4 --target sparc64-elf | |
a220ba0f SC |
1199 | cd newlib ; make info |
1200 | cd newlib ; make distclean | |
7166a308 KR |
1201 | $(MAKE) -f Makefile.in taz TOOL=newlib \ |
1202 | SUPPORT_FILES="$(NEWLIB_SUPPORT_DIRS)" \ | |
1203 | DEVO_SUPPORT="$(DEVO_SUPPORT) COPYING.NEWLIB" \ | |
1204 | DISTDOCDIRS="$(DISTDOCDIRS) newlib" | |
1205 | ||
79337c85 ILT |
1206 | .NOEXPORT: |
1207 | MAKEOVERRIDES= | |
1208 | ||
1209 | # start-sanitize-chill | |
1210 | ## This is ugly, but I don't want GNU make to put these variables in | |
1211 | ## the environment. Older makes will see this as a set of targets | |
1212 | ## with no dependencies and no actions. | |
1213 | unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET : | |
1214 | # end-sanitize-chill | |
1215 | ||
eb02fd64 | 1216 | # end of Makefile.in |