Commit 76c6ea0c by Tom Tromey Committed by Tom Tromey

Makefile.in: Rebuilt.

fastjar
	Removed
libjava
	* Makefile.in: Rebuilt.
	* Makefile.am (ZIP): Removed.
	(libgcj-$(gcc_version).jar): Use $(JAR).
	(src.zip): Likewise.
	* configure: Rebuilt.
	* configure.ac: Check for jar.  Removed code to set ZIP.

From-SVN: r112654
parent 46bdbc00
Bryan Burns and Cory Jon Hollingsworth.
0.92 08/24/2000 Improved support for other Unix platforms.
Now works on Solaris, AIX, True 64, and HP-UX.
Hopefully resolved all big endian problems.
Fixed bug in update which caused it to skip
openning update file
0.90 12/06/1999 Fixed recursive archival bug.
0.86 10/12/1999 Applied patch to fix leading "./" problem.
0.85 5/10/1999 The -t and -x flags now work. Hooray! Those
took quite a long time to get working.
Handling extraction/listing added quite a bit
of code, 500-1000 lines. ouch!
0.75 4/27/1999 Added support for -C flag, allowing you to
change directories before adding files. See
fastjar's usage screen for more info. Also
improved the total compression display, and
added install/uninstall targets to the
Makefile.
0.71 4/27/1999 Added -V flag to print version info. Added
better error messages, and added configure
script for better portability.
0.70 4/25/1999 Added compression. Only deflation is supported
at this time (only one jar supports) and is
enabled by default. use the -0 flag to disable
compression.
0.60 4/21/1999 Added support for manifest files (-m, -M).
Fixed bug with mod time/date in central header.
0.50.1 4/20/1999 Added patch from John Bley. (Fixes bug with
not properly closing the file)
0.50 4/20/1999 First public release
----------------------
How to install fastjar
----------------------
1. Run the 'configure' script to generate config.h and Makefile. You can
use 'configure --help' to get a list of command-line options.
2. If you're feeling experimental, you can change some settings in jartool.h
to optimize fastjar for your particular system.
3. Type 'make' to create the fastjar binary.
4. Type 'make install' to install fastjar in whichever directory you supplied
to configure (or the default directory if you didn't specify one.)
# Process this with automake to create Makefile.in
# Work around what appears to be a GNU make bug handling MAKEFLAGS
# values defined in terms of make variables, as is the case for CC and
# friends when we are called from the top level Makefile.
AM_MAKEFLAGS = \
"AR_FLAGS=$(AR_FLAGS)" \
"CC_FOR_BUILD=$(CC_FOR_BUILD)" \
"CFLAGS=$(CFLAGS)" \
"CXXFLAGS=$(CXXFLAGS)" \
"CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
"CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
"INSTALL=$(INSTALL)" \
"INSTALL_DATA=$(INSTALL_DATA)" \
"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
"INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
"JC1FLAGS=$(JC1FLAGS)" \
"LDFLAGS=$(LDFLAGS)" \
"LIBCFLAGS=$(LIBCFLAGS)" \
"LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
"MAKE=$(MAKE)" \
"MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
"PICFLAG=$(PICFLAG)" \
"PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
"SHELL=$(SHELL)" \
"exec_prefix=$(exec_prefix)" \
"infodir=$(infodir)" \
"libdir=$(libdir)" \
"prefix=$(prefix)" \
"AR=$(AR)" \
"AS=$(AS)" \
"CC=$(CC)" \
"CXX=$(CXX)" \
"LD=$(LD)" \
"LIBCFLAGS=$(LIBCFLAGS)" \
"NM=$(NM)" \
"PICFLAG=$(PICFLAG)" \
"RANLIB=$(RANLIB)" \
"DESTDIR=$(DESTDIR)"
AM_CPPFLAGS = -I. -I$(top_srcdir) $(ZINCS) -I$(top_srcdir)/../include
LIBIBERTY = ../libiberty/libiberty.a
bin_PROGRAMS = fastjar grepjar
fastjar_SOURCES = jartool.c dostime.c compress.c pushback.c shift.c jartool.h \
zipfile.h dostime.h compress.h pushback.h shift.h
fastjar_LDADD = $(ZLIBS) $(LIBIBERTY)
fastjar_DEPENDENCIES = $(ZDEPS) $(LIBIBERTY)
fastjar_CPPFLAGS = $(AM_CPPFLAGS) -DWITH_SHIFT_DOWN
grepjar_SOURCES = jargrep.c dostime.c compress.c pushback.c jartool.h \
zipfile.h dostime.h compress.h pushback.h
grepjar_LDADD = $(ZLIBS) $(LIBIBERTY)
grepjar_DEPENDENCIES = $(ZDEPS) $(LIBIBERTY)
AM_CFLAGS = @fastjar_warn_cflags@
AM_MAKEINFOFLAGS = -I $(srcdir)/../gcc/doc/include
TEXINFO_TEX = ../gcc/doc/include/texinfo.tex
info_TEXINFOS = fastjar.texi
fastjar_TEXINFOS = \
../gcc/doc/include/gcc-common.texi \
../gcc/doc/include/gpl.texi \
gcc-vers.texi
man_MANS = fastjar.1 grepjar.1
EXTRA_DIST = $(man_MANS)
BASEVER = $(srcdir)/../gcc/BASE-VER
DEVPHASE = $(srcdir)/../gcc/DEV-PHASE
TEXI2POD = perl $(srcdir)/../contrib/texi2pod.pl
POD2MAN = pod2man --center="GNU" --release="gcc-$(shell cat $(BASEVER))"
.pod.1:
-($(POD2MAN) --section=1 $< > $(@).T$$$$ && \
mv -f $(@).T$$$$ $@) || \
(rm -f $(@).T$$$$ && exit 1)
.INTERMEDIATE: fastjar.pod grepjar.pod
fastjar.pod: $(srcdir)/fastjar.texi
-$(TEXI2POD) -D fastjar $< > $@
grepjar.pod: $(srcdir)/fastjar.texi
-$(TEXI2POD) -D grepjar $< > $@
fastjar.1 grepjar.1: $(BASEVER)
# gcc-vers.texi is generated from the version files.
gcc-vers.texi: $(BASEVER) $(DEVPHASE)
(echo "@set version-GCC $(shell cat $(BASEVER))"; \
if [ "$(shell cat $(DEVPHASE))" = "experimental" ]; \
then echo "@set DEVELOPMENT"; \
else echo "@clear DEVELOPMENT"; \
fi) > $@T
mv -f $@T $@
# GCC LOCAL CHANGE
# The following commands allow us to release tarballs with the man pages
# and info documentation prebuilt. This feature is enabled via
# --enable-generated-files-in-srcdir in the configure script.
if GENINSRC
STAMP_GENINSRC = stamp-geninsrc
else
STAMP_GENINSRC =
endif
all-local: $(STAMP_GENINSRC)
stamp-geninsrc: fastjar.1 grepjar.1 fastjar.info
-cp -p $(top_builddir)/fastjar.1 $(srcdir)/fastjar.1
-cp -p $(top_builddir)/grepjar.1 $(srcdir)/grepjar.1
-cp -p $(top_builddir)/fastjar.info $(srcdir)/fastjar.info
touch $@
CLEANFILES = stamp-geninsrc fastjar.info
MAINTAINERCLEANFILES = $(srcdir)/fastjar.1 \
$(srcdir)/grepjar.1 \
$(srcdir)/fastjar.info
Noteworthy changes in fastjar, 11/2000
--------------------------------------
Fastjar as been imported from sourceforge.net/projects/fastjar with
Brian Burns' permission so that it can be used as a replacement to the
zip utility in order to create the libgcj.zip archive. Several missing
distribution files were created, most notably Makefile.am.
Two new options were added: `-E' to prevent fastjar from reading the
content of a directory when specifying one (and instead relying on the
provided list of files to populate the archive with regard to the
directory entry) and `-@' to let fastjar read the name of the files to
add to the archive from the standard input. This last option is
supported only when creating or augmenting an archive.
This directory contains the FastJar package, which is not part of GCC but
shipped with GCC as convenience.
=======
FastJar 0.90
12/6/1999
=======
FastJar is an attempt at creating a feature-for-feature copy of Sun's JDK's
'jar' command. Sun's jar (or Blackdown's for that matter) is written entirely
in Java which makes it dog slow. Since FastJar is written in C, it can create
the same .jar file as Sun's tool in a fraction of the time. On my system,
Sun's jar takes 50 seconds to create a 10MB jar file, while FastJar only takes
a little over a second.
The reason I wrote fastjar is that building .jar files is a regular process
of the build where I work. The way we have it setup, you have to re-create
the .jar file everytime you want to test it out, which is about every 5 minutes
when I'm busy coding. The .jar file wasn't -that- big, but it did take about
30 seconds to be made, and watching all the garbage collection messages was
pretty irritating as well. I probably wasted a half-hour a day watching
Sun's jar tool chug along. By writing the program in C, I spend much less time
banging my head against the monitor waiting for the build to finish. Yay!
FastJar has been tested on Solaris and Linux 2.2.x systems and nothing else.
It should compile/run without any problems on either system, provided you have
zlib installed.
Please mail any bug reports to burnsbr@ucs.orst.edu.
If you use FastJar and want me to add the rest of the features, send me mail
(toast@users.sourceforge.net). I'll be much more likely to put more work into this
if I know other people find it useful other than me.
As always, this not being a final release, bugs may exist. I test each
release pretty well, but I can always miss things...
Compression will slow things down quite a bit. A 10MB jar file takes about
1 second on my machine without compression, and 9 seconds with it. If you
want fastjar to be fast, use the -0 (zero, not O) flag to turn off compression.
Supported flags:
--------------------------
-c | create a new archive
-v | verbose output
-f | specify archive file name
-m | specify existing manifest file
-M | don't create manifest
-0 | store only
-C | change to dir
-t | list contents
-x | extract contents
Unsupported flags:
----------------------------
-u | update exisiting archive
If you use the "unsupported" flags, nothing bad will happen, but then again
nothing will happen at all.
Unsupported features (in this release):
---------------------------------------------
* updating
* full manifest support (?)
Order or features for the future:
--------------------------------------------
* archive updating
* full manifest support
* filtering
* dependency checking
===========================================================================
http://fastjar.sourceforge.net
toast@users.sourceforge.net
dnl Define MKDIR_TAKES_ONE_ARG if mkdir accepts only one argument instead
dnl of the usual 2.
AC_DEFUN([gcc_AC_FUNC_MKDIR_TAKES_ONE_ARG],
[AC_CACHE_CHECK([if mkdir takes one argument], gcc_cv_mkdir_takes_one_arg,
[AC_TRY_COMPILE([
#include <sys/types.h>
#ifdef HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#ifdef HAVE_DIRECT_H
# include <direct.h>
#endif], [mkdir ("foo", 0);],
gcc_cv_mkdir_takes_one_arg=no, gcc_cv_mkdir_takes_one_arg=yes)])
if test $gcc_cv_mkdir_takes_one_arg = yes ; then
AC_DEFINE(MKDIR_TAKES_ONE_ARG, 1, [Define if host mkdir takes a
single argument.])
fi
])
/* $Id: compress.h,v 1.1 2000/12/09 03:08:23 apbianco Exp $
$Log: compress.h,v $
Revision 1.1 2000/12/09 03:08:23 apbianco
2000-12-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
* fastjar: Imported.
Revision 1.1.1.1 1999/12/06 03:09:12 toast
initial checkin..
Revision 1.3 1999/05/10 08:32:09 burnsbr
added new function protos.
Revision 1.2 1999/04/23 12:02:20 burnsbr
added licence
Revision 1.1 1999/04/23 11:59:37 burnsbr
Initial revision
*/
/*
compress.h - header for compression
Copyright (C) 1999 Bryan Burns
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
/* Initializes the compression data structure(s) */
void init_compression(void);
/* Compresses the file specified by in_fd and appends it to out_fd */
int compress_file(int, int, struct zipentry *, struct zipentry *);
/* Frees memory used by compression function */
void end_compression(void);
void init_inflation(void);
int inflate_file(pb_file *, int, struct zipentry *);
void end_inflation(void);
Bytef *inflate_string(pb_file *, ub4 *, ub4 *);
/* config.h.in. Generated from configure.ac by autoheader. */
/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
*/
#undef HAVE_DIRENT_H
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
/* Define to 1 if you have the `ftruncate' function. */
#undef HAVE_FTRUNCATE
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the <limits.h> header file. */
#undef HAVE_LIMITS_H
/* Define to 1 if the system has the type `long long'. */
#undef HAVE_LONG_LONG
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
#undef HAVE_NDIR_H
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
*/
#undef HAVE_SYS_DIR_H
/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
*/
#undef HAVE_SYS_NDIR_H
/* Define to 1 if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define to 1 if you have the `_chsize' function. */
#undef HAVE__CHSIZE
/* Define if host mkdir takes a single argument. */
#undef MKDIR_TAKES_ONE_ARG
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* The size of a `char', as computed by sizeof. */
#undef SIZEOF_CHAR
/* The size of a `int', as computed by sizeof. */
#undef SIZEOF_INT
/* The size of a `long', as computed by sizeof. */
#undef SIZEOF_LONG
/* The size of a `long long', as computed by sizeof. */
#undef SIZEOF_LONG_LONG
/* The size of a `short', as computed by sizeof. */
#undef SIZEOF_SHORT
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Define to 1 if your <sys/time.h> declares `struct tm'. */
#undef TM_IN_SYS_TIME
/* Version number of package */
#undef VERSION
/* Define to 1 if your processor stores words with the most significant byte
first (like Motorola and SPARC, unlike Intel and VAX). */
#undef WORDS_BIGENDIAN
/* Define to `long' if <sys/types.h> does not define. */
#undef off_t
This source diff could not be displayed because it is too large. You can view the blob instead.
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
AC_INIT(jartool.h)
AM_INIT_AUTOMAKE(fastjar, 0.92-gcc)
AM_CONFIG_HEADER(config.h)
dnl Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
AC_PATH_PROG(RM, rm, /bin/rm, $PATH:/bin:/usr/bin:/usr/local/bin)
AC_PATH_PROG(CP, cp, /bin/cp, $PATH:/bin:/usr/bin:/usr/local/bin)
AC_PATH_PROG(STRIP, strip, /usr/bin/strip, $PATH:/bin:/usr/bin:/usr/local/bin)
AC_PATH_PROG(CHMOD, chmod, /bin/chmod, $PATH:/bin:/usr/bin:/usr/local/bin)
AC_EXEEXT
AM_MAINTAINER_MODE
dnl Add warning flags if we are using gcc.
if test "$GCC" = yes; then
fastjar_warn_cflags='-W -Wall -pedantic -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings'
fi
AC_SUBST(fastjar_warn_cflags)
dnl Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_STRUCT_TM
AC_CHECK_HEADERS(fcntl.h unistd.h sys/param.h stdlib.h limits.h)
AC_CHECK_FUNCS(ftruncate _chsize)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_OFF_T
AC_STRUCT_TM
# mkdir takes a single argument on some systems.
gcc_AC_FUNC_MKDIR_TAKES_ONE_ARG
dnl Check for type-widths
AC_CHECK_SIZEOF(char)
AC_CHECK_SIZEOF(short)
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
AC_CHECK_TYPES([long long],[AC_CHECK_SIZEOF(long long)])
dnl Check byte order
AC_C_BIGENDIAN
AC_ARG_WITH(system-zlib,
[ --with-system-zlib use installed libz])
ZLIBS=
ZDEPS=
ZINCS=
use_zlib=maybe
if test "$with_system_zlib" = yes; then
AC_CHECK_LIB(z, deflate, ZLIBS=-lz, use_zlib=no)
else
use_zlib=no
fi
if test "$use_zlib" = no; then
# Brain dead way to find tree's zlib.
ZDEPS='$(top_builddir)/../zlib/libz.a'
ZLIBS="$ZDEPS -L\$(here)/../zlib/$libsubdir"
ZINCS='-I$(top_srcdir)/../zlib'
fi
AC_SUBST(ZLIBS)
AC_SUBST(ZDEPS)
AC_SUBST(ZINCS)
# GCC LOCAL CHANGE
# We would like to our source tree to be readonly. However when releases or
# pre-releases are generated, the man pages need to be included as they are
# converted from the texi files via perl which we don't require end users to
# have installed.
# Therefore we have --enable-generated-files-in-srcdir to do just that.
AC_MSG_CHECKING([whether to place generated files in the source directory])
dnl generated-files-in-srcdir is disabled by default
AC_ARG_ENABLE(generated-files-in-srcdir,
[ --enable-generated-files-in-srcdir
put copies of generated files in source dir
intended for creating source tarballs for users
without texinfo, perl, bison or flex.],
generated_files_in_srcdir=$enableval,
generated_files_in_srcdir=no)
AC_MSG_RESULT($generated_files_in_srcdir)
AM_CONDITIONAL(GENINSRC, test x$generated_files_in_srcdir = xyes)
AC_OUTPUT(Makefile install-defs.sh)
/* dostime.c - convert dos time to/from time_t.
Copyright (C) 2002 Free Software Foundation
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <config.h>
#include <time.h>
#include <stddef.h>
#include "dostime.h"
/*
* The specification to which this was written. From Joe Buck.
* The DOS format appears to have only 2 second resolution. It is an
* unsigned long, and ORs together
*
* (year-1980)<<25
* month<<21 (month is tm_mon + 1, 1=Jan through 12=Dec)
* day<<16 (day is tm_mday, 1-31)
* hour<<11 (hour is tm_hour, 0-23)
* min<<5 (min is tm_min, 0-59)
* sec>>1 (sec is tm_sec, 0-59, that's right, we throw away the LSB)
*
* DOS uses local time, so the localtime() call is used to turn the time_t
* into a struct tm.
*/
time_t
dos2unixtime (unsigned long dostime)
{
struct tm ltime;
time_t now = time (NULL);
/* Call localtime to initialize timezone in TIME. */
ltime = *localtime (&now);
ltime.tm_year = (dostime >> 25) + 80;
ltime.tm_mon = ((dostime >> 21) & 0x0f) - 1;
ltime.tm_mday = (dostime >> 16) & 0x1f;
ltime.tm_hour = (dostime >> 11) & 0x0f;
ltime.tm_min = (dostime >> 5) & 0x3f;
ltime.tm_sec = (dostime & 0x1f) << 1;
ltime.tm_wday = -1;
ltime.tm_yday = -1;
ltime.tm_isdst = -1;
return mktime (&ltime);
}
unsigned long
unix2dostime (time_t *time)
{
struct tm *ltime = localtime (time);
int year = ltime->tm_year - 80;
if (year < 0)
year = 0;
return (year << 25
| (ltime->tm_mon + 1) << 21
| ltime->tm_mday << 16
| ltime->tm_hour << 11
| ltime->tm_min << 5
| ltime->tm_sec >> 1);
}
/*
dostime.h - function prototypes
Copyright (C) 1999, 2002 Bryan Burns
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
time_t dos2unixtime(unsigned long dostime);
unsigned long unix2dostime(time_t*);
\input texinfo @c -*-texinfo-*-
@setfilename fastjar.info
@settitle Guide to GNU jar utilites
@c Note: When reading this manual you'll find lots of strange
@c circumlocutions like ``compiler for the Java language''.
@c This is necessary due to Sun's restrictions on the use of
@c the word ``Java'.
@c When this manual is copyrighted.
@set copyrights-fastjar 2002
@include gcc-common.texi
@c Versions
@set which-gcj GCC-@value{version-GCC}
@ifinfo
@format
@dircategory Programming
@direntry
* fastjar: (fastjar). GNU jar utilities
@end direntry
@dircategory Individual utilities
@direntry
* fastjar: (fastjar)Invoking fastjar.
An archive tool for Java archives
* grepjar: (fastjar)Invoking grepjar.
Search files in a jar file for a pattern
@end direntry
@end format
@c man begin COPYRIGHT
Copyright (C) @value{copyrights-fastjar} Matthias Klose
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version. A copy of the license is included in the
@c man end
section entitled ``GNU General Public License''.
@ignore
@c man begin COPYRIGHT
man page gpl(7).
@c man end
@end ignore
@end ifinfo
@titlepage
@title GNU jar utilites
@author Brian Burns
@page
@vskip 0pt plus 1filll
Copyright @copyright{} @value{copyrights-gcj} Matthias Klose
@sp 2
For the @value{which-gcj} Version*
@sp 1
Published by the Free Software Foundation @*
51 Franklin Street, Fifth Floor@*
Boston, MA 02110-1301, USA@*
@sp 1
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version. A copy of the license is included in the
section entitled ``GNU General Public License''.
@end titlepage
@contents
@page
@node Top
@top Introduction
This manual describes how to use @command{fastjar} and @command{grepjar}.
@menu
* Invoking fastjar:: Options supported by @command{fastjar}
* Invoking grepjar:: Options supported by @command{grepjar}
* Copying:: The GNU General Public License
@end menu
@node Invoking fastjar
@chapter Invoking fastjar
@c man title fastjar archive tool for Java archives
@c man begin DESCRIPTION fastjar
@code{fastjar} is an implementation of Sun's jar utility that comes with
the JDK, written entirely in C, and runs in a fraction of the time while
being feature compatible.
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 @option{-m} and @option{-f} flags are specified.
@c man end
@ignore
@c man begin SYNOPSIS fastjar
fastjar @option{-ctxu} [@option{OPTIONS}] [@var{jar-file}] [@var{manifest-file}] [@option{-C} @var{dir}] @var{files}@dots{}
@c man end
@c man begin SEEALSO fastjar
gcj(1), gij(1), grepjar(1)
and the Info entry for @file{gcj}.
@c man end
@end ignore
@c man begin OPTIONS fastjar
Exactly one of the following actions must be specified:
@table @gcctabopt
@item -c
Create new archive.
@item -t
List table of contents for archive.
@item -x
Extract named (or all) files from archive.
@item -u
Update existing archive.
@end table
The following parameters are optional:
@table @gcctabopt
@item -@@
Read the names of the files to add to the archive from stdin. This
option is supported only in combination with @option{-c} or @option{-u}.
Non standard option added in the GCC version.
@item -C @var{directory}
Change to the @var{directory} and include the following file.
@item -E
Prevent fastjar from reading the content of a directory when specifying
one (and instead relying on the provided list of files to populate the
archive with regard to the directory entry). Non standard option added
in the GCC version.
@item -M
Do not create a manifest file for the entries.
@item -i
Generate an index of the packages in this jar and its Class-Path
(currently a no-op for jar command-line compatibility).
@item -0
Store only; use no ZIP compression.
@item -V
@itemx --version
Display version information.
@item -f @var{archive}
Specify archive file name.
@item -m @var{manifest}
Include manifest information from specified @var{manifest} file.
@item -v
Generate verbose output on standard output.
@end table
All remaining options are considered to be names of files.
@c man end
@node Invoking grepjar
@chapter Invoking grepjar
@c man title grepjar search files in a jar file for a pattern
@c man begin DESCRIPTION grepjar
The @code{grepjar} program can be used to search files in a jar file for
a pattern.
@c man end
@ignore
@c man begin SYNOPSIS grepjar
grepjar [@option{-bcinsw}] @option{-e} @var{PATTERN} | @var{PATTERN} @var{files}@dots{}
@c man end
@c man begin SEEALSO grepjar
fastjar(1), gcj(1), gij(1), gfdl(7) and the Info entry for @file{gcj}.
@c man end
@end ignore
@c man begin OPTIONS grepjar
@table @gcctabopt
@item -b
Print byte offset of match.
@item -c
Print number of matches.
@item -i
Compare case-insensitively.
@item -n
Print line number of each match.
@item -s
Suppress error messages.
@item -w
Force @var{PATTERN} to match only whole words.
@item -e @var{PATTERN}
Use @var{PATTERN} as regular expression.
@item --help
Print help, then exit.
@item -V
@itemx --version
Print version number, then exit.
@end table
@c man end
@include gpl.texi
@bye
CP=@CP@
STRIP=@STRIP@
CHMOD=@CHMOD@
prefix=@prefix@
exec_prefix=@exec_prefix@
BINDIR=@bindir@
/*
jargrep.h - header file for jargrep utility
Copyright (C) 2002 Free Software Foundation
Copyright (C) 2000 Cory Hollingsworth
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#define JG_PRINT_BYTEOFFSET 0x00000001
#define JG_PRINT_COUNT 0x00000002
#define JG_IGNORE_CASE 0x00000004
#define JG_PRINT_LINE_NUMBER 0x00000008
#define JG_SUPRESS_ERROR 0x00000010
#define JG_INVERT 0x00000020
#define JG_WORD_EXPRESSIONS 0x00000040
/* $Id: jartool.h,v 1.4 2000/08/24 15:23:35 cory Exp $
$Log: jartool.h,v $
Revision 1.4 2000/08/24 15:23:35 cory
Set version number since I think we can let this one out.
Revision 1.3 2000/08/23 19:42:17 cory
Added support for more Unix platforms. The following code has been hacked
to work on AIX, Solaris, True 64, and HP-UX.
Added bigendian check. Probably works on most big and little endian platforms
now.
Revision 1.2 1999/12/06 03:47:20 toast
fixing version string
Revision 1.1.1.1 1999/12/06 03:08:24 toast
initial checkin..
Revision 1.6 1999/05/10 09:16:08 burnsbr
*** empty log message ***
Revision 1.5 1999/04/27 10:04:20 burnsbr
configure support
Revision 1.4 1999/04/26 02:36:15 burnsbr
changed RDSZ to 4096 from 512
Revision 1.3 1999/04/23 12:00:29 burnsbr
modified zipentry struct
*/
/*
jartool.h - generic defines, struct defs etc.
Copyright (C) 1999, 2005 Bryan Burns
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef __FASTJAR_JARTOOL_H__
#define __FASTJAR_JARTOOL_H__
#include <sys/types.h>
#include "config.h"
#define ACTION_NONE 0
#define ACTION_CREATE 1
#define ACTION_EXTRACT 2
#define ACTION_UPDATE 3
#define ACTION_LIST 4
#define ACTION_INDEX 5
#define TRUE 1
#define FALSE 0
/* Amount of bytes to read at a time. You can change this to optimize for
your system */
#define RDSZ 4096
/* Change these to match your system:
ub1 == unsigned 1 byte word
ub2 == unsigned 2 byte word
ub4 == unsigned 4 byte word
*/
#if SIZEOF_CHAR == 1
typedef unsigned char ub1;
#else
typedef u_int8_t ub1;
#endif
#if SIZEOF_SHORT == 2
typedef unsigned short ub2;
#elif SIZEOF_INT == 2
typedef unsigned int ub2;
#else
typedef u_int16_t ub2;
#endif
#if SIZEOF_INT == 4
typedef unsigned int ub4;
#elif SIZEOF_LONG == 4
typedef unsigned long ub4;
#elif defined(HAVE_LONG_LONG) && SIZEOF_LONG_LONG == 4
typedef unsigned long long ub4;
#else
typedef u_int32_t ub4;
#endif
struct zipentry {
ub2 mod_time;
ub2 mod_date;
ub4 crc;
ub4 csize;
ub4 usize;
ub4 offset;
ub1 compressed;
ub2 flags;
char *filename;
struct zipentry *next_entry;
};
typedef struct zipentry zipentry;
#ifndef __GNUC__
#define __attribute__()
#endif
#endif /* __FASTJAR_JARTOOL_H__ */
/* $Id: pushback.c,v 1.2 2000/12/14 18:45:35 ghazi Exp $
$Log: pushback.c,v $
Revision 1.2 2000/12/14 18:45:35 ghazi
Warning fixes:
* compress.c: Include stdlib.h and compress.h.
(rcsid): Delete.
(report_str_error): Make static.
(ez_inflate_str): Delete unused variable. Add parens in if-stmt.
(hrd_inflate_str): Likewise.
* compress.h (init_compression, end_compression, init_inflation,
end_inflation): Prototype void arguments.
* dostime.c (rcsid): Delete.
* jargrep.c: Include ctype.h, stdlib.h, zlib.h and compress.h.
Make functions static. Cast ctype function argument to `unsigned
char'. Add parens in if-stmts. Constify.
(Usage): Change into a macro.
(jargrep): Remove unused parameter.
* jartool.c: Constify. Add parens in if-stmts. Align
signed/unsigned char pointers in functions calls using casts.
(rcsid): Delete.
(list_jar): Fix printf format specifier.
(usage): Chop long string into bits. Reformat.
* pushback.c (rcsid): Delete.
Revision 1.1 2000/12/09 03:08:23 apbianco
2000-12-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
* fastjar: Imported.
Revision 1.2 2000/08/23 19:42:17 cory
Added support for more Unix platforms. The following code has been hacked
to work on AIX, Solaris, True 64, and HP-UX.
Added bigendian check. Probably works on most big and little endian platforms
now.
Revision 1.1.1.1 1999/12/06 03:09:13 toast
initial checkin..
Revision 1.1 1999/05/10 08:32:37 burnsbr
Initial revision
*/
/*
pushback.c - code for a pushback buffer to handle file I/O
Copyright (C) 1999 Bryan Burns
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <unistd.h>
#include <string.h>
#include <stdio.h>
#include "jartool.h"
#include "pushback.h"
void pb_init(pb_file *pbf, int fd){
pbf->fd = fd;
pbf->next = pbf->pb_buff;
pbf->buff_amt = 0;
}
int pb_push(pb_file *pbf, void *buff, int amt){
int in_amt;
int wrap = 0;
#ifdef DEBUG
printf("%d bytes being pushed back to the buffer\n", amt);
#endif
/* determine how much we can take */
if((int)(RDSZ - pbf->buff_amt) < amt)
in_amt = RDSZ - pbf->buff_amt;
else
in_amt = amt;
if(in_amt == 0)
return 0;
/* figure out if we need to wrap around, and if so, by how much */
if(((pbf->pb_buff + RDSZ) - pbf->next) < in_amt)
wrap = in_amt - ((pbf->pb_buff + RDSZ) - pbf->next);
/* write everything up til the end of the buffer */
memcpy(pbf->next, buff, (in_amt - wrap));
/* finish writing what's wrapped around */
memcpy(pbf->pb_buff, ((char *)buff + (in_amt - wrap)), wrap);
/* update the buff_amt field */
pbf->buff_amt += in_amt;
#ifdef DEBUG
printf("%d bytes we can't accept\n", (amt - in_amt));
#endif
return in_amt;
}
int pb_read(pb_file *pbf, void *buff, int amt){
int out_amt = 0;
int wrap = 0;
void *bp = buff;
int tmp;
#ifdef DEBUG
printf("%d bytes requested from us\n", amt);
#endif
while(out_amt < amt){
/* if our push-back buffer contains some data */
if(pbf->buff_amt > 0){
#ifdef DEBUG
printf("giving data from buffer\n");
#endif
/* calculate how much we can actually give the caller */
if( (amt - out_amt) < (int)pbf->buff_amt )
tmp = (amt - out_amt);
else
tmp = pbf->buff_amt;
/* Determine if we're going to need to wrap around the buffer */
if(tmp > ((pbf->pb_buff + RDSZ) - pbf->next))
wrap = tmp - ((pbf->pb_buff + RDSZ) - pbf->next);
memcpy(bp, pbf->next, (tmp - wrap));
bp = &(((char *)bp)[tmp - wrap]);
/* If we need to wrap, read from the start of the buffer */
if(wrap > 0){
memcpy(bp, pbf->pb_buff, wrap);
bp = &(((char *)bp)[wrap]);
}
/* update the buff_amt field */
pbf->buff_amt -= tmp;
pbf->next += tmp;
#ifdef DEBUG
printf("%d bytes remaining in buffer\n", pbf->buff_amt);
#endif
/* if the buffer is empty, reset the next header to the front of the
buffer so subsequent pushbacks/reads won't have to wrap */
if(pbf->buff_amt == 0)
pbf->next = pbf->pb_buff;
out_amt += tmp;
} else {
#ifdef DEBUG
printf("Reading from file..\n");
#endif
/* The pushback buffer was empty, so we just need to read from the file */
tmp = read(pbf->fd, bp, (amt - out_amt));
if(tmp == 0)
break;
else
out_amt += tmp;
bp = &(((char *)bp)[tmp]);
}
}
#ifdef DEBUG
printf("managed to read %d bytes\n", out_amt);
#endif
return out_amt;
}
/*
pushback.h - header for pushback.c
Copyright (C) 1999 Bryan Burns
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
struct pb_file {
unsigned int buff_amt;
ub1 pb_buff[RDSZ];
int fd;
ub1 *next;
};
typedef struct pb_file pb_file;
void pb_init(pb_file *, int);
int pb_push(pb_file *, void *, int);
int pb_read(pb_file *, void *, int);
/* shift.c -- utilities to move regions of data in a file.
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at
your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
USA. */
#include <sys/types.h>
#include <unistd.h>
#include <stdio.h>
#include "jartool.h"
#include "shift.h"
#define BUFFER_SIZE 1024
#define MIN(a, b) ((a) < (b) ? (a) : (b))
/*
* Shift the contents of a file up by `amount' bytes, starting at `begin'.
* The file is not truncated, data from `amount' to `begin - amount' is
* overwritten. The current file pointer of `fd' is preserved. Note that
* this might be past the new "end" of the file.
*
* If this function is passed a `struct zipentry', then all `offset'
* fields from that entry down the list that are greater than or equal
* to `begin' will be decreased by `amount'.
*
* fd - The file descriptor.
* begin - The offset of the first byte that should be shifted.
* amount - The number of bytes to shift by.
* ze - A pointer into a list of zip entries that should be updated
* to reflect the modified offset.
*/
int
shift_up (int fd, off_t begin, off_t amount, struct zipentry *ze)
{
extern off_t end_of_entries;
int len, moved = 0;
ub1 buffer[BUFFER_SIZE];
off_t where, end, save;
if (amount <= 0)
return 0;
if ((save = lseek (fd, 0, SEEK_CUR)) == -1)
return 1;
if ((end = lseek (fd, 0, SEEK_END)) == -1)
return 1;
if (end < begin)
return 0;
where = begin;
do
{
if (lseek (fd, where, SEEK_SET) < 0)
return 1;
if ((len = read (fd, buffer, BUFFER_SIZE)) < 0)
return 1;
if (len == 0)
break;
if (lseek (fd, where - amount, SEEK_SET) < 0)
return 1;
if (write (fd, buffer, len) < 0)
return 1;
where += len;
}
while (where < end);
for (; ze; ze = ze->next_entry)
{
if ((off_t) ze->offset >= begin)
{
ze->offset -= amount;
moved = 1;
}
}
if (moved)
end_of_entries -= amount;
if (lseek (fd, save, SEEK_SET) == -1)
return 1;
return 0;
}
/*
* Shift the contents of this file down by `amount' bytes, extending the
* end of file, starting at `begin'. This function will preserve the
* current file pointer of `fd'. Naturally, this function will fail if
* `fd' is not seekable.
*
* If this function is passed a `struct zipentry', then all `offset'
* fields from that entry down the list that are greater than or equal
* to `begin' will be increased by `amount'.
*
* fd - The file descriptor.
* begin - The offset of the first byte that should be shifted.
* amount - The number of bytes to shift by.
* ze - A pointer into a list of zip entries that should be updated
* to reflect the modified offset.
*/
int
shift_down (int fd, off_t begin, off_t amount, struct zipentry *ze)
{
extern off_t end_of_entries;
int off, len, moved = 0;
ub1 buffer[BUFFER_SIZE];
off_t where, save;
if (amount <= 0)
return 0;
if ((save = lseek (fd, 0, SEEK_CUR)) == -1)
return 1;
if ((where = lseek (fd, 0, SEEK_END)) == -1)
return 1;
if (where < begin)
return 0;
off = (where - begin) % BUFFER_SIZE;
if (off == 0)
where -= BUFFER_SIZE;
else
where -= off;
do
{
if (lseek (fd, where, SEEK_SET) < 0)
return 1;
if ((len = read (fd, buffer, BUFFER_SIZE)) < 0)
return 1;
if (lseek (fd, where + amount, SEEK_SET) < 0)
return 1;
if (write (fd, buffer, len) < 0)
return 1;
where -= BUFFER_SIZE;
}
while (where >= begin);
for (; ze; ze = ze->next_entry)
{
if ((off_t) ze->offset >= begin)
{
ze->offset += amount;
moved = 1;
}
}
if (moved)
end_of_entries += amount;
if (lseek (fd, save, SEEK_SET) == -1)
return 1;
return 0;
}
/* shift.h -- utilities to move regions of data in a file.
Copyright (C) 2004 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at
your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
USA. */
#ifndef __FASTJAR_SHIFT_H__
#define __FASTJAR_SHIFT_H__
#include <sys/types.h>
#include "jartool.h"
int shift_down (int, off_t, off_t, struct zipentry *);
int shift_up (int, off_t, off_t, struct zipentry *);
#endif /* __FASTJAR_SHIFT_H__ */
/* $Id: zipfile.h,v 1.1.1.1 1999/12/06 03:09:11 toast Exp $
$Log: zipfile.h,v $
Revision 1.1.1.1 1999/12/06 03:09:11 toast
initial checkin..
Revision 1.6 1999/05/10 08:33:08 burnsbr
added UNPACK_UB4 and UNPACK_UB2
Revision 1.5 1999/04/26 02:36:34 burnsbr
added LOC_EXTRA macro
Revision 1.4 1999/04/23 12:01:19 burnsbr
added more defines
*/
/*
zipfile.h - defines for indexing zipfile headers
Copyright (C) 1999 Bryan Burns
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#define LOC_EXTRA 6 /* extra bytes */
#define LOC_COMP 8 /* compression method */
#define LOC_MODTIME 10 /* last modification time */
#define LOC_MODDATE 12 /* last modification date */
#define LOC_CRC 14 /* CRC */
#define LOC_CSIZE 18 /* compressed size */
#define LOC_USIZE 22 /* uncompressed size */
#define LOC_FNLEN 26 /* filename length */
#define LOC_EFLEN 28 /* extra-field length */
#define CEN_FLAGS 8
#define CEN_COMP 10 /* compression method */
#define CEN_MODTIME 12
#define CEN_MODDATE 14
#define CEN_CRC 16
#define CEN_CSIZE 20
#define CEN_USIZE 24
#define CEN_FNLEN 28
#define CEN_EFLEN 30
#define CEN_COMLEN 32
#define CEN_OFFSET 42
/* macros */
#define PACK_UB4(d, o, v) d[o] = (ub1)((v) & 0x000000ff); \
d[o + 1] = (ub1)(((v) & 0x0000ff00) >> 8); \
d[o + 2] = (ub1)(((v) & 0x00ff0000) >> 16); \
d[o + 3] = (ub1)(((v) & 0xff000000) >> 24)
#define PACK_UB2(d, o, v) d[o] = (ub1)((v) & 0x00ff); \
d[o + 1] = (ub1)(((v) & 0xff00) >> 8)
#define UNPACK_UB4(s, o) (ub4)s[o] + (((ub4)s[o + 1]) << 8) +\
(((ub4)s[o + 2]) << 16) + (((ub4)s[o + 3]) << 24)
#define UNPACK_UB2(s, o) (ub2)s[o] + (((ub2)s[o + 1]) << 8)
2006-04-03 Tom Tromey <tromey@redhat.com>
* Makefile.in: Rebuilt.
* Makefile.am (ZIP): Removed.
(libgcj-$(gcc_version).jar): Use $(JAR).
(src.zip): Likewise.
* configure: Rebuilt.
* configure.ac: Check for jar. Removed code to set ZIP.
2006-04-03 Andrew Haley <aph@redhat.com>
* testsuite/libjava.lang/Float_2.java: New file.
......
......@@ -87,7 +87,6 @@ bin_SCRIPTS = addr2name.awk
##
GCJH = @GCJH@
ZIP = @ZIP@
## The compiler with whatever flags we want for both -c and -C
## compiles.
......@@ -322,10 +321,7 @@ $(propertyo_files): %.lo: classpath/resource/%
$(LTGCJCOMPILE) -o $@ -c $< -Wc,--resource,$(@:.lo=)
libgcj-$(gcc_version).jar:
jardir=`dirname $(ZIP)`; \
jardir=`cd $$jardir && pwd`; \
jarname=`basename $(ZIP)`; \
cd classpath/lib; $$jardir/$$jarname -cfM \
cd classpath/lib; $(JAR) -cfM \
../../libgcj-$(gcc_version).jar gnu java javax org
CLEANFILES = libgcj-$(gcc_version).jar \
......@@ -883,9 +879,10 @@ src.zip:
echo $$file; \
done ); \
) | \
## Many of the above circumlocutions are because ZIP will most likely
## be a relative path to fastjar.
$(ZIP) -cfM@ $$here/src.zip
## Many of the above circumlocutions were because ZIP used to be a
## relative path to fastjar. It didn't seem worthwhile to change the
## code when we moved to an external jar.
$(JAR) -cfM@ $$here/src.zip
## Override GNU Classpath sources with libgcj replacements.
here=`pwd`; \
( \
......@@ -897,7 +894,7 @@ src.zip:
echo $$file; \
done ); \
) | \
$(ZIP) -ufM@ $$here/src.zip
$(JAR) -ufM@ $$here/src.zip
## We use a variable for this in case the user wants to override it.
sourcesdir = $(jardir)
......
......@@ -488,6 +488,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INTERPRETER = @INTERPRETER@
JAR = @JAR@
JAVA_HOME = @JAVA_HOME@
JAVA_HOME_SET_FALSE = @JAVA_HOME_SET_FALSE@
JAVA_HOME_SET_TRUE = @JAVA_HOME_SET_TRUE@
......@@ -579,7 +580,6 @@ X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_LIBS = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
ZINCS = @ZINCS@
ZIP = @ZIP@
ZLIBS = @ZLIBS@
ZLIBSPEC = @ZLIBSPEC@
ZLIBTESTSPEC = @ZLIBTESTSPEC@
......@@ -8423,10 +8423,7 @@ $(propertyo_files): %.lo: classpath/resource/%
$(LTGCJCOMPILE) -o $@ -c $< -Wc,--resource,$(@:.lo=)
libgcj-$(gcc_version).jar:
jardir=`dirname $(ZIP)`; \
jardir=`cd $$jardir && pwd`; \
jarname=`basename $(ZIP)`; \
cd classpath/lib; $$jardir/$$jarname -cfM \
cd classpath/lib; $(JAR) -cfM \
../../libgcj-$(gcc_version).jar gnu java javax org
mostlyclean-local:
......@@ -10726,7 +10723,7 @@ src.zip:
echo $$file; \
done ); \
) | \
$(ZIP) -cfM@ $$here/src.zip
$(JAR) -cfM@ $$here/src.zip
here=`pwd`; \
( \
( cd $(srcdir); \
......@@ -10737,7 +10734,7 @@ src.zip:
echo $$file; \
done ); \
) | \
$(ZIP) -ufM@ $$here/src.zip
$(JAR) -ufM@ $$here/src.zip
install-src.zip: src.zip
$(INSTALL_DATA) src.zip $(DESTDIR)$(sourcesdir)/src-$(gcc_version).zip
......
......@@ -310,7 +310,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os build_subdir host_subdir target_subdir libgcj_basedir host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical LN_S mkinstalldirs CC ac_ct_CC EXEEXT OBJEXT CXX ac_ct_CXX CFLAGS CXXFLAGS LDFLAGS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE AS ac_ct_AS LD ac_ct_LD AR ac_ct_AR RANLIB ac_ct_RANLIB MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT LIBGCJ_CFLAGS LIBGCJ_CXXFLAGS LIBGCJ_JAVAFLAGS LIBGCJ_LD_SYMBOLIC LIBGCJDEBUG TOOLKIT XLIB_AWT_TRUE XLIB_AWT_FALSE GTK_AWT_TRUE GTK_AWT_FALSE QT_AWT_TRUE QT_AWT_FALSE GCJH ZIP INCLTDL LIBLTDL DIRLTDL LIBTOOL CXXCPP CPPFLAGS GCJ GCJFLAGS GCJDEPMODE am__fastdepGCJ_TRUE am__fastdepGCJ_FALSE subdirs TESTSUBDIR_TRUE TESTSUBDIR_FALSE JAVA_HOME_SET_TRUE JAVA_HOME_SET_FALSE JAVA_HOME INTERPRETER LIBFFI LIBFFIINCS PLATFORM_INNER_NAT_HDRS CPP EGREP USING_WIN32_PLATFORM_TRUE USING_WIN32_PLATFORM_FALSE USING_POSIX_PLATFORM_TRUE USING_POSIX_PLATFORM_FALSE USING_DARWIN_CRT_TRUE USING_DARWIN_CRT_FALSE SYSTEMSPEC LIBGCJTESTSPEC ZLIBSPEC ZLIBTESTSPEC X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS GTK_CAIRO_TRUE GTK_CAIRO_FALSE PKG_CONFIG CAIRO_CFLAGS CAIRO_LIBS PANGOFT2_CFLAGS PANGOFT2_LIBS extra_ldflags_libjava GCLIBS GCINCS GCDEPS GCSPEC JC1GCSPEC GCTESTSPEC USING_BOEHMGC_TRUE USING_BOEHMGC_FALSE USING_NOGC_TRUE USING_NOGC_FALSE THREADLIBS THREADINCS THREADDEPS THREADSPEC THREADLDFLAGS THREADCXXFLAGS USING_POSIX_THREADS_TRUE USING_POSIX_THREADS_FALSE USING_WIN32_THREADS_TRUE USING_WIN32_THREADS_FALSE USING_NO_THREADS_TRUE USING_NO_THREADS_FALSE HASH_SYNC_SPEC USING_GCC_TRUE USING_GCC_FALSE LIBICONV LTLIBICONV GTK_CFLAGS GTK_LIBS GLIB_CFLAGS GLIB_LIBS LIBART_CFLAGS LIBART_LIBS CLASSPATH_SEPARATOR ac_ct_GCJ ZLIBS SYS_ZLIBS ZINCS DIVIDESPEC CHECKREFSPEC EXCEPTIONSPEC BACKTRACESPEC IEEESPEC NATIVE_TRUE NATIVE_FALSE NEEDS_DATA_START_TRUE NEEDS_DATA_START_FALSE GCC_UNWIND_INCLUDE toolexecdir toolexecmainlibdir toolexeclibdir dbexecdir GCJVERSION gxx_include_dir libstdcxx_incdir ALLOCA PERL SYSDEP_SOURCES LD_START_STATIC_SPEC LD_FINISH_STATIC_SPEC here LIBOBJS LTLIBOBJS'
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os build_subdir host_subdir target_subdir libgcj_basedir host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical LN_S mkinstalldirs CC ac_ct_CC EXEEXT OBJEXT CXX ac_ct_CXX CFLAGS CXXFLAGS LDFLAGS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE AS ac_ct_AS LD ac_ct_LD AR ac_ct_AR RANLIB ac_ct_RANLIB JAR MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT LIBGCJ_CFLAGS LIBGCJ_CXXFLAGS LIBGCJ_JAVAFLAGS LIBGCJ_LD_SYMBOLIC LIBGCJDEBUG TOOLKIT XLIB_AWT_TRUE XLIB_AWT_FALSE GTK_AWT_TRUE GTK_AWT_FALSE QT_AWT_TRUE QT_AWT_FALSE GCJH INCLTDL LIBLTDL DIRLTDL LIBTOOL CXXCPP CPPFLAGS GCJ GCJFLAGS GCJDEPMODE am__fastdepGCJ_TRUE am__fastdepGCJ_FALSE subdirs TESTSUBDIR_TRUE TESTSUBDIR_FALSE JAVA_HOME_SET_TRUE JAVA_HOME_SET_FALSE JAVA_HOME INTERPRETER LIBFFI LIBFFIINCS PLATFORM_INNER_NAT_HDRS CPP EGREP USING_WIN32_PLATFORM_TRUE USING_WIN32_PLATFORM_FALSE USING_POSIX_PLATFORM_TRUE USING_POSIX_PLATFORM_FALSE USING_DARWIN_CRT_TRUE USING_DARWIN_CRT_FALSE SYSTEMSPEC LIBGCJTESTSPEC ZLIBSPEC ZLIBTESTSPEC X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS GTK_CAIRO_TRUE GTK_CAIRO_FALSE PKG_CONFIG CAIRO_CFLAGS CAIRO_LIBS PANGOFT2_CFLAGS PANGOFT2_LIBS extra_ldflags_libjava GCLIBS GCINCS GCDEPS GCSPEC JC1GCSPEC GCTESTSPEC USING_BOEHMGC_TRUE USING_BOEHMGC_FALSE USING_NOGC_TRUE USING_NOGC_FALSE THREADLIBS THREADINCS THREADDEPS THREADSPEC THREADLDFLAGS THREADCXXFLAGS USING_POSIX_THREADS_TRUE USING_POSIX_THREADS_FALSE USING_WIN32_THREADS_TRUE USING_WIN32_THREADS_FALSE USING_NO_THREADS_TRUE USING_NO_THREADS_FALSE HASH_SYNC_SPEC USING_GCC_TRUE USING_GCC_FALSE LIBICONV LTLIBICONV GTK_CFLAGS GTK_LIBS GLIB_CFLAGS GLIB_LIBS LIBART_CFLAGS LIBART_LIBS CLASSPATH_SEPARATOR ac_ct_GCJ ZLIBS SYS_ZLIBS ZINCS DIVIDESPEC CHECKREFSPEC EXCEPTIONSPEC BACKTRACESPEC IEEESPEC NATIVE_TRUE NATIVE_FALSE NEEDS_DATA_START_TRUE NEEDS_DATA_START_FALSE GCC_UNWIND_INCLUDE toolexecdir toolexecmainlibdir toolexeclibdir dbexecdir GCJVERSION gxx_include_dir libstdcxx_incdir ALLOCA PERL SYSDEP_SOURCES LD_START_STATIC_SPEC LD_FINISH_STATIC_SPEC here LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
......@@ -3964,6 +3964,52 @@ else
RANLIB="$ac_cv_prog_RANLIB"
fi
for ac_prog in jar fastjar
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_JAR+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$JAR"; then
ac_cv_prog_JAR="$JAR" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_JAR="$ac_prog"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
fi
fi
JAR=$ac_cv_prog_JAR
if test -n "$JAR"; then
echo "$as_me:$LINENO: result: $JAR" >&5
echo "${ECHO_T}$JAR" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
test -n "$JAR" && break
done
test -n "$JAR" || JAR="false"
if test "$JAR" = false; then
{ { echo "$as_me:$LINENO: error: jar program not found" >&5
echo "$as_me: error: jar program not found" >&2;}
{ (exit 1); exit 1; }; }
fi
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
......@@ -4805,7 +4851,6 @@ case "${which_gcj}" in
built)
GCJ="$built_gcc_dir/gcj -B`${PWDCMD-pwd}`/ -B$built_gcc_dir/"
GCJH='$(top_builddir)/$(MULTIBUILDTOP)../../$(host_subdir)/gcc/gcjh'
ZIP='$(top_builddir)/$(MULTIBUILDTOP)../../$(host_subdir)/fastjar/fastjar'
;;
cross)
if test "x${with_newlib}" = "xyes"; then
......@@ -4815,21 +4860,16 @@ case "${which_gcj}" in
else
GCJ="${target_noncanonical}-gcj -B`${PWDCMD-pwd}`/"
fi
ZIP='$(target_noncanonical)-fastjar'
GCJH='$(target_noncanonical)-gcjh'
;;
path)
GCJ="gcj -B`${PWDCMD-pwd}`/"
## In this case, gcj is found outside the build tree. However, zip is
## found in the build tree.
ZIP='$(top_builddir)/$(MULTIBUILDTOP)../$(COMPPATH)/fastjar/fastjar'
GCJH=gcjh
;;
esac
# Create it, so that compile/link tests don't fail
test -f libgcj.spec || touch libgcj.spec
......@@ -5668,7 +5708,7 @@ test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
case $host in
*-*-irix6*)
# Find out which ABI we are using.
echo '#line 5671 "configure"' > conftest.$ac_ext
echo '#line 5711 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
......@@ -6671,7 +6711,7 @@ if test "${enable_sjlj_exceptions+set}" = set; then
:
else
cat > conftest.$ac_ext << EOF
#line 6674 "configure"
#line 6714 "configure"
struct S { ~S(); };
void bar();
void foo()
......@@ -17807,6 +17847,7 @@ s,@AR@,$AR,;t t
s,@ac_ct_AR@,$ac_ct_AR,;t t
s,@RANLIB@,$RANLIB,;t t
s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
s,@JAR@,$JAR,;t t
s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t
s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t
s,@MAINT@,$MAINT,;t t
......@@ -17823,7 +17864,6 @@ s,@GTK_AWT_FALSE@,$GTK_AWT_FALSE,;t t
s,@QT_AWT_TRUE@,$QT_AWT_TRUE,;t t
s,@QT_AWT_FALSE@,$QT_AWT_FALSE,;t t
s,@GCJH@,$GCJH,;t t
s,@ZIP@,$ZIP,;t t
s,@INCLTDL@,$INCLTDL,;t t
s,@LIBLTDL@,$LIBLTDL,;t t
s,@DIRLTDL@,$DIRLTDL,;t t
......
......@@ -116,6 +116,10 @@ AC_CHECK_TOOL(AS, as)
AC_CHECK_TOOL(LD, ld)
AC_CHECK_TOOL(AR, ar)
AC_CHECK_TOOL(RANLIB, ranlib, :)
AC_CHECK_PROGS(JAR, [jar fastjar], false)
if test "$JAR" = false; then
AC_MSG_ERROR(jar program not found)
fi
AC_PROG_INSTALL
......@@ -289,7 +293,6 @@ case "${which_gcj}" in
built)
GCJ="$built_gcc_dir/gcj -B`${PWDCMD-pwd}`/ -B$built_gcc_dir/"
GCJH='$(top_builddir)/$(MULTIBUILDTOP)../../$(host_subdir)/gcc/gcjh'
ZIP='$(top_builddir)/$(MULTIBUILDTOP)../../$(host_subdir)/fastjar/fastjar'
;;
cross)
if test "x${with_newlib}" = "xyes"; then
......@@ -299,20 +302,15 @@ case "${which_gcj}" in
else
GCJ="${target_noncanonical}-gcj -B`${PWDCMD-pwd}`/"
fi
ZIP='$(target_noncanonical)-fastjar'
GCJH='$(target_noncanonical)-gcjh'
;;
path)
GCJ="gcj -B`${PWDCMD-pwd}`/"
## In this case, gcj is found outside the build tree. However, zip is
## found in the build tree.
ZIP='$(top_builddir)/$(MULTIBUILDTOP)../$(COMPPATH)/fastjar/fastjar'
GCJH=gcjh
;;
esac
AC_SUBST(GCJH)
AC_SUBST(ZIP)
# Create it, so that compile/link tests don't fail
test -f libgcj.spec || touch libgcj.spec
......
......@@ -138,6 +138,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INTERPRETER = @INTERPRETER@
JAR = @JAR@
JAVA_HOME = @JAVA_HOME@
JAVA_HOME_SET_FALSE = @JAVA_HOME_SET_FALSE@
JAVA_HOME_SET_TRUE = @JAVA_HOME_SET_TRUE@
......@@ -229,7 +230,6 @@ X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_LIBS = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
ZINCS = @ZINCS@
ZIP = @ZIP@
ZLIBS = @ZLIBS@
ZLIBSPEC = @ZLIBSPEC@
ZLIBTESTSPEC = @ZLIBTESTSPEC@
......
......@@ -137,6 +137,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INTERPRETER = @INTERPRETER@
JAR = @JAR@
JAVA_HOME = @JAVA_HOME@
JAVA_HOME_SET_FALSE = @JAVA_HOME_SET_FALSE@
JAVA_HOME_SET_TRUE = @JAVA_HOME_SET_TRUE@
......@@ -228,7 +229,6 @@ X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_LIBS = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
ZINCS = @ZINCS@
ZIP = @ZIP@
ZLIBS = @ZLIBS@
ZLIBSPEC = @ZLIBSPEC@
ZLIBTESTSPEC = @ZLIBTESTSPEC@
......
......@@ -126,6 +126,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INTERPRETER = @INTERPRETER@
JAR = @JAR@
JAVA_HOME = @JAVA_HOME@
JAVA_HOME_SET_FALSE = @JAVA_HOME_SET_FALSE@
JAVA_HOME_SET_TRUE = @JAVA_HOME_SET_TRUE@
......@@ -217,7 +218,6 @@ X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_LIBS = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
ZINCS = @ZINCS@
ZIP = @ZIP@
ZLIBS = @ZLIBS@
ZLIBSPEC = @ZLIBSPEC@
ZLIBTESTSPEC = @ZLIBTESTSPEC@
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment