This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Patch: FYI: require jar with -@
- From: Tom Tromey <tromey at redhat dot com>
- To: GCJ-patches <java-patches at gcc dot gnu dot org>
- Date: 31 Jan 2007 08:27:16 -0700
- Subject: Patch: FYI: require jar with -@
- Reply-to: tromey at redhat dot com
I'm checking this in.
We rely on jar supporting -@, a GNU extension.
This patch changes configure to avoid using a jar that does not
support this. This fixes the build breakage I checked in yesterday.
Sorry about that.
Note that with the earlier classpath jar patch, you can use gjar to
build libgcj.
This also changes our 'find' command to use -prune, as suggested by
Andrew.
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
* configure, Makefile.in: Rebuilt.
* configure.ac (JAR): Check for -@ feature.
* Makefile.am (libgcj-$(gcc_version).jar): Use find -prune.
Index: Makefile.am
===================================================================
--- Makefile.am (revision 121363)
+++ Makefile.am (working copy)
@@ -333,8 +333,7 @@
## Note that this now omits the property files.
## It doesn't matter since we don't use the jar at runtime.
here=`pwd`; cd $(srcdir)/classpath/lib; \
- find gnu java javax org sun -name '*.class' -print | \
- fgrep -v .svn | \
+ find gnu java javax org sun -name .svn -prune -o -name '*.class' -print | \
$(JAR) -cfM@ $$here/libgcj-$(gcc_version).jar
libgcj-tools-$(gcc_version).jar: classpath/tools/tools.zip
Index: configure.ac
===================================================================
--- configure.ac (revision 121425)
+++ configure.ac (working copy)
@@ -117,6 +117,18 @@
AC_CHECK_PROGS([JAR], [jar fastjar gjar], no)
AC_PATH_PROG([ZIP], [zip], no)
AC_PATH_PROG([UNZIP], [unzip], unzip)
+
+# We need a jar that supports -@. This is a GNU extension.
+if test "$JAR" != no; then
+ rm -f config-test.jar
+ echo $srcdir/configure.ac | $JAR -cf@ config-test.jar
+ if test -f config-test.jar; then
+ rm -f config-test.jar
+ else
+ JAR=no
+ fi
+fi
+
# Prefer the jar we found, but fall back to our jar script.
if test "$JAR" = no; then
if test "$ZIP" = no; then