Patch: FYI: make target for src.zip

Tom Tromey tromey@redhat.com
Mon Feb 7 20:44:00 GMT 2005


I'm checking this in.

This adds new Makefile targets to create and install a src.zip file.
This is helpful when using eclipse, as you can tell eclipse about
this file and then browsing into the standard library will open the
source files from libgcj.

By default we don't build or install this file, as I figured that most
users would not want it.  However, package builders might be
interested in using it.

Tom

--- gcc/libjava/ChangeLog
+++ gcc/libjava/ChangeLog
@@ -1,3 +1,11 @@
+2005-02-04  Tom Tromey  <tromey@redhat.com>
+
+	PR libgcj/19611:
+	* Makefile.in: Rebuilt.
+	* Makefile.am (src.zip): New target.
+	(install-src.zip): Likewise.
+	(sourcesdir): New variable.
+
 2005-02-03  Tom Tromey  <tromey@redhat.com>
 
 	* defineclass.cc (handleClassBegin): Use
--- gcc/libjava/Makefile.am
+++ gcc/libjava/Makefile.am
@@ -3731,6 +3731,49 @@
 ## ################################################################
 
 ##
+## Creating and installing sources.zip
+##
+
+## Create a zip holding all the sources.  This can be meaningfully
+## used in Eclipse.
+src.zip:
+	-rm -f src.zip
+	here=`pwd`; \
+	( ( cd $(srcdir); \
+	  find java gnu javax org -name '*.java' -print | \
+	  while read file; do \
+## Ugly code to avoid "echo -C".  Must separate each entry by a newline
+## Gross but easy.
+	    echo "x-C" | sed -e 's/^.//'; \
+	    echo $(srcdir); \
+	    echo $$file; \
+	  done ); \
+## Now the build tree.
+	  find gnu java -name '*.java' -print) | \
+## Many of the above circumlocutions are because ZIP will most likely
+## be a relative path to fastjar.
+	$(ZIP) -cfM@ $$here/src.zip
+## Now include the files from external/.
+	for dir in sax w3c_dom; do \
+	  (cd $(srcdir)/external/$$dir; \
+	  find org -type f -name '*.java' -print | while read file; do \
+	    echo "x-C" | sed -e 's/^.//'; \
+	    echo $(srcdir)/external/$$dir; \
+	    echo $$file; \
+          done) | \
+	  $(ZIP) -ufM0E@ src.zip; \
+	done
+
+## We use a variable for this in case the user wants to override it.
+sourcesdir = $(jardir)
+
+install-src.zip: src.zip
+	$(INSTALL_DATA) src.zip $(DESTDIR)$(sourcesdir)/src-@gcc_version@.zip
+
+
+## ################################################################
+
+##
 ## Dependency tracking madness.
 ##
 



More information about the Java-patches mailing list