public inbox for java-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* PATCH: Avoid command line length limit building tools.zip (PR libgcj/38251)
@ 2010-01-15 12:48 Rainer Orth
  2010-01-20 16:59 ` Rainer Orth
  0 siblings, 1 reply; 7+ messages in thread
From: Rainer Orth @ 2010-01-15 12:48 UTC (permalink / raw)
  To: java-patches; +Cc: Andrew Haley

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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-03-04 17:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-15 12:48 PATCH: Avoid command line length limit building tools.zip (PR libgcj/38251) Rainer Orth
2010-01-20 16:59 ` Rainer Orth
2010-03-01 19:10   ` Ralf Wildenhues
2010-03-02 11:06     ` Rainer Orth
2010-03-02 11:10       ` Andrew Haley
2010-03-02 20:08       ` Ralf Wildenhues
2010-03-04 17:22         ` Rainer Orth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).