[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Meaning of "error: Java source seen but 'GCJ' is undefined"?
From: |
David Ventimiglia |
Subject: |
Meaning of "error: Java source seen but 'GCJ' is undefined"? |
Date: |
Sat, 2 Aug 2014 09:36:03 -0700 |
Hello,
I'm trying to use Automake to compile Java and am getting this error when I
run automake:
error: Java source seen but 'GCJ' is undefined
There also are some instructions about how to define GCJ using AM_PROG_GCJ,
but the thing is, I don't want to use gcj.
My Makefile.am looks something like this.
bin_PROGRAMS = foo.jar
foo_jar_SOURCES = foo.args
OBJEXT = jar
BUILT_SOURCES = foo.args
SUFFIXES = .args
.args.jar:
-mkdir -p $(builddir)/address@hidden
@JAVAC@ $(JAVACFLAGS) $(AM_JAVACFLAGS) -d $(builddir)/java @<
@JAR@ -cf $(builddir)/$@ -C $(builddir)/address@hidden .
foo.args:
echo $? > $@
It probably isn't clear from the code, so what I'm trying to do is this.
1. Avoid Automake's built-in Java support, since it's deprecated.
2. Use an argument file named 'foo.args' (see javac docs) containing names
of all Java source files to be built, in order to avoid command-line length
limits.
3. Use Automake's support for new file types (Automake manual, section
18.2) to teach Automake how to make a .jar file from a .args file (along
the way, using javac to compile sources).
The specific problem I seem to be encountering is that, as soon as I use
*.jar (and/or, perhaps *.java) in a primary, Automake detects it and says,
"Oh, I see you're building Java. You'll need GCJ for that."
I've grepped through the Automake source in order to find this logic, learn
how it works, and devise a strategy for circumventing it, but failed.
Where is this error coming from? And, how do I avoid it? Thanks!
Best,
David A. Ventimiglia
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Meaning of "error: Java source seen but 'GCJ' is undefined"?,
David Ventimiglia <=