automake
[Top][All Lists]
Advanced

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

CLASSPATH separator in Makefile.am


From: David Neary
Subject: CLASSPATH separator in Makefile.am
Date: Wed, 1 Oct 2003 15:02:28 +0200

Hi,

I'm not quite sure whose job this is (automake or autoconf - I suspect the
latter), so I'm sending this to both lists. Hope this doesn't upset anyone
:)

I have a java project which, among other things, recuperates the CLASSPATH
environment variable, and adds some stuff to it in the Makefile. I have a
Makefile.am target which looks like this...

gnu/%.class: @srcdir@/src/gnu/%.java
        @JAVAC@ @JAVACFLAGS@ \
                -d . \
                -classpath "${CLASSPATH}:@srcdir@/src:." \
                @srcdir@/src/gnu/xml/libxmlj/transform/*.java

This is fine on Unix, but obviously doesn't go down well on Win32. Modifying
the :s to ;s explicitly in the Makefile.am gets it through the Windows
build, which is fine. But is there a way to have an AC_SEPARATOR defined
which "converts" stuff like this to the correct format for the target
platform at the configure stage? It would be nice not to have to manually
edit makefiles and configure scripts in Win32.

Also, one other thing which is definitely autoconf related...

The macros AC_CHECK_CLASS_COMPILATION and AC_CHECK_CLASS use the same
CLASSPATH convention (: separator), causing them to break on Win32. The fix
seems to be to manually edit the generated configure script to get it
working right.

And one last (automake related) thing - for inner classes (classes called
Parent$Inner or somesuch), how can one escape the $ from the Makefile.am
through the Makefile.in to the Makefile itself? I seem to have the \$ in the
Makefile.am replaced by $ in Makefile.in, and then $Inner is replaced by ""
in the filan Makefile, resulting in just Parent. Do I need to have \\\\\$ in
the Makefile.am?

Cheers,
Dave.

--
David Neary
Phenix Engineering
110 ave Jean Jaures, 69007 Lyon 




reply via email to

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