[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] {maint} test defs: new requirement for the default java comp
From: |
Stefano Lattarini |
Subject: |
Re: [PATCH] {maint} test defs: new requirement for the default java compiler |
Date: |
Sun, 10 Apr 2011 13:49:59 +0200 |
User-agent: |
KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; ) |
On Sunday 10 April 2011, Ralf Wildenhues wrote:
> * Stefano Lattarini wrote on Sun, Apr 10, 2011 at 10:23:11AM CEST:
> > On Sunday 10 April 2011, Ralf Wildenhues wrote:
> > > Hmm. Did you test this though?
> > >
> > Yes, but I only have javac 1.6.0 on my system, which works even with
> > just the `-version' option:
>
> Oh, ok.
>
> > Maybe adding also the `-help' option to the java invocation works? E.g.,
> >
> > $ javac -version -help
>
> Yes, that works for me. Patches to that end preapproved.
>
Done in the attached patch. I'll push shortly if there are no objections.
Thanks,
Stefano
From 3586c4ef306e9040476e0777a7ff85ec50bcc433 Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <address@hidden>
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 <options> <source files>
...
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 a605aa8..d7c100d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,22 @@
2011-04-10 Stefano Lattarini <address@hidden>
+ 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 <options> <source files>
+ ...
+ Luckily, adding the `-help' option in tail 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 <address@hidden>
+
test defs: new requirement for the default java compiler
* tests/defs.in (for tool in $required): New requirement 'javac'.
* tests/java.test: Use it instead of ad-hoc configure check.
diff --git a/tests/defs.in b/tests/defs.in
index cd2284c..8aaf108 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-"
--
1.7.2.3