This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: Patch: install libgcj.jar as libgcj-VERSION.jar
On Mon, 2002-04-08 at 11:54, Tom Tromey wrote:
> I think it would be better to just build and install
> libgcj-VERSION.jar, and avoid this `mv' and other stuff.
> What do you think?
Ok. Per and Mark have approved the compiler change. Ok for trunk and
branch?
Thanks,
AG
2002-04-09 Anthony Green <green@redhat.com>
* Makefile.am (jardir, jar_DATA): Define (for libgcj.jar).
Create libgcj-@gcc_version@.jar instead of libgcj.jar.
* Makefile.in: Rebuilt.
* configure.in: Substitute gcc_version.
* configure: Rebuilt.
Index: Makefile.am
===================================================================
RCS file: /cvs/gcc/gcc/libjava/Makefile.am,v
retrieving revision 1.202.2.8
diff -c -r1.202.2.8 Makefile.am
*** Makefile.am 26 Mar 2002 00:53:16 -0000 1.202.2.8
--- Makefile.am 9 Apr 2002 04:14:04 -0000
***************
*** 31,37 ****
toolexeclib_LTLIBRARIES = libgcj.la $(cond_x_ltlibrary)
toolexeclib_DATA = libgcj.spec
! data_DATA = libgcj.jar
## FIXME: Using libdir violates GNU coding standards.
secdir = $(libdir)/security
--- 31,39 ----
toolexeclib_LTLIBRARIES = libgcj.la $(cond_x_ltlibrary)
toolexeclib_DATA = libgcj.spec
!
! jardir = $(datadir)/java
! jar_DATA = libgcj-@gcc_version@.jar
## FIXME: Using libdir violates GNU coding standards.
secdir = $(libdir)/security
***************
*** 145,151 ****
libgcjx_la_SOURCES = $(x_nat_source_files)
EXTRA_libgcjx_la_SOURCES = $(x_java_source_files)
! libgcjx_la_DEPENDENCIES = libgcj.jar $(x_javao_files)
libgcjx_la_LIBADD = $(x_javao_files)
libgcjx_la_LDFLAGS = @X_PRE_LIBS@ @X_LIBS@ -lX11 @X_EXTRA_LIBS@ \
-rpath $(toolexeclibdir) \
--- 147,153 ----
libgcjx_la_SOURCES = $(x_nat_source_files)
EXTRA_libgcjx_la_SOURCES = $(x_java_source_files)
! libgcjx_la_DEPENDENCIES = libgcj-@gcc_version@.jar $(x_javao_files)
libgcjx_la_LIBADD = $(x_javao_files)
libgcjx_la_LDFLAGS = @X_PRE_LIBS@ @X_LIBS@ -lX11 @X_EXTRA_LIBS@ \
-rpath $(toolexeclibdir) \
***************
*** 167,179 ****
## a .java file with some other class which is caught. Note that we
## only want to create headers for those files which do not have
## hand-maintained headers.
! $(built_java_source_files:.java=.class): libgcj.jar
! $(java_source_files:.java=.class): libgcj.jar
## The .class files for X will not be included in libgcj.jar, but the
## rule for libgcj.jar will cause all out-of-date .class files to be
## built. We need this to generate headers for the nat-files.
! $(x_java_source_files:.java=.class): libgcj.jar
## We have the zip file depend on the java sources and not the class
## files, because we don't know the names of all the class files.
--- 169,181 ----
## a .java file with some other class which is caught. Note that we
## only want to create headers for those files which do not have
## hand-maintained headers.
! $(built_java_source_files:.java=.class): libgcj-@gcc_version@.jar
! $(java_source_files:.java=.class): libgcj-@gcc_version@.jar
## The .class files for X will not be included in libgcj.jar, but the
## rule for libgcj.jar will cause all out-of-date .class files to be
## built. We need this to generate headers for the nat-files.
! $(x_java_source_files:.java=.class): libgcj-@gcc_version@.jar
## We have the zip file depend on the java sources and not the class
## files, because we don't know the names of all the class files.
***************
*** 181,187 ****
## up-to-date, and foo.class is removed, and bar.java is touched, then
## `make libgcj.jar' will not rebuilt foo.class. That's because
## libgcj.jar is not out-of-date with respect to foo.java.
! libgcj.jar: $(built_java_source_files) $(java_source_files) $(x_java_source_files)
## Create a list of all Java sources, without exceeding any shell limits.
@: $(shell echo Creating list of files to compile...) $(shell rm -f tmp-list || :) $(shell touch tmp-list) $(foreach source,$?,$(shell echo $(source) >> tmp-list))
@set fnord $(MAKEFLAGS); amf=$$2; fail=no; \
--- 183,189 ----
## up-to-date, and foo.class is removed, and bar.java is touched, then
## `make libgcj.jar' will not rebuilt foo.class. That's because
## libgcj.jar is not out-of-date with respect to foo.java.
! libgcj-@gcc_version@.jar: $(built_java_source_files) $(java_source_files) $(x_java_source_files)
## Create a list of all Java sources, without exceeding any shell limits.
@: $(shell echo Creating list of files to compile...) $(shell rm -f tmp-list || :) $(shell touch tmp-list) $(foreach source,$?,$(shell echo $(source) >> tmp-list))
@set fnord $(MAKEFLAGS); amf=$$2; fail=no; \
***************
*** 192,205 ****
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes ;; *) exit 1;; esac; \
done; \
test "$$fail" = no)
! -@rm -f tmp-list libgcj.jar
## Note that we explicitly want to include directory information.
find java gnu javax org -type d -o -type f -name '*.class' | \
sed -e '/\/\./d' -e '/\/xlib/d' | \
$(ZIP) cfM0E@ $@
MOSTLYCLEANFILES = $(javao_files) $(nat_files) $(nat_headers) $(c_files) $(x_javao_files) $(x_nat_files) $(x_nat_headers)
! CLEANFILES = tmp-list libgcj.jar
clean-local:
## We just remove every .class file that was created.
--- 194,207 ----
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes ;; *) exit 1;; esac; \
done; \
test "$$fail" = no)
! -@rm -f tmp-list libgcj-@gcc_version@.jar
## Note that we explicitly want to include directory information.
find java gnu javax org -type d -o -type f -name '*.class' | \
sed -e '/\/\./d' -e '/\/xlib/d' | \
$(ZIP) cfM0E@ $@
MOSTLYCLEANFILES = $(javao_files) $(nat_files) $(nat_headers) $(c_files) $(x_javao_files) $(x_nat_files) $(x_nat_headers)
! CLEANFILES = tmp-list libgcj-@gcc_version@.jar
clean-local:
## We just remove every .class file that was created.
***************
*** 383,389 ****
## This rule can be used to see if the headers are more or less
## correct.
! header-check: libgcj.jar $(nat_headers)
rm -f htest.cc; \
for h in $(nat_headers); do \
echo "#include \"$$h\"" >> htest.cc; \
--- 385,391 ----
## This rule can be used to see if the headers are more or less
## correct.
! header-check: libgcj-@gcc_version@.jar $(nat_headers)
rm -f htest.cc; \
for h in $(nat_headers); do \
echo "#include \"$$h\"" >> htest.cc; \
***************
*** 392,398 ****
## This rule can be used to see if all the .class files verify
## correctly.
! class-check: libgcj.jar
@ok=0; find . -name '*.class' -print | fgrep -v testsuite | \
while read f; do \
echo "$(GCJ_WITH_FLAGS) --syntax-only $$f"; \
--- 394,400 ----
## This rule can be used to see if all the .class files verify
## correctly.
! class-check: libgcj-@gcc_version@.jar
@ok=0; find . -name '*.class' -print | fgrep -v testsuite | \
while read f; do \
echo "$(GCJ_WITH_FLAGS) --syntax-only $$f"; \
Index: configure.in
===================================================================
RCS file: /cvs/gcc/gcc/libjava/configure.in,v
retrieving revision 1.114.2.10
diff -c -r1.114.2.10 configure.in
*** configure.in 27 Mar 2002 16:40:25 -0000 1.114.2.10
--- configure.in 9 Apr 2002 04:14:28 -0000
***************
*** 448,453 ****
--- 448,454 ----
tool_include_dir='$(libdir)/gcc-lib/$(target_alias)/'${gcc_version}/include
changequote([,])dnl
AC_SUBST(tool_include_dir)
+ AC_SUBST(gcc_version)
if test -n "${with_cross_host}"; then
# We are being configured with a cross compiler. AC_REPLACE_FUNCS