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