This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java 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]

Patch: merge Classpath regexp support


The Makefile.am changes are the only interesting part of this patch.  

It looks kind of scary, but I couldn't find a better solution.  Thanks
to Mark and the gnu.regexp author for making this possible!

Ok? 

AG


2004-03-08  Anthony Green  <green@redhat.com>

	* Makefile.am: Build property resource files into libgcj.
	* Makefile.in: Rebuilt.
	* java/util/regex/Matcher.java, java/util/regex/Pattern.java,
	java/util/regex/PatternSyntaxException.java,
	gnu/regexp/CharIndexed.java,
	gnu/regexp/CharIndexedCharArray.java,
	gnu/regexp/CharIndexedInputStream.java,
	gnu/regexp/CharIndexedReader.java,
	gnu/regexp/CharIndexedString.java,
	gnu/regexp/CharIndexedStringBuffer.java, gnu/regexp/RE.java,
	gnu/regexp/REException.java,
	gnu/regexp/REFilterInputStream.java,
	gnu/regexp/REFilterReader.java, gnu/regexp/REMatch.java,
	gnu/regexp/REMatchEnumeration.java, gnu/regexp/RESyntax.java,
	gnu/regexp/REToken.java, gnu/regexp/RETokenAny.java,
	gnu/regexp/RETokenBackRef.java, gnu/regexp/RETokenChar.java,
	gnu/regexp/RETokenEnd.java, gnu/regexp/RETokenEndSub.java,
	gnu/regexp/RETokenLookAhead.java,
	gnu/regexp/RETokenOneOf.java, gnu/regexp/RETokenPOSIX.java,
	gnu/regexp/RETokenRange.java, gnu/regexp/RETokenRepeated.java,
	gnu/regexp/RETokenStart.java,
	gnu/regexp/RETokenWordBoundary.java,
	gnu/regexp/UncheckedRE.java: Files merged from GNU Classpath.


Index: libjava/Makefile.am
===================================================================
RCS file: /cvs/gcc/gcc/libjava/Makefile.am,v
retrieving revision 1.364
diff -c -p -r1.364 Makefile.am
*** libjava/Makefile.am	3 Mar 2004 23:50:03 -0000	1.364
--- libjava/Makefile.am	9 Mar 2004 11:05:04 -0000
*************** EXTRA_libgcj_la_SOURCES = boehm.cc nogc.
*** 156,165 ****
  	$(extra_cc_source_files) $(java_source_files) $(built_java_source_files)
  libgcj_la_DEPENDENCIES = libgcj-@gcc_version@.jar $(javao_files) \
  	$(c_files) $(extra_cc_files) $(GCOBJS) $(THREADOBJS) \
!        $(PLATFORMOBJS) $(LIBLTDL) $(LIBFFI) $(ZLIBS) $(GCLIBS)
  
  libgcj_la_LIBADD = $(javao_files) $(c_files) $(extra_cc_files) $(GCOBJS) \
! 	$(THREADOBJS) $(PLATFORMOBJS)
  # Include THREADLIBS here to ensure that the correct version of
  # certain linuxthread functions get linked:
  libgcj_la_LDFLAGS = -rpath $(toolexeclibdir) $(THREADLDFLAGS) $(THREADLIBS) \
--- 156,166 ----
  	$(extra_cc_source_files) $(java_source_files) $(built_java_source_files)
  libgcj_la_DEPENDENCIES = libgcj-@gcc_version@.jar $(javao_files) \
  	$(c_files) $(extra_cc_files) $(GCOBJS) $(THREADOBJS) \
! 	$(PLATFORMOBJS) $(LIBLTDL) $(LIBFFI) $(ZLIBS) $(GCLIBS) \
! 	$(propertyo_files)
  
  libgcj_la_LIBADD = $(javao_files) $(c_files) $(extra_cc_files) $(GCOBJS) \
! 	$(THREADOBJS) $(PLATFORMOBJS) $(propertyo_files)
  # Include THREADLIBS here to ensure that the correct version of
  # certain linuxthread functions get linked:
  libgcj_la_LDFLAGS = -rpath $(toolexeclibdir) $(THREADLDFLAGS) $(THREADLIBS) \
*************** all_java_source_files = \
*** 374,379 ****
--- 375,410 ----
  
  all_java_class_files = $(all_java_source_files:.java=.class)
  
+ ## Build property files into the library.
+ property_files = \
+ gnu/regexp/MessagesBundle.properties \
+ gnu/regexp/MessagesBundle_fr.properties 
+ 
+ propertyo_files = $(property_files:.properties=.properties.lo) 
+ 
+ $(propertyo_files): .property-resource-stamp
+ 
+ .property-resource-stamp: $(addprefix $(srcdir)/,$(property_files))
+ 	@for x in $(property_files); do \
+ 	    rebuild=no; \
+ 	    if [ ! -f $$x.o ]; then \
+ 	        rebuild=yes; \
+ 	    else \
+ 		if [ $(srcdir)/$$x -nt $$x.o ]; then \
+ 	            rebuild=yes; \
+ 	        fi; \
+ 	    fi; \
+ 	    case $$rebuild in \
+ 	        "yes") \
+ 	            $(mkinstalldirs) `dirname $$x`; \
+ 		    cp -a $(srcdir)/$$x $$x.java; \
+ 		    $(GCJCOMPILE) -o $$x.o -c $$x.java \
+ 		        -Wc,--resource,$$x; \
+ 		    rm -f $$x.java;; \
+ 	    esac; \
+ 	done;
+ 	@touch $@
+ 
  if ONESTEP
  
  # Compile all classfiles in one go.
*************** endif
*** 413,419 ****
  
  # Note: The libtool objects are removed by mostlyclean-local
  # because of command-line-length issues.
! MOSTLYCLEANFILES = $(nat_headers) $(x_nat_headers)
  
  CLEANFILES = libgcj-@gcc_version@.jar
  
--- 444,450 ----
  
  # Note: The libtool objects are removed by mostlyclean-local
  # because of command-line-length issues.
! MOSTLYCLEANFILES = $(nat_headers) $(x_nat_headers) .property-resource-stamp
  
  CLEANFILES = libgcj-@gcc_version@.jar
  
*************** gnu/java/nio/charset/UTF_16Decoder.java 
*** 2368,2373 ****
--- 2399,2431 ----
  gnu/java/nio/charset/UTF_16Encoder.java \
  gnu/java/nio/charset/UTF_16LE.java \
  gnu/java/nio/charset/UTF_8.java \
+ gnu/regexp/CharIndexed.java \
+ gnu/regexp/CharIndexedCharArray.java \
+ gnu/regexp/CharIndexedInputStream.java \
+ gnu/regexp/CharIndexedReader.java \
+ gnu/regexp/CharIndexedString.java \
+ gnu/regexp/CharIndexedStringBuffer.java \
+ gnu/regexp/RE.java \
+ gnu/regexp/REException.java \
+ gnu/regexp/REFilterInputStream.java \
+ gnu/regexp/REFilterReader.java \
+ gnu/regexp/REMatch.java \
+ gnu/regexp/REMatchEnumeration.java \
+ gnu/regexp/RESyntax.java \
+ gnu/regexp/REToken.java \
+ gnu/regexp/RETokenAny.java \
+ gnu/regexp/RETokenBackRef.java \
+ gnu/regexp/RETokenChar.java \
+ gnu/regexp/RETokenEnd.java \
+ gnu/regexp/RETokenEndSub.java \
+ gnu/regexp/RETokenLookAhead.java \
+ gnu/regexp/RETokenOneOf.java \
+ gnu/regexp/RETokenPOSIX.java \
+ gnu/regexp/RETokenRange.java \
+ gnu/regexp/RETokenRepeated.java \
+ gnu/regexp/RETokenStart.java \
+ gnu/regexp/RETokenWordBoundary.java \
+ gnu/regexp/UncheckedRE.java \
  gnu/java/security/Engine.java \
  gnu/java/security/OID.java \
  gnu/java/security/der/BitString.java \



-- 
Anthony Green <green@redhat.com>
Red Hat, Inc.


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