bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: javacomp[-script], javaexec[-script]: remove support for gcj and gij


From: Bruno Haible
Subject: Re: javacomp[-script], javaexec[-script]: remove support for gcj and gij
Date: Sun, 11 Jun 2023 03:11:25 +0200

I did:
>       javacomp: Remove support for 'gcj'.
> ...
>       javacomp-script: Remove support for 'gcj'.

After these removals, some more simplifications are possible.


2023-06-10  Bruno Haible  <bruno@clisp.org>

        javacomp: Simplify after gcj support was removed.
        * m4/javacomp.m4 (gt_JAVACOMP): Don't create conftestlib.java.
        * lib/javacomp.c (compile_java_class): Remove local variables
        no_assert_option, fsource_option, ftarget_option.

diff --git a/lib/javacomp.c b/lib/javacomp.c
index ee3fe220eb..b071f172de 100644
--- a/lib/javacomp.c
+++ b/lib/javacomp.c
@@ -1024,11 +1024,8 @@ compile_java_class (const char * const *java_sources,
     if (javac != NULL && javac[0] != '\0')
       {
         bool usable = false;
-        bool no_assert_option = false;
         bool source_option = false;
         bool target_option = false;
-        bool fsource_option = false;
-        bool ftarget_option = false;
         const char *source_version_for_javac;
 
         if (target_version == NULL)
@@ -1058,18 +1055,12 @@ compile_java_class (const char * const *java_sources,
               set_classpath (classpaths, classpaths_count, false, verbose);
 
             javac_with_options =
-              (no_assert_option
-               ? xasprintf ("%s -fno-assert", javac)
-               : xasprintf ("%s%s%s%s%s%s%s%s%s",
-                            javac,
-                            source_option ? " -source " : "",
-                            source_option ? source_version_for_javac : "",
-                            target_option ? " -target " : "",
-                            target_option ? target_version : "",
-                            fsource_option ? " -fsource=" : "",
-                            fsource_option ? source_version : "",
-                            ftarget_option ? " -ftarget=" : "",
-                            ftarget_option ? target_version : ""));
+              xasprintf ("%s%s%s%s%s",
+                         javac,
+                         source_option ? " -source " : "",
+                         source_option ? source_version_for_javac : "",
+                         target_option ? " -target " : "",
+                         target_option ? target_version : "");
             assume (javac_with_options != NULL);
 
             err = compile_using_envjavac (javac_with_options,
diff --git a/m4/javacomp.m4 b/m4/javacomp.m4
index d9e1608e0b..d373708d42 100644
--- a/m4/javacomp.m4
+++ b/m4/javacomp.m4
@@ -243,14 +243,6 @@ AC_DEFUN([gt_JAVACOMP]
   HAVE_JAVAC_ENVVAR=
   HAVE_JAVAC=
   HAVE_JAVACOMP=
-changequote(,)dnl
-  cat > conftestlib.java <<EOF
-public class conftestlib {
-  public static void main (String[] args) {
-  }
-}
-EOF
-changequote([,])dnl
   echo "$goodcode" > conftest.java
   echo "$failcode" > conftestfail.java
   dnl If the user has set the JAVAC environment variable, use that, if it






reply via email to

[Prev in Thread] Current Thread [Next in Thread]