Skip to content

Commit 0d054a4

Browse files
committed
autodetect lowest possible target
1 parent fcf28ec commit 0d054a4

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/java/Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
JAVA_SRC=$(wildcard *.java)
2-
JFLAGS=-source 1.6 -target 1.6
2+
ifeq ($(JTARGET),)
3+
JTARGET:=$(shell for i in 1.6 8 11 17; do if javac -source $$i -target $$i RJavaTools.java >/dev/null 2>&1; then echo $$i; break; fi; done)
4+
endif
5+
JFLAGS=-source $(JTARGET) -target $(JTARGET)
36
JAVAC=javac
47
JAVA=java
58
JAVADOC=javadoc

0 commit comments

Comments
 (0)