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: Avoid command line length limit building tools.zip (PR libgcj/38251)


I've finally looked into PR libgcj/38251 again where building tools.zip
in classpath/tools fails on systems with low limits on command line
lenght.  I think the solution is obvious on second thought: instead of
passing all file names except those below to .svn to jar/zip explicitly,
just prune the copies of the classes and asm directories of .svn subdirs
and then archive the whole remaining hierarchy.  The following patch
(only lightly tested so far) does just that.

A few caveats, though:

* The test for the .svn dir must check in asm (or classes), since in a
  VPATH build, there will be no .svn directory otherwise.

* find | xargs is a problem for filenames containing whitespace, but
  find -print0/xargs -0 or Sun's find -exec \{\} + aren't portable.

Ok for mainline anyway?

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


2010-01-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	PR libgcj/38251
	* tools/Makefile.am (dist-hook): Prune .svn directories in asm and
	classes copies.
	* tools/Makefile.in: Regenerate.

	Revert:
	2008-11-05  Andrew Haley  <aph@redhat.com>

	* tools/Makefile.am (UPDATE_TOOLS_ZIP, CREATE_TOOLS_ZIP): Exclude
	.svn direcories.

Index: libjava/classpath/tools/Makefile.am
===================================================================
--- libjava/classpath/tools/Makefile.am	(revision 155837)
+++ libjava/classpath/tools/Makefile.am	(working copy)
@@ -373,6 +373,7 @@
 ## BEGIN GCJ LOCAL
 	cp -pR $(srcdir)/asm .
 	cp -pR $(srcdir)/classes .
+	[ -d asm/.svn ] && find asm classes -type d -name .svn -print | xargs rm -rf
 ## END GCJ LOCAL
 if CREATE_GJDOC
 ## Copy over gjdoc resource files.
@@ -385,11 +386,11 @@
 endif
 
 if WITH_JAR
-CREATE_TOOLS_ZIP=$(JAR) cf ../$(TOOLS_ZIP) `find . -name .svn -prune -o -type f -print`
-UPDATE_TOOLS_ZIP=$(JAR) uf ../$(TOOLS_ZIP) `find . -name .svn -prune -o -type f -print`
+CREATE_TOOLS_ZIP=$(JAR) cf ../$(TOOLS_ZIP) .
+UPDATE_TOOLS_ZIP=$(JAR) uf ../$(TOOLS_ZIP) .
 else
-CREATE_TOOLS_ZIP=$(ZIP) -r ../$(TOOLS_ZIP) `find . -name .svn -prune -o -type f -print`
-UPDATE_TOOLS_ZIP=$(ZIP) -u -r ../$(TOOLS_ZIP) `find . -name .svn -prune -o -type f -print`
+CREATE_TOOLS_ZIP=$(ZIP) -r ../$(TOOLS_ZIP) .
+UPDATE_TOOLS_ZIP=$(ZIP) -u -r ../$(TOOLS_ZIP) .
 endif
 
 ## First add classpath tools stuff.


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