From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4065 invoked by alias); 15 Jan 2010 12:48:07 -0000 Received: (qmail 4057 invoked by uid 22791); 15 Jan 2010 12:48:06 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from snape.CeBiTec.Uni-Bielefeld.DE (HELO smtp-relay.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 15 Jan 2010 12:48:01 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 94092385; Fri, 15 Jan 2010 13:47:59 +0100 (CET) Received: from smtp-relay.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (malfoy.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) (amavisd-new, port 10024) with LMTP id Wror3IR+y1h7; Fri, 15 Jan 2010 13:47:57 +0100 (CET) Received: from manam.CeBiTec.Uni-Bielefeld.DE (manam.CeBiTec.Uni-Bielefeld.DE [129.70.161.120]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPS id E36CD384; Fri, 15 Jan 2010 13:47:56 +0100 (CET) Received: (from ro@localhost) by manam.CeBiTec.Uni-Bielefeld.DE (8.14.3+Sun/8.14.3/Submit) id o0FClul5005690; Fri, 15 Jan 2010 13:47:56 +0100 (MET) From: Rainer Orth To: java-patches@gcc.gnu.org Cc: Andrew Haley Subject: PATCH: Avoid command line length limit building tools.zip (PR libgcj/38251) Date: Fri, 15 Jan 2010 12:48:00 -0000 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (usg-unix-v) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact java-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-patches-owner@gcc.gnu.org X-SW-Source: 2010-q1/txt/msg00014.txt.bz2 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 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 * 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.