diff --git a/gcc/cobol/Make-lang.in b/gcc/cobol/Make-lang.in index 358a793a50cec35c4b1eab5195c854f2ffe28b6a..cc37639e295e5d0ac08a1f4331c8257cc93bb40c 100644 --- a/gcc/cobol/Make-lang.in +++ b/gcc/cobol/Make-lang.in @@ -150,16 +150,6 @@ gcobol$(exeext): \ # First, files needed for parsing: -# 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 -# -# The below lists of include files for the the generated files is -# postprocessed: the files are one per line, used "realpath -# --relative-to=$PWD" to rationalize them, and sorted. We include -# parse.c in the list for scan.o because that's the one make(1) knows about. -# cobol/parse.c: cobol/parse.y $(BISON) -o $@ $(YFLAGS) \ --defines=cobol/parse.h \ @@ -169,6 +159,20 @@ cobol/cdf.c: cobol/cdf.y $(BISON) -o $@ $(YFLAGS) \ --defines=cobol/cdf.h --report-file=cobol/cdf.out $< + +# The src<foo> targets are executed if +# ‘--enable-generated-files-in-srcdir’ was specified as a configure +# option. +# +# srcextra copies generated dependencies into the source +# directory. This is used for files such as Flex/Bison output: files +# that are not version-controlled but should be included in any +# release tarballs. +# +# Although versioned snapshots require Flex to be installed, they do +# not require Bison. Release tarballs always include Flex/Bison +# output, and do not require those tools to be installed. + cobol.srcextra: cobol/parse.c cobol/cdf.c ln -f $^ cobol/parse.h cobol/cdf.h $(srcdir)/cobol/ @@ -183,6 +187,17 @@ cobol/scan.c: cobol/scan.l exit nerr}' $@~ @rm $@~ + +# 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 +# +# The below lists of include files for the the generated files is +# postprocessed: the files are one per line, used "realpath +# --relative-to=$PWD" to rationalize them, and sorted. We include +# parse.c in the list for scan.o because that's the one make(1) knows about. + cobol/cdf.o: cobol/cdf.c \ $(srcdir)/cobol/cbldiag.h \ $(srcdir)/cobol/cdfval.h \