"Joseph S. Myers" <[EMAIL PROTECTED]> writes: > This is caused by --enable-generated-files-in-srcdir, as used by the > release script, hence not being seen by people configuring normally > without that option. The first time Java is built (stage 2), the file > java/parse.c is generated in the build directory and compiled from the > build directory; only some time after parse.o is built does parse.c get > copied to the source directory. The second time (stage 3) it's built from > the source directory because of the VPATH setting. Building from > different paths means different debug info. > > This didn't apply with 4.1 because then, without toplevel bootstrap, all > files to be copied to the source directory were generated and copied in > stage 1, so stage 2 and stage 3 both built them from the source directory. > Now, stage 1 is not only built as C only but the whole stage 1 build > directory is configured as C only, and so Java generated files don't get > copied until stage 2. > > I have no suggested solution, other than ceasing to include files > generated with bison, flex and makeinfo in releases for 4.2 and later. > (The GNU Coding Standards describe such generated files with "We commonly > include" rather than with a requirement to include them.)
Interesting. Since we require GNU make, we could do something along these lines: $(srcdir)/java/parse.c: java/parse.c -cp -p $^ $(srcdir)/java java.srcextra: $(srcdir)/java/parse.c ifeq ($(GENINSRC),) java/parse.o: $(srcdir)/java/parse.c else java/parse.o: java/parse.c endif The generated files have disappeared from mainline, so this would be a 4.2 only hack. Ian