Patch: FYI: no .svn files in jar
Marco Trudel
mtrudel@gmx.ch
Wed Jan 31 10:02:00 GMT 2007
Tom Tromey writes:
> I'm checking this in.
>
> David Daney pointed out that we had .svn stuff in the built
> libgcj.jar. This patch fixes the bug. Tested with fastjar and our
> jar script.
>
> Tom
>
> 2007-01-30 Tom Tromey <tromey@redhat.com>
>
> * Makefile.in: Rebuilt.
> * Makefile.am (libgcj-$(gcc_version).jar): Rewrote.
>
> Index: Makefile.am
> ===================================================================
> --- Makefile.am (revision 121314)
> +++ Makefile.am (working copy)
> @@ -332,8 +332,10 @@
> libgcj-$(gcc_version).jar: classpath/lib/compile-classes
> ## 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; $(JAR) -cfM \
> - $$here/libgcj-$(gcc_version).jar gnu java javax org sun
> + here=`pwd`; cd $(srcdir)/classpath/lib; \
> + find gnu java javax org sun -name '*.class' -print | \
> + fgrep -v .svn | \
> + $(JAR) -cfM@ $$here/libgcj-$(gcc_version).jar
>
> libgcj-tools-$(gcc_version).jar: classpath/tools/tools.zip
> cp $< $@
That breaks compilation:
here=`pwd`; cd /usr/local/src/gcc/libjava/classpath/lib; \
find gnu java javax org sun -name '*.class' -print | \
fgrep -v .svn | \
jar -cfM@ $here/libgcj-4.3.0.jar
Illegal option: @
Usage: jar {ctxu}[vfm0Mi] [jar-file] [manifest-file] [-C dir] files ...
Options:
-c create new archive
-t list table of contents for archive
-x extract named (or all) files from archive
-u update existing archive
-v generate verbose output on standard output
-f specify archive file name
-m include manifest information from specified manifest file
-0 store only; use no ZIP compression
-M do not create a manifest file for the entries
-i generate index information for the specified jar files
-C change to the specified directory and include the following file
If any file is a directory then it is processed recursively.
The manifest file name and the archive file name needs to be specified
in the same order the 'm' and 'f' flags are specified.
Example 1: to archive two class files into an archive called classes.jar:
jar cvf classes.jar Foo.class Bar.class
Example 2: use an existing manifest file 'mymanifest' and archive all the
files in the foo/ directory into 'classes.jar':
jar cvfm classes.jar mymanifest -C foo/ .
make[3]: *** [libgcj-4.3.0.jar] Error 1
Marco@lapi-old:~> which jar
/opt/jdk1.5.0_10/bin/jar
Marco
More information about the Java-patches
mailing list