diff --git a/gcc/cobol/Make-lang.in b/gcc/cobol/Make-lang.in index 17e664e4fe9a82b5a072dfc8bc9735f0277682de..3fda6aedd0ca6e9fdf3c5dab758df2b71e319092 100644 --- a/gcc/cobol/Make-lang.in +++ b/gcc/cobol/Make-lang.in @@ -161,9 +161,14 @@ gcobol$(exeext): \ # First, files needed for parsing: -# Since we didn't attempt to automate determining .h prerequisites for -# parse.y, cdf.y, and scan.l, and because some of the .h files reference each -# other, I opted for the nuclear option: RJD +# To establish prerequisites for parse.o, cdf.o, and scan.o, +# 1. capture the "make -n" output +# 2. eliminate compiler options, leaving only preprocessor options (-D and -I) +# 3. add -E -MM +# +# Below is postprocessed: the files are one per line, used "realpath +# --relative-to=$PWD" to rationalize them, and sorted. + ALL_H_FILES = $(wildcard $(srcdir)/cobol/*.h) $(wildcard $(srcdir)/../libgcobol/*.h) cobol/parse.c: cobol/parse.y $(ALL_H_FILES) @@ -178,7 +183,80 @@ cobol/cdf.c: cobol/cdf.y $(ALL_H_FILES) cobol/scan.c: cobol/scan.l $(ALL_H_FILES) $(LEX) -o$@ $(LFLAGS) $< -cobol/scan.o: cobol/parse.c +cdf.o: cobol/cdf.c \ + ../../gcc/cobol/cbldiag.h \ + ../../gcc/cobol/cdfval.h \ + ../../gcc/cobol/copybook.h \ + ../../gcc/cobol/symbols.h \ + ../../gcc/cobol/util.h \ + ../../libgcobol/common-defs.h \ + ../../libgcobol/ec.h \ + ../../libgcobol/ec.h \ + cobol/cdf.h \ + include/limits.h \ + include/stdint.h \ + include/syslimits.h + +parse.o: cobol/parse.c \ + ../../gcc/cobol/cbldiag.h \ + ../../gcc/cobol/cdfval.h \ + ../../gcc/cobol/cobol-system.h \ + ../../gcc/cobol/exceptg.h \ + ../../gcc/cobol/genapi.h \ + ../../gcc/cobol/genapi.h \ + ../../gcc/cobol/inspect.h \ + ../../gcc/cobol/inspect.h \ + ../../gcc/cobol/parse_ante.h \ + ../../gcc/cobol/parse_util.h \ + ../../gcc/cobol/symbols.h \ + ../../gcc/cobol/util.h \ + ../../gcc/hwint.h \ + ../../gcc/system.h \ + ../../include/ansidecl.h \ + ../../include/ansidecl.h \ + ../../include/filenames.h \ + ../../include/hashtab.h \ + ../../include/libiberty.h \ + ../../include/safe-ctype.h \ + ../../libgcobol/common-defs.h \ + ../../libgcobol/ec.h \ + ../../libgcobol/ec.h \ + ../../libgcobol/exceptl.h \ + ../../libgcobol/io.h \ + auto-host.h \ + cobol/parse.h \ + config.h + +scan.o: cobol/scan.c \ + ../../gcc/cobol/cbldiag.h \ + ../../gcc/cobol/cdfval.h \ + ../../gcc/cobol/cobol-system.h \ + ../../gcc/cobol/copybook.h \ + ../../gcc/cobol/dts.h \ + ../../gcc/cobol/inspect.h \ + ../../gcc/cobol/lexio.h \ + ../../gcc/cobol/scan_ante.h \ + ../../gcc/cobol/scan_post.h \ + ../../gcc/cobol/symbols.h \ + ../../gcc/cobol/symbols.h \ + ../../gcc/cobol/util.h \ + ../../gcc/hwint.h \ + ../../gcc/system.h \ + ../../include/ansidecl.h \ + ../../include/ansidecl.h \ + ../../include/filenames.h \ + ../../include/hashtab.h \ + ../../include/libiberty.h \ + ../../include/safe-ctype.h \ + ../../libgcobol/common-defs.h \ + ../../libgcobol/ec.h \ + ../../libgcobol/ec.h \ + ../../libgcobol/exceptl.h \ + ../../libgcobol/io.h \ + auto-host.h \ + cobol/cdf.h \ + cobol/parse.h \ + config.h # And the cobol1.exe front end