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