From df9b3bc2212dff5edea3dc60abe93ee61e5283f9 Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Sun, 10 Apr 2011 13:38:47 +0200 Subject: [PATCH] test defs: fix 'javac' requirement for older JDK versions The Java compiler from JDK 1.5 (and presumably earlier versions) cannot handle the `-version' option by itself; and while it does print the version number, it then errors out with an usage error: $ javac -version javac 1.5.0_22 javac: no source files Usage: javac ... Luckily, adding the `-help' option to the `javac' invocation seems to fix this problem. * tests/defs.in (javac): Pass also the `-help' option to the `javac' program. Add a comment explaining why it is needed. Report from Ralf Wildenhues. --- ChangeLog | 17 +++++++++++++++++ tests/defs.in | 8 ++++++-- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index a605aa8ff..ea292223a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +2011-04-10 Stefano Lattarini + + test defs: fix 'javac' requirement for older JDK versions + The Java compiler from JDK 1.5 (and presumably earlier versions) + cannot handle the `-version' option by itself; and while it does + print the version number, it then errors out with an usage error: + $ javac -version + javac 1.5.0_22 + javac: no source files + Usage: javac + ... + Luckily, adding the `-help' option to the `javac' invocation + seems to fix this problem. + * tests/defs.in (javac): Pass also the `-help' option to the + `javac' program. Add a comment explaining why it is needed. + Report from Ralf Wildenhues. + 2011-04-10 Stefano Lattarini test defs: new requirement for the default java compiler diff --git a/tests/defs.in b/tests/defs.in index cd2284c3b..8aaf108fb 100644 --- a/tests/defs.in +++ b/tests/defs.in @@ -166,8 +166,12 @@ do ( $CC -V -help ) || exit 77 ;; javac) - echo "$me: running javac -version" - javac -version || exit 77 + # The Java compiler from JDK 1.5 (and presumably earlier versions) + # cannot handle the `-version' option by itself: it bails out + # telling that source files are missing. Adding also the `-help' + # option seems to solve the problem. + echo "$me: running javac -version -help" + javac -version -help || exit 77 ;; makedepend) echo "$me: running makedepend -f-" -- 2.47.2