From e63dc949f808306032bce94c65f6712eb9df6ee8 Mon Sep 17 00:00:00 2001 From: "pedemont%us.ibm.com" Date: Sun, 18 Dec 2005 17:09:28 +0000 Subject: [PATCH] Bug 315917 - Make sure javac compiles JVM 1.4 compatible class files. r=bsmedberg --- config/config.mk | 11 +++++++++++ extensions/java/xpcom/interfaces/Makefile.in | 4 ---- extensions/java/xpcom/src/Makefile.in | 4 ---- extensions/java/xpcom/tests/Makefile.in | 4 ++-- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/config/config.mk b/config/config.mk index affb1fd971a..6b5a048bfa4 100644 --- a/config/config.mk +++ b/config/config.mk @@ -898,3 +898,14 @@ DEFINES += -DBUILD_ID=$(BUILD_ID) ifeq (,$(filter WINCE WINNT OS2,$(OS_ARCH))) RUN_TEST_PROGRAM = $(DIST)/bin/run-mozilla.sh endif + +# +# Java macros +# + +# Make sure any compiled classes work with at least JVM 1.4 +JAVAC_FLAGS += -source 1.4 + +ifdef MOZ_DEBUG +JAVAC_FLAGS += -g +endif diff --git a/extensions/java/xpcom/interfaces/Makefile.in b/extensions/java/xpcom/interfaces/Makefile.in index 8c6acad8c85..bd8a7d3eef1 100644 --- a/extensions/java/xpcom/interfaces/Makefile.in +++ b/extensions/java/xpcom/interfaces/Makefile.in @@ -68,10 +68,6 @@ GARBAGE_DIRS += _javagen org include $(topsrcdir)/config/rules.mk -ifdef MOZ_DEBUG -JAVAC_FLAGS = -g -endif - ifeq ($(OS_ARCH),WINNT) RUN = OUTPUT_DIR = $(shell cygpath -w $(CURDIR)/_javagen/org/mozilla/xpcom) diff --git a/extensions/java/xpcom/src/Makefile.in b/extensions/java/xpcom/src/Makefile.in index 81e67a3a8a2..f7240a4e763 100755 --- a/extensions/java/xpcom/src/Makefile.in +++ b/extensions/java/xpcom/src/Makefile.in @@ -97,10 +97,6 @@ GARBAGE_DIRS += _javagen org include $(topsrcdir)/config/rules.mk -ifdef MOZ_DEBUG -JAVAC_FLAGS = -g -endif - ifeq ($(OS_ARCH),WINNT) RUN = SEP = ; diff --git a/extensions/java/xpcom/tests/Makefile.in b/extensions/java/xpcom/tests/Makefile.in index 2c80f53b047..bb490f6c1ee 100644 --- a/extensions/java/xpcom/tests/Makefile.in +++ b/extensions/java/xpcom/tests/Makefile.in @@ -78,8 +78,8 @@ include $(topsrcdir)/config/rules.mk %.class: %.java Makefile Makefile.in $(REPORT_BUILD) - $(ELOG) $(CYGWIN_WRAPPER) $(JAVAC) -classpath $(_JAVA_CLASSPATH) -d . \ - $(_VPATH_SRCS) + $(ELOG) $(CYGWIN_WRAPPER) $(JAVAC) $(JAVAC_FLAGS) \ + -classpath $(_JAVA_CLASSPATH) -d . $(_VPATH_SRCS) # make sure to rebuild Java interfaces if our XPIDLSRCS change $(REBUILD_JAR): $(XPIDLSRCS)