OSDN Git Service

Initial revision
[pf3gnuchains/gcc-fork.git] / gcc / f / Makefile.in
1 # Makefile for GNU F77 compiler.
2 #   Copyright (C) 1995-1997 Free Software Foundation, Inc.
3
4 #This file is part of GNU Fortran.
5
6 #GNU Fortran is free software; you can redistribute it and/or modify
7 #it under the terms of the GNU General Public License as published by
8 #the Free Software Foundation; either version 2, or (at your option)
9 #any later version.
10
11 #GNU Fortran is distributed in the hope that it will be useful,
12 #but WITHOUT ANY WARRANTY; without even the implied warranty of
13 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 #GNU General Public License for more details.
15
16 #You should have received a copy of the GNU General Public License
17 #along with GNU Fortran; see the file COPYING.  If not, write to
18 #the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
19 #02111-1307, USA.
20
21 # The makefile built from this file lives in the language subdirectory.
22 # Its purpose is to provide support for:
23 #
24 # 1) recursion where necessary, and only then (building .o's), and
25 # 2) building and debugging f771 from the language subdirectory, and
26 # 3) nothing else.
27 #
28 # The parent makefile handles all other chores, with help from the
29 # language makefile fragment, of course.
30 #
31 # The targets for external use are:
32 # all, TAGS, ???mostlyclean, ???clean.
33
34 # Suppress smart makes who think they know how to automake Yacc files
35 .y.c:
36
37 # Variables that exist for you to override.
38 # See below for how to change them for certain systems.
39
40 ALLOCA =
41
42 # Various ways of specifying flags for compilations:
43 # CFLAGS is for the user to override to, e.g., do a bootstrap with -O2.
44 # BOOT_CFLAGS is the value of CFLAGS to pass
45 # to the stage2 and stage3 compilations
46 # XCFLAGS is used for most compilations but not when using the GCC just built.
47 XCFLAGS =
48 CFLAGS = -g
49 BOOT_CFLAGS = -O $(CFLAGS)
50 # These exists to be overridden by the x-* and t-* files, respectively.
51 X_CFLAGS =
52 T_CFLAGS =
53
54 X_CPPFLAGS =
55 T_CPPFLAGS =
56
57 CC = cc
58 HOST_CC = $(CC)
59 BISON = bison
60 BISONFLAGS =
61 LEX = flex
62 LEXFLAGS =
63 AR = ar
64 AR_FLAGS = rc
65 SHELL = /bin/sh
66 MAKEINFO = makeinfo
67 TEXI2DVI = texi2dvi
68
69 # Define this as & to perform parallel make on a Sequent.
70 # Note that this has some bugs, and it seems currently necessary
71 # to compile all the gen* files first by hand to avoid erroneous results.
72 P =
73
74 # This is used in the definition of SUBDIR_USE_ALLOCA.
75 # ??? Perhaps it would be better if it just looked for *gcc*.
76 OLDCC = cc
77
78 # This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
79 # It omits XCFLAGS, and specifies -B./.
80 # It also specifies -B$(tooldir)/ to find as and ld for a cross compiler.
81 GCC_CFLAGS=$(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS)
82
83 # Tools to use when building a cross-compiler.
84 # These are used because `configure' appends `cross-make'
85 # to the makefile when making a cross-compiler.
86
87 target= ... `configure' substitutes actual target name here.
88 xmake_file= ... `configure' substitutes actual x- file name here.
89 tmake_file= ... `configure' substitutes actual t- file name here.
90
91 # Directory where gcc sources are (gcc/), from where we are.
92 # Note that this should be overridden when building f771, which happens
93 # at the top level, not in f.  Likewise for VPATH (if added).
94 srcdir = .
95 VPATH = .
96
97 # Additional system libraries to link with.
98 CLIB=
99
100 # Change this to a null string if obstacks are installed in the
101 # system library.
102 OBSTACK=obstack.o
103
104 # Choose the real default target.
105 ALL=all
106
107 # End of variables for you to override.
108
109 # Definition of `none' is here so that new rules inserted by sed
110 # do not specify the default target.
111 none:
112         @echo ''
113         @echo 'Do not use this makefile to build anything other than the'
114         @echo 'g77 derived files via the "make g77-only" target.'
115         @echo 'Instead, use the documented procedures to build gcc itself,'
116         @echo 'which will build g77 as well when done properly.'
117         @echo ''
118         @exit 1
119
120 # This rule is just a handy way to build the g77 derived files without
121 # having the gcc source tree around.
122 g77-only: force
123         if [ -f g77.texi ] ; then \
124           (cd ..; $(MAKE) srcdir=. HOST_CC=cc HOST_CFLAGS=-g -f f/Make-lang.in f77.rebuilt); \
125         else \
126           $(MAKE) srcdir=. HOST_CC=cc HOST_CFLAGS=-g -f f/Make-lang.in f77.rebuilt; \
127         fi
128
129 all: all.indirect
130
131 # This tells GNU Make version 3 not to put all variables in the environment.
132 .NOEXPORT:
133
134 # sed inserts variable overrides after the following line.
135 ####target overrides
136 ####host overrides
137 ####cross overrides
138 ####build overrides
139 \f
140 # Now figure out from those variables how to compile and link.
141
142 all.indirect: f/Makefile f771
143
144 # IN_GCC tells obstack.h that we are using gcc's <stddef.h> file.
145 INTERNAL_CFLAGS = $(CROSS) -DIN_GCC
146
147 # This is the variable actually used when we compile.
148 ALL_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) $(XCFLAGS) -W -Wall
149
150 # Likewise.
151 ALL_CPPFLAGS = $(CPPFLAGS) $(X_CPPFLAGS) $(T_CPPFLAGS)
152
153 # f771 is so big, need to tell linker on m68k-next-nextstep* to make enough
154 # room for it.  On AIX, linking f771 overflows the linker TOC.  -bbigtoc is
155 # appropriate for the linker on AIX 4.1 and above.
156 F771_LDFLAGS = `case "${target}" in\
157  m68k-next-nextstep*) echo -segaddr __DATA 6000000;;\
158  *-*-aix[4-9]*) \`$(CC) --print-prog-name=ld\` -v 2>&1 | grep BFD >/dev/null || echo -Wl,-bbigtoc;; esac`
159
160 # Even if ALLOCA is set, don't use it if compiling with GCC.
161
162 SUBDIR_OBSTACK = `if [ x$(OBSTACK) != x ]; then echo $(OBSTACK); else true; fi`
163 SUBDIR_USE_ALLOCA = `case "${CC}" in "${OLDCC}") if [ x$(ALLOCA) != x ]; then echo $(ALLOCA); else true; fi ;; esac`
164 SUBDIR_MALLOC = `if [ x$(MALLOC) != x ]; then echo $(MALLOC); else true; fi`
165
166 # How to link with both our special library facilities
167 # and the system's installed libraries.
168 LIBS = $(SUBDIR_OBSTACK) $(SUBDIR_USE_ALLOCA) $(SUBDIR_MALLOC) $(CLIB)
169
170 # Specify the directories to be searched for header files.
171 # Both . and srcdir are used, in that order,
172 # so that tm.h and config.h will be found in the compilation
173 # directory rather than in the source directory.
174 INCLUDES = -If -I$(srcdir)/f -I. -I$(srcdir) -I$(srcdir)/config
175
176 # Flags_to_pass to recursive makes.
177 # Note that we don't need to distinguish the `_FOR_TARGET' cross tools
178 # as AR and RANLIB are set appropriately by configure iff cross compiling.
179 FLAGS_TO_PASS = \
180         "CROSS=$(CROSS)" \
181         "AR_FLAGS=$(AR_FLAGS)" \
182         "AR=$(AR)" \
183         "BISON=$(BISON)" \
184         "BISONFLAGS=$(BISONFLAGS)" \
185         "CC=$(CC)" \
186         "CFLAGS=$(CFLAGS)" \
187         "GCCFLAGS=$(GCCFLAGS)" \
188         "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
189         "LDFLAGS=$(LDFLAGS)" \
190         "LEX=$(LEX)" \
191         "LEXFLAGS=$(LEXFLAGS)" \
192         "MAKEINFO=$(MAKEINFO)" \
193         "MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \
194         "RANLIB=$(RANLIB)" \
195         "RANLIB_TEST=$(RANLIB_TEST)" \
196         "SHELL=$(SHELL)" \
197         "exec_prefix=$(exec_prefix)" \
198         "prefix=$(prefix)" \
199         "tooldir=$(tooldir)" \
200         "bindir=$(bindir)" \
201         "libsubdir=$(libsubdir)"
202
203 .c.o:
204         $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< -o $@
205 \f
206 # Lists of files for various purposes.
207
208 # Language-specific object files for g77
209
210 F77_OBJS = \
211  f/bad.o \
212  f/bit.o \
213  f/bld.o \
214  f/com.o \
215  f/data.o \
216  f/equiv.o \
217  f/expr.o \
218  f/global.o \
219  f/implic.o \
220  f/info.o \
221  f/intrin.o \
222  f/lab.o \
223  f/lex.o \
224  f/malloc.o \
225  f/name.o \
226  f/parse.o \
227  f/proj.o \
228  f/src.o \
229  f/st.o \
230  f/sta.o \
231  f/stb.o \
232  f/stc.o \
233  f/std.o \
234  f/ste.o \
235  f/storag.o \
236  f/stp.o \
237  f/str.o \
238  f/sts.o \
239  f/stt.o \
240  f/stu.o \
241  f/stv.o \
242  f/stw.o \
243  f/symbol.o \
244  f/target.o \
245  f/top.o \
246  f/type.o \
247  f/where.o \
248  f/zzz.o
249
250 # Language-independent object files.
251 OBJS = `cat stamp-objlist | sed -e "s:  : :g" -e "s: : f/:g"`
252 OBJDEPS = stamp-objlist
253
254 compiler: f771
255 # This is now meant to be built in the top level directory, not `f':
256 f771: $(P) f/Makefile $(F77_OBJS) $(OBJDEPS) $(LIBDEPS)
257         rm -f f771$(exeext)
258         $(CC) $(ALL_CFLAGS) $(LDFLAGS) $(F771_LDFLAGS) -o $@ \
259               $(F77_OBJS) $(OBJS) $(LIBS)
260
261 # Check in case anyone expects to build in this directory:
262 f/Makefile:
263         @if test ! -f f/Makefile ; \
264         then echo "Build f771 only at the top level." 2>&1; exit 1; \
265         else true; fi
266
267 Makefile: $(srcdir)/f/Makefile.in $(srcdir)/configure
268
269 native: f771
270 \f
271 # Compiling object files from source files.
272
273 # Note that dependencies on obstack.h are not written
274 # because that file is not part of GCC.
275
276 # F77 language-specific files.
277
278 # These macros expand to the corresponding g77-source .j files plus
279 # the gcc-source files involved (each file itself, plus whatever
280 # files on which it depends, but without including stuff resulting
281 # from configuration, since we can't guess at that).  The files
282 # that live in a distclean'd gcc source directory have "$(srcdir)/"
283 # prefixes, while the others don't because they'll be created
284 # only in the build directory.
285 ASSERT_H = $(srcdir)/f/assert.j $(srcdir)/assert.h
286 CONFIG_H = $(srcdir)/f/config.j config.h
287 CONVERT_H = $(srcdir)/f/convert.j $(srcdir)/convert.h
288 FLAGS_H = $(srcdir)/f/flags.j $(srcdir)/flags.h
289 GLIMITS_H = $(srcdir)/f/glimits.j $(srcdir)/glimits.h
290 HCONFIG_H = $(srcdir)/f/hconfig.j hconfig.h
291 INPUT_H = $(srcdir)/f/input.j $(srcdir)/input.h
292 RTL_H = $(srcdir)/f/rtl.j $(srcdir)/rtl.h $(srcdir)/rtl.def \
293         $(srcdir)/machmode.h $(srcdir)/machmode.def
294 TCONFIG_H = $(srcdir)/f/tconfig.j tconfig.h
295 TM_H = $(srcdir)/f/tm.j tm.h
296 TREE_H = $(srcdir)/f/tree.j $(srcdir)/tree.h $(srcdir)/real.h \
297         $(srcdir)/tree.def $(srcdir)/machmode.h $(srcdir)/machmode.def
298
299 #Build the first part of this list with the command line:
300 #    cd gcc/; make deps-kinda -f f/Makefile.in
301 #Note that this command uses the host C compiler;
302 # use HOST_CC="./xgcc -B./" to use GCC in the build directory, for example.
303 #Also note that this particular build file seems to want to use
304 # substitions: $(CONFIG_H) for config.h; $(TREE_H) for tree.h; and
305 # $(RTL_H) for rtl.h.  deps-kinda uses a sed script to do those
306 # substitutions, plus others for elegance.
307
308 f/bad.o: f/bad.c f/proj.h $(ASSERT_H) f/bad.h f/bad.def f/where.h $(GLIMITS_H) \
309   f/top.h f/malloc.h f/com.h f/com-rt.def $(TREE_H) f/bld.h f/bld-op.def f/bit.h \
310   f/info.h f/info-b.def f/info-k.def f/info-w.def f/target.h f/lex.h f/type.h \
311   f/intrin.h f/intrin.def f/lab.h f/symbol.h f/symbol.def f/equiv.h f/storag.h \
312   f/global.h f/name.h
313 f/bit.o: f/bit.c f/proj.h $(ASSERT_H) $(GLIMITS_H) f/bit.h f/malloc.h
314 f/bld.o: f/bld.c f/proj.h $(ASSERT_H) f/bld.h f/bld-op.def f/bit.h f/malloc.h \
315   f/com.h f/com-rt.def $(TREE_H) f/info.h f/info-b.def f/info-k.def f/info-w.def \
316   f/target.h f/bad.h f/bad.def f/where.h $(GLIMITS_H) f/top.h f/lex.h f/type.h \
317   f/lab.h f/storag.h f/symbol.h f/symbol.def f/equiv.h f/global.h f/name.h \
318   f/intrin.h f/intrin.def
319 f/com.o: f/com.c $(CONFIG_H) $(FLAGS_H) $(RTL_H) $(TREE_H) $(CONVERT_H) f/proj.h \
320   $(ASSERT_H) f/com.h f/com-rt.def f/bld.h f/bld-op.def f/bit.h f/malloc.h \
321   f/info.h f/info-b.def f/info-k.def f/info-w.def f/target.h f/bad.h f/bad.def \
322   f/where.h $(GLIMITS_H) f/top.h f/lex.h f/type.h f/intrin.h f/intrin.def f/lab.h \
323   f/symbol.h f/symbol.def f/equiv.h f/storag.h f/global.h f/name.h f/expr.h \
324   f/implic.h f/src.h f/st.h
325 f/data.o: f/data.c f/proj.h $(ASSERT_H) f/data.h f/bld.h f/bld-op.def f/bit.h \
326   f/malloc.h f/com.h f/com-rt.def $(TREE_H) f/info.h f/info-b.def f/info-k.def \
327   f/info-w.def f/target.h f/bad.h f/bad.def f/where.h $(GLIMITS_H) f/top.h f/lex.h \
328   f/type.h f/lab.h f/storag.h f/symbol.h f/symbol.def f/equiv.h f/global.h \
329   f/name.h f/intrin.h f/intrin.def f/expr.h f/st.h
330 f/equiv.o: f/equiv.c f/proj.h $(ASSERT_H) f/equiv.h f/bld.h f/bld-op.def f/bit.h \
331   f/malloc.h f/com.h f/com-rt.def $(TREE_H) f/info.h f/info-b.def f/info-k.def \
332   f/info-w.def f/target.h f/bad.h f/bad.def f/where.h $(GLIMITS_H) f/top.h f/lex.h \
333   f/type.h f/lab.h f/storag.h f/symbol.h f/symbol.def f/global.h f/name.h \
334   f/intrin.h f/intrin.def f/data.h
335 f/expr.o: f/expr.c f/proj.h $(ASSERT_H) f/expr.h f/bld.h f/bld-op.def f/bit.h \
336   f/malloc.h f/com.h f/com-rt.def $(TREE_H) f/info.h f/info-b.def f/info-k.def \
337   f/info-w.def f/target.h f/bad.h f/bad.def f/where.h $(GLIMITS_H) f/top.h f/lex.h \
338   f/type.h f/lab.h f/storag.h f/symbol.h f/symbol.def f/equiv.h f/global.h \
339   f/name.h f/intrin.h f/intrin.def f/implic.h f/src.h f/st.h
340 f/fini.o: f/fini.c f/proj.h $(ASSERT_H) f/malloc.h
341 f/g77.o: f/g77.c $(CONFIG_H)
342 f/global.o: f/global.c f/proj.h $(ASSERT_H) f/global.h f/lex.h f/top.h f/malloc.h \
343   f/where.h $(GLIMITS_H) f/name.h f/symbol.h f/symbol.def f/bad.h f/bad.def \
344   f/bld.h f/bld-op.def f/bit.h f/com.h f/com-rt.def $(TREE_H) f/info.h \
345   f/info-b.def f/info-k.def f/info-w.def f/target.h f/type.h f/lab.h f/storag.h \
346   f/intrin.h f/intrin.def f/equiv.h
347 f/implic.o: f/implic.c f/proj.h $(ASSERT_H) f/implic.h f/info.h f/info-b.def \
348   f/info-k.def f/info-w.def f/target.h $(TREE_H) f/bad.h f/bad.def f/where.h \
349   $(GLIMITS_H) f/top.h f/malloc.h f/lex.h f/type.h f/symbol.h f/symbol.def f/bld.h \
350   f/bld-op.def f/bit.h f/com.h f/com-rt.def f/lab.h f/storag.h f/intrin.h \
351   f/intrin.def f/equiv.h f/global.h f/name.h f/src.h
352 f/info.o: f/info.c f/proj.h $(ASSERT_H) f/info.h f/info-b.def f/info-k.def \
353   f/info-w.def f/target.h $(TREE_H) f/bad.h f/bad.def f/where.h $(GLIMITS_H) \
354   f/top.h f/malloc.h f/lex.h f/type.h
355 f/intrin.o: f/intrin.c f/proj.h $(ASSERT_H) f/intrin.h f/intrin.def f/bld.h \
356   f/bld-op.def f/bit.h f/malloc.h f/com.h f/com-rt.def $(TREE_H) f/info.h \
357   f/info-b.def f/info-k.def f/info-w.def f/target.h f/bad.h f/bad.def f/where.h \
358   $(GLIMITS_H) f/top.h f/lex.h f/type.h f/lab.h f/storag.h f/symbol.h f/symbol.def \
359   f/equiv.h f/global.h f/name.h f/src.h
360 f/lab.o: f/lab.c f/proj.h $(ASSERT_H) f/lab.h f/com.h f/com-rt.def $(TREE_H) f/bld.h \
361   f/bld-op.def f/bit.h f/malloc.h f/info.h f/info-b.def f/info-k.def \
362   f/info-w.def f/target.h f/bad.h f/bad.def f/where.h $(GLIMITS_H) f/top.h f/lex.h \
363   f/type.h f/intrin.h f/intrin.def f/symbol.h f/symbol.def f/equiv.h f/storag.h \
364   f/global.h f/name.h
365 f/lex.o: f/lex.c f/proj.h $(ASSERT_H) f/top.h f/malloc.h f/where.h $(GLIMITS_H) \
366   f/bad.h f/bad.def f/com.h f/com-rt.def $(TREE_H) f/bld.h f/bld-op.def f/bit.h \
367   f/info.h f/info-b.def f/info-k.def f/info-w.def f/target.h f/lex.h f/type.h \
368   f/intrin.h f/intrin.def f/lab.h f/symbol.h f/symbol.def f/equiv.h f/storag.h \
369   f/global.h f/name.h f/src.h $(CONFIG_H) $(FLAGS_H) $(INPUT_H)
370 f/malloc.o: f/malloc.c f/proj.h $(ASSERT_H) f/malloc.h
371 f/name.o: f/name.c f/proj.h $(ASSERT_H) f/bad.h f/bad.def f/where.h $(GLIMITS_H) \
372   f/top.h f/malloc.h f/name.h f/global.h f/lex.h f/symbol.h f/symbol.def f/bld.h \
373   f/bld-op.def f/bit.h f/com.h f/com-rt.def $(TREE_H) f/info.h f/info-b.def \
374   f/info-k.def f/info-w.def f/target.h f/type.h f/lab.h f/storag.h f/intrin.h \
375   f/intrin.def f/equiv.h f/src.h
376 f/parse.o: f/parse.c f/proj.h $(ASSERT_H) f/top.h f/malloc.h f/where.h $(GLIMITS_H) \
377   f/com.h f/com-rt.def $(TREE_H) f/bld.h f/bld-op.def f/bit.h f/info.h \
378   f/info-b.def f/info-k.def f/info-w.def f/target.h f/bad.h f/bad.def f/lex.h \
379   f/type.h f/intrin.h f/intrin.def f/lab.h f/symbol.h f/symbol.def f/equiv.h \
380   f/storag.h f/global.h f/name.h f/zzz.h $(FLAGS_H)
381 f/proj.o: f/proj.c f/proj.h $(ASSERT_H) $(GLIMITS_H)
382 f/src.o: f/src.c f/proj.h $(ASSERT_H) f/src.h f/bad.h f/bad.def f/where.h \
383   $(GLIMITS_H) f/top.h f/malloc.h
384 f/st.o: f/st.c f/proj.h $(ASSERT_H) f/st.h f/bad.h f/bad.def f/where.h $(GLIMITS_H) \
385   f/top.h f/malloc.h f/lex.h f/symbol.h f/symbol.def f/bld.h f/bld-op.def f/bit.h \
386   f/com.h f/com-rt.def $(TREE_H) f/info.h f/info-b.def f/info-k.def f/info-w.def \
387   f/target.h f/type.h f/lab.h f/storag.h f/intrin.h f/intrin.def f/equiv.h \
388   f/global.h f/name.h f/sta.h f/stamp-str f/stb.h f/expr.h f/stp.h f/stt.h f/stc.h \
389   f/std.h f/stv.h f/stw.h f/ste.h f/sts.h f/stu.h
390 f/sta.o: f/sta.c f/proj.h $(ASSERT_H) f/sta.h f/bad.h f/bad.def f/where.h \
391   $(GLIMITS_H) f/top.h f/malloc.h f/lex.h f/stamp-str f/symbol.h f/symbol.def f/bld.h \
392   f/bld-op.def f/bit.h f/com.h f/com-rt.def $(TREE_H) f/info.h f/info-b.def \
393   f/info-k.def f/info-w.def f/target.h f/type.h f/lab.h f/storag.h f/intrin.h \
394   f/intrin.def f/equiv.h f/global.h f/name.h f/implic.h f/stb.h f/expr.h f/stp.h \
395   f/stt.h f/stc.h f/std.h f/stv.h f/stw.h
396 f/stb.o: f/stb.c f/proj.h $(ASSERT_H) f/stb.h f/bad.h f/bad.def f/where.h \
397   $(GLIMITS_H) f/top.h f/malloc.h f/expr.h f/bld.h f/bld-op.def f/bit.h f/com.h \
398   f/com-rt.def $(TREE_H) f/info.h f/info-b.def f/info-k.def f/info-w.def \
399   f/target.h f/lex.h f/type.h f/lab.h f/storag.h f/symbol.h f/symbol.def \
400   f/equiv.h f/global.h f/name.h f/intrin.h f/intrin.def f/stp.h f/stt.h f/stamp-str \
401   f/src.h f/sta.h f/stc.h
402 f/stc.o: f/stc.c f/proj.h $(ASSERT_H) f/stc.h f/bad.h f/bad.def f/where.h \
403   $(GLIMITS_H) f/top.h f/malloc.h f/bld.h f/bld-op.def f/bit.h f/com.h \
404   f/com-rt.def $(TREE_H) f/info.h f/info-b.def f/info-k.def f/info-w.def \
405   f/target.h f/lex.h f/type.h f/lab.h f/storag.h f/symbol.h f/symbol.def \
406   f/equiv.h f/global.h f/name.h f/intrin.h f/intrin.def f/expr.h f/stp.h f/stt.h \
407   f/stamp-str f/data.h f/implic.h f/src.h f/sta.h f/std.h f/stv.h f/stw.h
408 f/std.o: f/std.c f/proj.h $(ASSERT_H) f/std.h f/bld.h f/bld-op.def f/bit.h \
409   f/malloc.h f/com.h f/com-rt.def $(TREE_H) f/info.h f/info-b.def f/info-k.def \
410   f/info-w.def f/target.h f/bad.h f/bad.def f/where.h $(GLIMITS_H) f/top.h f/lex.h \
411   f/type.h f/lab.h f/storag.h f/symbol.h f/symbol.def f/equiv.h f/global.h \
412   f/name.h f/intrin.h f/intrin.def f/stp.h f/stt.h f/stamp-str f/stv.h f/stw.h f/sta.h \
413   f/ste.h f/sts.h
414 f/ste.o: f/ste.c $(CONFIG_H) $(RTL_H) f/proj.h $(ASSERT_H) f/ste.h f/bld.h \
415   f/bld-op.def f/bit.h f/malloc.h f/com.h f/com-rt.def $(TREE_H) f/info.h \
416   f/info-b.def f/info-k.def f/info-w.def f/target.h f/bad.h f/bad.def f/where.h \
417   $(GLIMITS_H) f/top.h f/lex.h f/type.h f/lab.h f/storag.h f/symbol.h f/symbol.def \
418   f/equiv.h f/global.h f/name.h f/intrin.h f/intrin.def f/stp.h f/stt.h f/stamp-str \
419   f/sts.h f/stv.h f/stw.h f/sta.h
420 f/storag.o: f/storag.c f/proj.h $(ASSERT_H) f/storag.h f/bld.h f/bld-op.def f/bit.h \
421   f/malloc.h f/com.h f/com-rt.def $(TREE_H) f/info.h f/info-b.def f/info-k.def \
422   f/info-w.def f/target.h f/bad.h f/bad.def f/where.h $(GLIMITS_H) f/top.h f/lex.h \
423   f/type.h f/lab.h f/symbol.h f/symbol.def f/equiv.h f/global.h f/name.h \
424   f/intrin.h f/intrin.def f/data.h
425 f/stp.o: f/stp.c f/proj.h $(ASSERT_H) f/stp.h f/bld.h f/bld-op.def f/bit.h \
426   f/malloc.h f/com.h f/com-rt.def $(TREE_H) f/info.h f/info-b.def f/info-k.def \
427   f/info-w.def f/target.h f/bad.h f/bad.def f/where.h $(GLIMITS_H) f/top.h f/lex.h \
428   f/type.h f/lab.h f/storag.h f/symbol.h f/symbol.def f/equiv.h f/global.h \
429   f/name.h f/intrin.h f/intrin.def f/stt.h
430 f/str.o: f/str.c f/proj.h $(ASSERT_H) f/src.h f/bad.h f/bad.def f/where.h \
431   $(GLIMITS_H) f/top.h f/malloc.h f/stamp-str f/lex.h
432 f/sts.o: f/sts.c f/proj.h $(ASSERT_H) f/sts.h f/malloc.h f/com.h f/com-rt.def \
433   $(TREE_H) f/bld.h f/bld-op.def f/bit.h f/info.h f/info-b.def f/info-k.def \
434   f/info-w.def f/target.h f/bad.h f/bad.def f/where.h $(GLIMITS_H) f/top.h f/lex.h \
435   f/type.h f/intrin.h f/intrin.def f/lab.h f/symbol.h f/symbol.def f/equiv.h \
436   f/storag.h f/global.h f/name.h
437 f/stt.o: f/stt.c f/proj.h $(ASSERT_H) f/stt.h f/top.h f/malloc.h f/where.h \
438   $(GLIMITS_H) f/bld.h f/bld-op.def f/bit.h f/com.h f/com-rt.def $(TREE_H) f/info.h \
439   f/info-b.def f/info-k.def f/info-w.def f/target.h f/bad.h f/bad.def f/lex.h \
440   f/type.h f/lab.h f/storag.h f/symbol.h f/symbol.def f/equiv.h f/global.h \
441   f/name.h f/intrin.h f/intrin.def f/stp.h f/expr.h f/sta.h f/stamp-str
442 f/stu.o: f/stu.c f/proj.h $(ASSERT_H) f/bld.h f/bld-op.def f/bit.h f/malloc.h \
443   f/com.h f/com-rt.def $(TREE_H) f/info.h f/info-b.def f/info-k.def f/info-w.def \
444   f/target.h f/bad.h f/bad.def f/where.h $(GLIMITS_H) f/top.h f/lex.h f/type.h \
445   f/lab.h f/storag.h f/symbol.h f/symbol.def f/equiv.h f/global.h f/name.h \
446   f/intrin.h f/intrin.def f/implic.h f/stu.h f/sta.h f/stamp-str
447 f/stv.o: f/stv.c f/proj.h $(ASSERT_H) f/stv.h f/lab.h f/com.h f/com-rt.def $(TREE_H) \
448   f/bld.h f/bld-op.def f/bit.h f/malloc.h f/info.h f/info-b.def f/info-k.def \
449   f/info-w.def f/target.h f/bad.h f/bad.def f/where.h $(GLIMITS_H) f/top.h f/lex.h \
450   f/type.h f/intrin.h f/intrin.def f/symbol.h f/symbol.def f/equiv.h f/storag.h \
451   f/global.h f/name.h
452 f/stw.o: f/stw.c f/proj.h $(ASSERT_H) f/stw.h f/bld.h f/bld-op.def f/bit.h \
453   f/malloc.h f/com.h f/com-rt.def $(TREE_H) f/info.h f/info-b.def f/info-k.def \
454   f/info-w.def f/target.h f/bad.h f/bad.def f/where.h $(GLIMITS_H) f/top.h f/lex.h \
455   f/type.h f/lab.h f/storag.h f/symbol.h f/symbol.def f/equiv.h f/global.h \
456   f/name.h f/intrin.h f/intrin.def f/stv.h f/sta.h f/stamp-str
457 f/symbol.o: f/symbol.c f/proj.h $(ASSERT_H) f/symbol.h f/symbol.def f/bad.h \
458   f/bad.def f/where.h $(GLIMITS_H) f/top.h f/malloc.h f/bld.h f/bld-op.def f/bit.h \
459   f/com.h f/com-rt.def $(TREE_H) f/info.h f/info-b.def f/info-k.def f/info-w.def \
460   f/target.h f/lex.h f/type.h f/lab.h f/storag.h f/intrin.h f/intrin.def \
461   f/equiv.h f/global.h f/name.h f/src.h f/st.h
462 f/target.o: f/target.c f/proj.h $(ASSERT_H) $(GLIMITS_H) f/target.h $(TREE_H) f/bad.h \
463   f/bad.def f/where.h f/top.h f/malloc.h f/info.h f/info-b.def f/info-k.def \
464   f/info-w.def f/type.h f/lex.h
465 f/top.o: f/top.c f/proj.h $(ASSERT_H) f/top.h f/malloc.h f/where.h $(GLIMITS_H) \
466   f/bad.h f/bad.def f/bit.h f/bld.h f/bld-op.def f/com.h f/com-rt.def $(TREE_H) \
467   f/info.h f/info-b.def f/info-k.def f/info-w.def f/target.h f/lex.h f/type.h \
468   f/lab.h f/storag.h f/symbol.h f/symbol.def f/equiv.h f/global.h f/name.h \
469   f/intrin.h f/intrin.def f/data.h f/expr.h f/implic.h f/src.h f/st.h $(FLAGS_H)
470 f/type.o: f/type.c f/proj.h $(ASSERT_H) f/type.h f/malloc.h
471 f/where.o: f/where.c f/proj.h $(ASSERT_H) f/where.h $(GLIMITS_H) f/top.h f/malloc.h \
472   f/lex.h
473 f/zzz.o: f/zzz.c f/proj.h $(ASSERT_H) f/zzz.h
474
475 # The rest of this list (Fortran 77 language-specific files) is hand-generated.
476
477 f/stamp-str: f/str-1t.h f/str-1t.j f/str-2t.h f/str-2t.j \
478  f/str-fo.h f/str-fo.j f/str-io.h f/str-io.j f/str-nq.h  f/str-nq.j \
479  f/str-op.h f/str-op.j f/str-ot.h f/str-ot.j
480         touch f/stamp-str
481
482 f/str-1t.h f/str-1t.j: f/fini f/str-1t.fin
483         ./f/fini `echo $(srcdir)/f/str-1t.fin | sed 's,^\./,,'` f/str-1t.j f/str-1t.h
484
485 f/str-2t.h f/str-2t.j: f/fini f/str-2t.fin
486         ./f/fini `echo $(srcdir)/f/str-2t.fin | sed 's,^\./,,'` f/str-2t.j f/str-2t.h
487
488 f/str-fo.h f/str-fo.j: f/fini f/str-fo.fin
489         ./f/fini `echo $(srcdir)/f/str-fo.fin | sed 's,^\./,,'` f/str-fo.j f/str-fo.h
490
491 f/str-io.h f/str-io.j: f/fini f/str-io.fin
492         ./f/fini `echo $(srcdir)/f/str-io.fin | sed 's,^\./,,'` f/str-io.j f/str-io.h
493
494 f/str-nq.h f/str-nq.j: f/fini f/str-nq.fin
495         ./f/fini `echo $(srcdir)/f/str-nq.fin | sed 's,^\./,,'` f/str-nq.j f/str-nq.h
496
497 f/str-op.h f/str-op.j: f/fini f/str-op.fin
498         ./f/fini `echo $(srcdir)/f/str-op.fin | sed 's,^\./,,'` f/str-op.j f/str-op.h
499
500 f/str-ot.h f/str-ot.j: f/fini f/str-ot.fin
501         ./f/fini `echo $(srcdir)/f/str-ot.fin | sed 's,^\./,,'` f/str-ot.j f/str-ot.h
502
503 f/fini: f/fini.o f/proj-h.o
504         $(HOST_CC) $(HOST_CFLAGS) -W -Wall $(HOST_LDFLAGS) -o f/fini f/fini.o f/proj-h.o
505
506 f/fini.o:
507         $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
508               `echo $(srcdir)/f/fini.c | sed 's,^\./,,'` -o $@
509
510 f/proj-h.o: f/proj.o
511         $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
512               `echo $(srcdir)/f/proj.c | sed 's,^\./,,'` -o $@
513
514 # Other than str-*.j, the *.j files are dummy #include files
515 # that normally just #include the corresponding back-end *.h
516 # files, but not if MAKING_DEPENDENCIES is #defined.  The str-*.j
517 # files also are not actually included if MAKING_DEPENDENCIES
518 # is #defined.  The point of all this is to come up with a clean
519 # dependencies list whether working in a clean directory, such
520 # that str-*.j and such do not exist, or in a directory full
521 # of already-built files.  Any dependency on a str-*.j file
522 # implies a dependency on str.h, so we key on that to replace
523 # it with stamp-str, and dependencies on the other *.j files
524 # are generally left alone (modulo special macros like RTL_H)
525 # because we might not want to recompile all of g77 just
526 # because a back-end file changes.  MG is usually "-MG" but
527 # should be defined with "make MG= deps-kinda..." if using
528 # a compiler that doesn't support -MG (gcc does as of 2.6) --
529 # it prevents diagnostics when an #include file is missing,
530 # as will be the case with proj.h in a clean directory.
531 MG=-MG
532 deps-kinda:
533         $(HOST_CC) -DMAKING_DEPENDENCIES -MM $(MG) -I -If f/*.c | \
534           sed -e 's: \([.]/\)*f/assert[.]j: $$(ASSERT_H):g' \
535               -e 's: \([.]/\)*f/config[.]j: $$(CONFIG_H):g' \
536               -e 's: \([.]/\)*f/convert[.]j: $$(CONVERT_H):g' \
537               -e 's: \([.]/\)*f/flags[.]j: $$(FLAGS_H):g' \
538               -e 's: \([.]/\)*f/glimits[.]j: $$(GLIMITS_H):g' \
539               -e 's: \([.]/\)*f/hconfig[.]j: $$(HCONFIG_H):g' \
540               -e 's: \([.]/\)*f/input[.]j: $$(INPUT_H):g' \
541               -e 's: \([.]/\)*f/rtl[.]j: $$(RTL_H):g' \
542               -e 's: \([.]/\)*f/tconfig[.]j: $$(TCONFIG_H):g' \
543               -e 's: \([.]/\)*f/tm[.]j: $$(TM_H):g' \
544               -e 's: \([.]/\)*f/tree[.]j: $$(TREE_H):g' \
545               -e 's: proj[.]h: f/proj.h:g' \
546               -e 's: \([.]/\)*f/str[.]h: f/stamp-str:g' \
547               -e 's%^\(.*\)[ ]*: %f/\1: %g'
548
549 \f
550 # These exist for maintenance purposes.
551
552 # Update the tags table.
553 TAGS: force
554         cd $(srcdir)/f ;                        \
555         etags *.c *.h ;                         \
556         echo 'l' | tr 'l' '\f' >> TAGS ;        \
557         echo 'parse.y,0' >> TAGS ;              \
558         etags -a ../*.h ../*.c;
559
560 .PHONY: none all all.indirect f77.rebuilt compiler native deps-kinda TAGS g77-only
561
562 force: