diff options
author | Brian Jones <cbj@gnu.org> | 1999-12-31 06:25:06 +0000 |
---|---|---|
committer | Brian Jones <cbj@gnu.org> | 1999-12-31 06:25:06 +0000 |
commit | f50059f66d03d4be6e82052fd9bb8812e3defa6a (patch) | |
tree | 72ba066d7cfdbeb7b8118ae77cd15451fa39c937 /lib | |
parent | 4e274b7731f352f3d118a5158cb753e37e006aa5 (diff) | |
download | classpath-f50059f66d03d4be6e82052fd9bb8812e3defa6a.tar.gz |
added support for kjc/javac(again), see mail archives
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Makefile.am | 212 | ||||
-rwxr-xr-x | lib/gen-classlist.sh.in | 2 |
2 files changed, 146 insertions, 68 deletions
diff --git a/lib/Makefile.am b/lib/Makefile.am index 826b4333e..0b207727a 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -2,95 +2,172 @@ # resurrect this... # --cbj ## used by automake to generate Makefile.in -## for JAVAC -## if USER_SPECIFIED_JABBA + +MAKEFILE_DEPEND = makefile.dep +HEADERS_DEPEND = headers.dep +CLASSES_DEPEND = classes.dep +JAVA_DEPEND = java.dep + +## silently try to include these, if it fails gnu make +## will remake these 'makefiles' with the rules given in +## this file and restart the make process again +sinclude $(JAVA_DEPEND) +sinclude $(HEADERS_DEPEND) + + +#----------------------------------------------------------------- +# defining a javac program written in java +#----------------------------------------------------------------- +KJC_MAIN = at.dms.kjc.Main +SUN_JAVAC_MAIN = sun.tools.javac.Main + +if USER_SPECIFIED_KJC +JAVAC_MAIN = $(KJC_MAIN) +else +JAVAC_MAIN = $(SUN_JAVAC_MAIN) +endif +#----------------------------------------------------------------- + + +#----------------------------------------------------------------- +# defining how to designate classpath for a vm and a javac type +# program +#----------------------------------------------------------------- +if JAPHAR if USER_SPECIFIED_JABBA -## if USER_SPECIFIED_CLASSLIB -if USER_SPECIFIED_CLASSLIB -## JAVAC = -JAVAC = @USER_JABBA@ -classpath @USER_CLASSLIB@ sun.tools.javac.Main -classpath ../lib:@USER_CLASSLIB@ -d ../lib -## else +ARG_CLASSPATH_VM = -classpath +else +ARG_CLASSPATH_VM = --classpath +endif +else +ARG_CLASSPATH_VM = -classpath +endif + +if USER_SPECIFIED_KJC +ARG_CLASSPATH_JAVAC = --classpath else -## JAVAC = -JAVAC = @USER_JABBA@ -classpath /usr/local/java/lib/classes.zip sun.tools.javac.Main -classpath ../lib:/usr/local/java/lib/classes.zip -d ../lib -## endif +ARG_CLASSPATH_JAVAC = -classpath endif -## else -else -## if JAPHAR +#----------------------------------------------------------------- + + +#----------------------------------------------------------------- +# defining a java-like program +#----------------------------------------------------------------- +if USER_SPECIFIED_JABBA +USER_JABBA = @USER_JABBA@ +else + if JAPHAR -## JAVAC = -JAVAC = @JAPHAR_JABBA@ --classpath @JAPHAR_CLASSLIB@ sun.tools.javac.Main -classpath ../lib:@JAPHAR_CLASSLIB@ -d ../lib -## else +USER_JABBA = @JAPHAR_JABBA@ else -## if USER_SPECIFIED_CLASSLIB + +if KAFFE +USER_JABBA = @KAFFE_JABBA@ +else +USER_JABBA = java +endif + +endif + +endif +#----------------------------------------------------------------- + + +#----------------------------------------------------------------- +# defining the classpath for the java-like program, and +# the javac-like program +#----------------------------------------------------------------- if USER_SPECIFIED_CLASSLIB -## JAVAC = -JAVAC = java -classpath @USER_CLASSLIB@ sun.tools.javac.Main -classpath ../lib:@USER_CLASSLIB@ -d ../lib -## else +USER_CLASSLIB_TMP = @USER_CLASSLIB@ +else + +if JAPHAR +USER_CLASSLIB_TMP = @JAPHAR_CLASSLIB@ +else + +if KAFFE +USER_CLASSLIB_TMP = @KAFFE_CLASSLIB@ else -## JAVAC = -JAVAC = java -classpath /usr/local/java/lib/classes.zip sun.tools.javac.Main -classpath ../lib:/usr/local/java/lib/classes.zip -d ../lib -## endif +USER_CLASSLIB_TMP = /usr/local/java/lib/classes.zip endif -## endif + endif -## endif + endif -## for JIKES -if USER_SPECIFIED_JIKES -JAVAC = @JIKES@ -classpath $(top_srcdir):$(top_srcdir)/vm/current:$(top_srcdir)/lib:@USER_CLASSLIB@ -d $(top_srcdir)/lib @classes +if USER_SPECIFIED_KJC +USER_CLASSLIB = @KJC_CLASSPATH@:$(USER_CLASSLIB_TMP) +else +USER_CLASSLIB = $(USER_CLASSLIB_TMP) endif +#----------------------------------------------------------------- + + +#----------------------------------------------------------------- +# handling javac definition including programs like jikes here +#----------------------------------------------------------------- +if USER_SPECIFIED_KJC +JAVAC = $(USER_JABBA) $(ARG_CLASSPATH_VM) $(USER_CLASSLIB) $(JAVAC_MAIN) $(ARG_CLASSPATH_JAVAC) .:$(USER_CLASSLIB) -d . @classes +else + +if USER_SPECIFIED_JIKES -## for JAVAH -## if USER_SPECIFIED_JAVAH -if USER_SPECIFIED_JAVAH -## if USER_SPECIFIED_CLASSLIB if USER_SPECIFIED_CLASSLIB -## JAVAH = -JAVAH = @USER_JAVAH@ -jni -classpath ../lib:@USER_CLASSLIB@ -## else +JAVAC = @JIKES@ -nowarn +CSO +F $(ARG_CLASSPATH_JAVAC) ..:../vm/current:. -d . @classes else -## JAVAH = -JAVAH = @USER_JAVAH@ -jni -classpath ../lib -## endif +JAVAC = @JIKES@ -nowarn +CSO +F $(ARG_CLASSPATH_JAVAC) ..:../vm/current:.:@USER_CLASSLIB@ -d . @classes endif -## else -else -## if JAPHAR + +else +JAVAC = $(USER_JABBA) $(ARG_CLASSPATH_VM) $(USER_CLASSLIB) $(JAVAC_MAIN) $(ARG_CLASSPATH_JAVAC) .:$(USER_CLASSLIB) -d . $(JAVA_SRCS) +endif + +endif +#----------------------------------------------------------------- + + +#----------------------------------------------------------------- +# defining how to designate classpath for a vm and a javac type +# program +#----------------------------------------------------------------- if JAPHAR -## JAVAH = -JAVAH = @JAPHAR_JAVAH@ --jni --classpath ../lib:@USER_CLASSLIB@ -## else +ARG_JNI_JAVAH = --jni else -## if USER_SPECIFIED_CLASSLIB -if USER_SPECIFIED_CLASSLIB -## JAVAH = -JAVAH = javah -jni -classpath ../lib:@USER_CLASSLIB@ -## else +ARG_JNI_JAVAH = -jni +endif +#----------------------------------------------------------------- + + +#----------------------------------------------------------------- +# defining a javah-like program +#----------------------------------------------------------------- +if USER_SPECIFIED_JAVAH +USER_JAVAH = @USER_JAVAH@ +else + +if JAPHAR +USER_JAVAH = @JAPHAR_JAVAH@ +else + +if KAFFE +USER_JAVAH = @KAFFE_JAVAH@ else -## JAVAH = -JAVAH = javah -jni -classpath ../lib:/usr/local/java/lib/classes.zip -## endif +USER_JAVAH = javah endif -## endif + endif -## endif + endif +#----------------------------------------------------------------- + +JAVAH = $(USER_JAVAH) $(ARG_JNI_JAVAH) $(ARG_CLASSPATH_VM) .:$(USER_CLASSLIB) -MAKEFILE_DEPEND = makefile.dep -HEADERS_DEPEND = headers.dep -CLASSES_DEPEND = classes.dep -JAVA_DEPEND = java.dep #pkgdata_DATA = glibj.zip install-data-local : unzip -d $(pkgdatadir) glibj.zip -include $(JAVA_DEPEND) -include $(HEADERS_DEPEND) - all: $(HEADERS_DEPEND) glibj.zip $(MAKEFILE_DEPEND) $(HEADERS) #jar-classes @@ -116,11 +193,7 @@ dep: classes #.PHONY: compile-classes compile-classes: classes $(JAVA_DEPEND) $(JAVA_SRCS) Makefile -if USER_SPECIFIED_CLASSLIB - $(SHELL) -c "@JIKES@ -nowarn -classpath ..:../vm/current:.:@USER_CLASSLIB@ +CSO +M +F -d . @classes" -else - $(SHELL) -c "@JIKES@ -nowarn -classpath ..:../vm/current:. +CSO +M +F -d . @classes" -endif + $(JAVAC) touch compile-classes $(MAKEFILE_DEPEND): classes $(HEADERS_DEPEND) $(CLASSES_DEPEND) @@ -170,5 +243,10 @@ EXTRA_DIST = glibj.zip standard.omit ## not sure if we want to let the user easily get rid of glibj.zip ## CLEANFILES = glibj.zip DISTCLEANFILES = $(CLASSES) $(HEADERS) -MAINTAINERCLEANFILES = makefile.dep +MAINTAINERCLEANFILES = makefile.dep $(JAVA_DEPEND) $(HEADERS_DEPEND) +maintainer-clean-local: + -rm -rf gnu + -rm -rf java + -rm -rf javax + -rm -rf kaffe diff --git a/lib/gen-classlist.sh.in b/lib/gen-classlist.sh.in index afa7c8b58..038da2718 100755 --- a/lib/gen-classlist.sh.in +++ b/lib/gen-classlist.sh.in @@ -1,4 +1,4 @@ #! @SH@ # @configure_input@ -@FIND@ @top_srcdir@/java @top_srcdir@/gnu @top_srcdir@/vm/current -type f -print | grep '\.java$' > @top_srcdir@/lib/classes +@FIND@ @top_srcdir@/java @top_srcdir@/gnu @top_srcdir@/vm/current -follow -type f -print | grep '\.java$' > @top_srcdir@/lib/classes for filexp in `cat @top_srcdir@/lib/$1.omit` ; do { grep -v ${filexp} < @top_srcdir@/lib/classes > @top_srcdir@/lib/classes.new ; mv @top_srcdir@/lib/classes.new @top_srcdir@/lib/classes ; } ; done |