Commit 9dd668d2 by Bryce McKinlay

Makefile.am (nat_headers, [...]): Depend on .class files, not libgcj.jar.

	* Makefile.am (nat_headers, x_nat_headers): Depend on .class files, not
	libgcj.jar.
	(nat_files, x_nat_files): Build native files in subdirectories using
	the same dependency options as the java files.
	(gnu/gcj/runtime/FirstThread.h): Remove explicit rule and friend
	declarations.
	* configure.in: Put dependencies for .cc files in deps.mak.
	* Makefile.in: Rebuilt.
	* configure: Rebuilt.

From-SVN: r47471
parent 649ce3f2
2001-11-30 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
* Makefile.am (nat_headers, x_nat_headers): Depend on .class files, not
libgcj.jar.
(nat_files, x_nat_files): Build native files in subdirectories using
the same dependency options as the java files.
(gnu/gcj/runtime/FirstThread.h): Remove explicit rule and friend
declarations.
* configure.in: Put dependencies for .cc files in deps.mak.
* Makefile.in: Rebuilt.
* configure: Rebuilt.
2001-11-25 Tom Tromey <tromey@redhat.com> 2001-11-25 Tom Tromey <tromey@redhat.com>
Fix for PR libgcj/2024, plus other class name cleanups: Fix for PR libgcj/2024, plus other class name cleanups:
...@@ -37,6 +49,7 @@ ...@@ -37,6 +49,7 @@
* java/math/BigDecimal.java (BigDecimal(double)): Rewrote. * java/math/BigDecimal.java (BigDecimal(double)): Rewrote.
(BigDecimal(String)): Likewise. (BigDecimal(String)): Likewise.
>>>>>>> 1.1022
2001-11-19 Tom Tromey <tromey@redhat.com> 2001-11-19 Tom Tromey <tromey@redhat.com>
* verify.cc (_Jv_BytecodeVerifier::branch_prepass) [op_iinc]: * verify.cc (_Jv_BytecodeVerifier::branch_prepass) [op_iinc]:
......
...@@ -217,13 +217,7 @@ SUFFIXES = .class .java .h ...@@ -217,13 +217,7 @@ SUFFIXES = .class .java .h
## subdirs. FIXME. ## subdirs. FIXME.
$(nat_files) $(x_nat_files): %.lo: %.cc $(nat_files) $(x_nat_files): %.lo: %.cc
@echo '$(LTCXXCOMPILE) -c -o $@ $<'; \ @echo '$(LTCXXCOMPILE) -c -o $@ $<'; \
$(LTCXXCOMPILE) -Wp,-MD,.deps/$(*F).pp -c -o $@ $< $(LTCXXCOMPILE) -MD -MT $@ -MF $*.d -c -o $@ $<
@-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
< .deps/$(*F).pp > .deps/$(*F).P; \
tr ' ' '\012' < .deps/$(*F).pp \
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
>> .deps/$(*F).P; \
rm -f .deps/$(*F).pp
## FIXME: GNU make. ## FIXME: GNU make.
$(c_files): %.lo: %.c $(c_files): %.lo: %.c
...@@ -259,29 +253,25 @@ libgcjx.la: $(libgcjx_la_OBJECTS) $(libgcjx_la_DEPENDENCIES) ...@@ -259,29 +253,25 @@ libgcjx.la: $(libgcjx_la_OBJECTS) $(libgcjx_la_DEPENDENCIES)
$(GCJH) -classpath $(top_builddir) $(basename $<) $(GCJH) -classpath $(top_builddir) $(basename $<)
## Header files used when compiling some of the nat* files. ## Header files used when compiling some of the nat* files.
nat_headers = $(ordinary_java_source_files:.java=.h) \ ordinary_nat_headers = $(ordinary_java_source_files:.java=.h) \
$(built_java_source_files:.java=.h) \ $(built_java_source_files:.java=.h)
java/io/ObjectOutputStream$$PutField.h \
inner_nat_headers = java/io/ObjectOutputStream$$PutField.h \
java/io/ObjectInputStream$$GetField.h java/io/ObjectInputStream$$GetField.h
nat_headers = $(ordinary_nat_headers) $(inner_nat_headers)
x_nat_headers = $(x_java_source_files:.java=.h) x_nat_headers = $(x_java_source_files:.java=.h)
$(nat_headers) $(x_nat_headers): libgcj.jar $(ordinary_nat_headers) $(x_nat_headers): %.h: %.class
java/lang/ClassLoader.h: java/lang/ClassLoader.class libgcj.jar java/lang/ClassLoader.h: java/lang/ClassLoader.class
$(GCJH) -classpath $(top_builddir) \ $(GCJH) -classpath $(top_builddir) \
-friend 'jclass _Jv_FindClass (_Jv_Utf8Const *name, java::lang::ClassLoader *loader);' \ -friend 'jclass _Jv_FindClass (_Jv_Utf8Const *name, java::lang::ClassLoader *loader);' \
-friend 'void _Jv_RunMain (jclass klass, const char *name, int argc, const char **argv, bool is_jar);' \ -friend 'void _Jv_RunMain (jclass klass, const char *name, int argc, const char **argv, bool is_jar);' \
$(basename $<) $(basename $<)
## Our internal main program needs to be able to create a FirstThread. java/lang/Thread.h: java/lang/Thread.class
gnu/gcj/runtime/FirstThread.h: gnu/gcj/runtime/FirstThread.class libgcj.jar
$(GCJH) -classpath $(top_builddir) \
-friend 'void JvRunMain (jclass, int, const char **);' \
-friend 'void _Jv_RunMain (const char*, int, const char **);' \
$(basename $<)
java/lang/Thread.h: java/lang/Thread.class libgcj.jar
$(GCJH) -classpath $(top_builddir) \ $(GCJH) -classpath $(top_builddir) \
-prepend 'class _Jv_JNIEnv;' \ -prepend 'class _Jv_JNIEnv;' \
-prepend '#define _JV_NOT_OWNER 1' \ -prepend '#define _JV_NOT_OWNER 1' \
...@@ -294,7 +284,7 @@ java/lang/Thread.h: java/lang/Thread.class libgcj.jar ...@@ -294,7 +284,7 @@ java/lang/Thread.h: java/lang/Thread.class libgcj.jar
-friend 'jint _Jv_DetachCurrentThread ();' \ -friend 'jint _Jv_DetachCurrentThread ();' \
$(basename $<) $(basename $<)
java/lang/String.h: java/lang/String.class libgcj.jar java/lang/String.h: java/lang/String.class
$(GCJH) -classpath $(top_builddir) \ $(GCJH) -classpath $(top_builddir) \
-friend 'jchar* _Jv_GetStringChars (jstring str);' \ -friend 'jchar* _Jv_GetStringChars (jstring str);' \
-friend 'jstring* _Jv_StringFindSlot (jchar*, jint, jint);' \ -friend 'jstring* _Jv_StringFindSlot (jchar*, jint, jint);' \
...@@ -304,37 +294,37 @@ java/lang/String.h: java/lang/String.class libgcj.jar ...@@ -304,37 +294,37 @@ java/lang/String.h: java/lang/String.class libgcj.jar
-friend 'jstring _Jv_AllocString (jsize);' \ -friend 'jstring _Jv_AllocString (jsize);' \
$(basename $<) $(basename $<)
java/lang/reflect/Constructor.h: java/lang/reflect/Constructor.class libgcj.jar java/lang/reflect/Constructor.h: java/lang/reflect/Constructor.class
$(GCJH) -classpath $(top_builddir) \ $(GCJH) -classpath $(top_builddir) \
-friend 'jmethodID _Jv_FromReflectedConstructor (java::lang::reflect::Constructor *);' \ -friend 'jmethodID _Jv_FromReflectedConstructor (java::lang::reflect::Constructor *);' \
-friend 'class java::lang::Class;' \ -friend 'class java::lang::Class;' \
-friend 'jobject _Jv_JNI_ToReflectedMethod (_Jv_JNIEnv *, jclass, jmethodID, jboolean);' \ -friend 'jobject _Jv_JNI_ToReflectedMethod (_Jv_JNIEnv *, jclass, jmethodID, jboolean);' \
$(basename $<) $(basename $<)
java/lang/reflect/Field.h: java/lang/reflect/Field.class libgcj.jar java/lang/reflect/Field.h: java/lang/reflect/Field.class
$(GCJH) -classpath $(top_builddir) \ $(GCJH) -classpath $(top_builddir) \
-friend 'jfieldID _Jv_FromReflectedField (java::lang::reflect::Field *);' \ -friend 'jfieldID _Jv_FromReflectedField (java::lang::reflect::Field *);' \
-friend 'jobject _Jv_JNI_ToReflectedField (_Jv_JNIEnv*, jclass, jfieldID, jboolean);' \ -friend 'jobject _Jv_JNI_ToReflectedField (_Jv_JNIEnv*, jclass, jfieldID, jboolean);' \
-friend 'class java::lang::Class;' \ -friend 'class java::lang::Class;' \
$(basename $<) $(basename $<)
java/lang/reflect/Method.h: java/lang/reflect/Method.class libgcj.jar java/lang/reflect/Method.h: java/lang/reflect/Method.class
$(GCJH) -classpath $(top_builddir) \ $(GCJH) -classpath $(top_builddir) \
-friend 'jmethodID _Jv_FromReflectedMethod (java::lang::reflect::Method *);' \ -friend 'jmethodID _Jv_FromReflectedMethod (java::lang::reflect::Method *);' \
-friend 'class java::lang::Class;' \ -friend 'class java::lang::Class;' \
-friend 'jobject _Jv_JNI_ToReflectedMethod (_Jv_JNIEnv *, jclass, jmethodID, jboolean);' \ -friend 'jobject _Jv_JNI_ToReflectedMethod (_Jv_JNIEnv *, jclass, jmethodID, jboolean);' \
$(basename $<) $(basename $<)
gnu/gcj/runtime/VMClassLoader.h: gnu/gcj/runtime/VMClassLoader.class libgcj.jar gnu/gcj/runtime/VMClassLoader.h: gnu/gcj/runtime/VMClassLoader.class
$(GCJH) -classpath $(top_builddir) \ $(GCJH) -classpath $(top_builddir) \
-friend 'class java::lang::ClassLoader;' \ -friend 'class java::lang::ClassLoader;' \
$(basename $<) $(basename $<)
java/io/ObjectInputStream$$GetField.h: libgcj.jar java/io/ObjectInputStream$$GetField.h: java/io/ObjectInputStream.class
$(GCJH) -classpath $(top_builddir) \ $(GCJH) -classpath $(top_builddir) \
'java/io/ObjectInputStream$$GetField' 'java/io/ObjectInputStream$$GetField'
java/io/ObjectOutputStream$$PutField.h: libgcj.jar java/io/ObjectOutputStream$$PutField.h: java/io/ObjectOutputStream.class
$(GCJH) -classpath $(top_builddir) \ $(GCJH) -classpath $(top_builddir) \
'java/io/ObjectOutputStream$$PutField' 'java/io/ObjectOutputStream$$PutField'
...@@ -1759,9 +1749,9 @@ texinfo: TexinfoDoclet.class ...@@ -1759,9 +1749,9 @@ texinfo: TexinfoDoclet.class
-include deps.mk -include deps.mk
## This is an evil hack to work around an automake limitation. We ## This is an evil hack to work around an automake limitation. We
## need to ensure that the built headers are built before we try to ## need to ensure that all CNI headers are built, not just the ones used
## compile the C++ sources, but we can't make the .o files depend on ## internally by libgcj. We can't make the .o files depend on nat_headers,
## the headers, because in that case we'll force a complete rebuild of ## because in that case we'll force a complete rebuild of
## the C++ code whenever any .java file is touched. ## the C++ code whenever any .java file is touched.
all-recursive: $(nat_headers) $(x_nat_headers) all-recursive: $(nat_headers) $(x_nat_headers)
......
...@@ -1636,7 +1636,7 @@ else ...@@ -1636,7 +1636,7 @@ else
if { (eval echo configure:1637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then if { (eval echo configure:1637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do for file in conftest.*; do
case $file in case $file in
*.c | *.C | *.o | *.obj) ;; *.c | *.o | *.obj) ;;
*) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
esac esac
done done
...@@ -7564,17 +7564,19 @@ esac ...@@ -7564,17 +7564,19 @@ esac
# builddir for the .java files. # builddir for the .java files.
h=`pwd` h=`pwd`
: > deps.mk : > deps.mk
( (cd $srcdir && find . -name '*.java' -print) ; ( (cd $srcdir && find . \( -name '*.java' -o -name '*.cc' \) -print) ;
find . -name '*.java' -print) | \ find . \( -name '*.java' -o -name '*.cc' \) -print) | \
fgrep -v testsuite | \ fgrep -v testsuite | \
sed -e 's/\.java/.d/' | \ sed -e 's/\.java/.d/'\;'s/\.cc/.d/' | \
while read f; do while read f; do
echo "include $f" >> deps.mk echo "include $f" >> deps.mk
test -f $f || { test -f $f || {
d=`echo $f | sed -e 's,/[^/]*$,,'` d=`echo $f | sed -e 's,/[^/]*$,,'`
$libgcj_basedir/../mkinstalldirs $d if test ! -d $d; then
$libgcj_basedir/../mkinstalldirs $d
fi;
echo > $f echo > $f
} }
done done
......
...@@ -886,17 +886,19 @@ esac ...@@ -886,17 +886,19 @@ esac
# builddir for the .java files. # builddir for the .java files.
h=`pwd` h=`pwd`
: > deps.mk : > deps.mk
( (cd $srcdir && find . -name '*.java' -print) ; ( (cd $srcdir && find . \( -name '*.java' -o -name '*.cc' \) -print) ;
find . -name '*.java' -print) | \ find . \( -name '*.java' -o -name '*.cc' \) -print) | \
fgrep -v testsuite | \ fgrep -v testsuite | \
sed -e 's/\.java/.d/' | \ sed -e 's/\.java/.d/'\;'s/\.cc/.d/' | \
while read f; do while read f; do
echo "include $f" >> deps.mk echo "include $f" >> deps.mk
test -f $f || { test -f $f || {
changequote(<<,>>) changequote(<<,>>)
d=`echo $f | sed -e 's,/[^/]*$,,'` d=`echo $f | sed -e 's,/[^/]*$,,'`
changequote([,]) changequote([,])
$libgcj_basedir/../mkinstalldirs $d if test ! -d $d; then
$libgcj_basedir/../mkinstalldirs $d
fi;
echo > $f echo > $f
} }
done done
......
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