This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GCC 4.2 branch comparision failure building Java


Ian Lance Taylor wrote:
> "Joseph S. Myers" <joseph@codesourcery.com> 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.

Thanks for the analysis!

> 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

I was thinking about trying to fix this by doing something similar --
but avoiding the copy.

Can we do:

java_parse_c := java/parse.c
ifeq ($(GENINSRC),)
java_parse_c := $(srcdir)/$(java_parse_c)
endif

$(java_parse_c): java/parse.y
  -$(BISON) -t ... -o $@ $<

And, then, just have java/parse.o depend on $(java_parse_c)?

I was going to give this a try, but if you know whether it's going to
break, let me know. :-)

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]