Hi list,

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.

Minimal complete example (I'm using autoconf 2.63 and automake 1.10.2):

configure.ac:
8<---
AC_INIT([example], [0], [/dev/null])
AM_INIT_AUTOMAKE([foreign])
AM_PROG_GCJ
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
--->8

Makefile.am:
8<---
noinst_PROGRAMS = test
test_SOURCES = Test.java
test_LDFLAGS = --main=Test
--->8

Test.java:
8<---
public class Test {
    public static void main(String[] argv) {
        System.out.println("Hello, automake!");
    }
}
--->8

Adding something that defines OBJEXT (such as AC_PROG_CC) will make
everything work.

-- Jack


Reply via email to