bug-automake
[Top][All Lists]
Advanced

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

Re: AM_PROG_GCJ fails at `make' if nothing else defines OBJEXT


From: Ralf Wildenhues
Subject: Re: AM_PROG_GCJ fails at `make' if nothing else defines OBJEXT
Date: Sun, 24 May 2009 16:42:44 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

Hi Jack,

* Jack Kelly wrote on Wed, May 13, 2009 at 01:24:40PM CEST:
> I've found that if nothing else defines OBJEXT, AM_PROG_GCJ won't do
> it and then make will fail with an error like:
> 
>   make: *** No rule to make target `Test.', needed by `test'.  Stop.

Thank you for the bug report and example test.  I agree that it is a
bug, but I think fixing it will require at least some Autoconf support.
Maybe we should start thinking of moving AM_PROG_GCJ into the Autoconf
language framework.  BTW, EXEEXT needs a definition, too.

For now, I've added a new XFAILed test to the testsuite, and added you
to THANKS.

Cheers,
Ralf

2009-05-24  Jack Kelly  <address@hidden>  (tiny change)
            Ralf Wildenhues  <address@hidden>

        AM_PROG_GCJ currently fails to define OBJEXT and EXEEXT.
        * tests/gcj6.test: New test.
        * tests/Makefile.am: Update; mark gcj6.test as XFAIL.
        * THANKS: Update.

diff --git a/tests/Makefile.am b/tests/Makefile.am
index 7895816..62529a6 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -4,6 +4,7 @@ XFAIL_TESTS =                                   \
 all.test                                       \
 auxdir2.test                                   \
 cond17.test                                    \
+gcj6.test                                      \
 txinfo5.test
 
 include $(srcdir)/parallel-tests.am
@@ -303,6 +304,7 @@ gcj2.test \
 gcj3.test \
 gcj4.test \
 gcj5.test \
+gcj6.test \
 getopt.test \
 gettext.test \
 gettext2.test \
diff --git a/tests/gcj6.test b/tests/gcj6.test
new file mode 100755
index 0000000..be5f49c
--- /dev/null
+++ b/tests/gcj6.test
@@ -0,0 +1,53 @@
+#! /bin/sh
+# Copyright (C) 2009  Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# AM_PROG_GCJ should cause OBJEXT and EXEEXT to be set.
+
+required='gcj'
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AM_PROG_GCJ
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+noinst_PROGRAMS = test
+test_SOURCES = Test.java
+test_LDFLAGS = --main=Test
+END
+
+cat >Test.java << 'END'
+public class Test {
+    public static void main(String[] argv) {
+        System.out.println("Hello, automake!");
+    }
+}
+END
+
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+./configure
+
+# These fail without e.g., AC_PROG_CC.
+$MAKE
+grep "OBJEXT = " Makefile
+grep "EXEEXT = " Makefile
+
+:




reply via email to

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