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]

Re: Patch: FYI: no .svn files in jar


Marco Trudel wrote:
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

The "jar" from sun can't take files from the input as far as I can see. Also doing jar `find ...` does not work since the list becomes too long.
I'm not specially fond of having to change something on my system (PATH or even change the installed JRE) to compile gcj.
So I would suggest to either always use the gcj jar script or handle the svn files differently (although I can't think of a way...)



Marco


 >  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




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