[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Javaweb-people] compilation again
From: |
nferrier |
Subject: |
Re: [Javaweb-people] compilation again |
Date: |
27 Jan 2003 09:26:22 +0000 |
Brian Jones <address@hidden> writes:
> Nic Ferrier <address@hidden> writes:
>
> > For the reasons stated above I wanted to move the idea to
> > automake. Automake's support for pure Java has a big limitation: only
> > one destination directory can be used.
>
> Something that might help would be to introduce an `_JAR' variable syntax
> and extend the current `_JAVA' and related `JAVAC', `JAVACFLAGS',
> `JAVAROOT', etc. so that you can do things like this:
>
> glibj_JAVAROOT = $(top_builddir)/lib
> glibj_JAR = $(shell find $(glibj_JAVAROOT)/java -regex \.java$$ -print)
> glibj_JAVAC = jikes
>
> swing_JAVAROOT = $(top_builddir)/lib
> swing_JAR = $(shell find $(swing_JAVAROOT/javax/swing -regex \.java$$ -print)
> swing_JAVAC = gcj
> swing_JAVACFLAGS = -C
>
> Actually I hate the $(shell) in the above, but maybe this
> helps... $(wildcard) might work instead.
That's what I wanted to add to automake. A new category of target
called a _JAR, so you do stuff like this:
javamail_JAR = mail.jar
javamail_SOURCES = javax/mail/Folder.java \
javax/mail/Transport.java \
etc...
By default the jar file would be built using automake's JAVAC and
JAVACFLAGS.
The same source list (or a supplemented one) could then be used to
build a shared library using gcj.
This needs jarcompiler because otherwise the Makefile translation gets
way too complicated - specifically the creation of temp
directorys. jarcompiler makes the temp directorys (for compiling the
class files to) very simple.
Nic