summaryrefslogtreecommitdiff
path: root/lib/Makefile.am
diff options
context:
space:
mode:
authorAndrew John Hughes <gnu_andrew@member.fsf.org>2014-10-13 23:38:37 +0100
committerAndrew John Hughes <gnu_andrew@member.fsf.org>2014-10-13 23:38:37 +0100
commit8a6813555274093cb8746639af1613f428e691fc (patch)
tree464a2e8c6aa019e742ff5b04467009cec81aed92 /lib/Makefile.am
parenta24befdd79d09c14595e550ec638851c3c117b93 (diff)
downloadclasspath-8a6813555274093cb8746639af1613f428e691fc.tar.gz
Allow warnings from the Java compiler to be turned on and off.
2014-10-13 Andrew John Hughes <gnu_andrew@member.fsf.org> * configure.ac: Add --enable-warnings so warnings can be turned on and off. Invoke IT_USING_ECJ during compiler checks. * examples/Makefile.am: Split options for GCJ, javac and ecj. * lib/Makefile.am: Likewise. * m4/acinclude.m4: (IT_USING_ECJ): New macro taken from IcedTea to detect the use of ecj. * tools/Makefile.am: Split options for GCJ, javac and ecj. Signed-off-by: Andrew John Hughes <gnu_andrew@member.fsf.org>
Diffstat (limited to 'lib/Makefile.am')
-rw-r--r--lib/Makefile.am13
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/Makefile.am b/lib/Makefile.am
index df02fad25..68fed7564 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -7,11 +7,20 @@ sinclude $(JAVA_DEPEND)
compile_classpath = $(vm_classes):$(top_srcdir):$(top_srcdir)/external/w3c_dom:$(top_srcdir)/external/sax:$(top_srcdir)/external/relaxngDatatype:$(top_srcdir)/external/jsr166:.:$(PATH_TO_GLIBJ_ZIP):$(PATH_TO_ESCHER)
+# source,target and classpath options
+GCJ_OPTS=-fsource=1.6 -ftarget=1.6 --bootclasspath='' --classpath=$(compile_classpath)
+ECJ_OPTS=-source 1.6 -target 1.6 -bootclasspath '' -classpath $(compile_classpath)
+JAVAC_OPTS=$(ECJ_OPTS)
+
# handling source to bytecode compiler programs like gcj, jikes and kjc
if GCJ_JAVAC
-JCOMPILER = $(JAVAC) $(JAVACFLAGS) -fsource=1.6 -ftarget=1.6 --bootclasspath='' --classpath=$(compile_classpath) -d . @classes
+JCOMPILER = $(JAVAC) $(JAVACFLAGS) $(GCJ_OPTS) -d . @classes
+else
+if ECJ_JAVAC
+JCOMPILER = $(JAVAC) $(JAVACFLAGS) $(ECJ_WARNINGS) $(ECJ_OPTS) $(JAVAC_MEM_OPT) -d . @classes
else
-JCOMPILER = $(JAVAC) $(JAVACFLAGS) $(JAVAC_MEM_OPT) -source 1.6 -target 1.6 -bootclasspath '' -classpath $(compile_classpath) -d . @classes
+JCOMPILER = $(JAVAC) $(JAVACFLAGS) $(JAVAC_WARNINGS) $(JAVAC_OPTS) $(JAVAC_MEM_OPT) -d . @classes
+endif
endif
if CREATE_COLLECTIONS