From: Stefano Lattarini Date: Sun, 10 Apr 2011 11:38:47 +0000 (+0200) Subject: test defs: fix 'javac' requirement for older JDK versions X-Git-Tag: ng-0.5a~214^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=df9b3bc2212dff5edea3dc60abe93ee61e5283f9;p=thirdparty%2Fautomake.git 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. --- 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-"