This is the mail archive of the rhug-rhats@sources.redhat.com mailing list for the RHUG 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]

Properties files


Hi all,

I just spent a couple of days chasing what I thought was a gcj bug but
that turned out not to be.  Some of the packages have .properties
files as well as .java files, and these are dealt with in the
Makefiles as follows:

| FOOBAR_PROP_S = \
| file1.properties \
| file2.properties
| 
| FOOBAR_PROP_O = $(FOOBAR_PROP_S:.properties=.o)
| 
| %.o: %.properties
|      $(top_srcdir)/mkinstalldirs `dirname $@`
|      $(GCJ) --resource `echo $< | sed "s/.*\/src\/share\///g"` -o $@ -c $<
| 
| lib_bar_foo_la_LIBADD = $(FOOBAR_PROP_O)

Now, Tomcat 4 has one case where there exists File.java and
File.properties, meaning that they both compile to the same .o file.
This causes all sorts of 'multiple definition of File' and 'File
changed size from 46 to 22 bytes in File.o'

To avoid this in future I'd like to make the following changes to all
packages that have .properties files.

1. Change FOOBAR_PROP_O = $(FOOBAR_PROP_S:.properties=.o)
       to FOOBAR_PROP_O = $(FOOBAR_PROP_S:.properties=_prop.o)

2. Change %.o: %.properties
       to %_prop.o: %.properties

Any objections?

Cheers,
Gary

[ gbenson@redhat.com ][ GnuPG 85A8F78B ][ http://inauspicious.org/ ]


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