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