ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antoine Levy-Lambert" <>
Subject Re: emacs cygwin compile.el next-error fails with Ant (Was Re: [BUG])
Date Thu, 24 Jul 2003 08:08:15 GMT
>After poking around a little more, I think this actually qualifies as a
>"bug" [[1]] in Ant rather than with emacs or cygwin.  My reasoning?  The
>$ANT_ROOT/dist/bin/ant shell script used to invoke Ant under cygwin already
>checks to see if Ant is invoked within cygwin, and proceeds to normalize
>the various ANT_* environment variables before invoking the Java VM, first
>to UNIX for comparison, then to Windows for the actual invocation, so
>concessions are already made to operating within cygwin.  When the
>build.compiler.emacs property is true AND Ant is running under cygwin, the
>meaning is clear: Ant should emit the UNIX style paths that cygwin emacs
>expects to parse.  Unfortunately there doesn't seem to be a property
>(checked via <echoproperties>) that tells Ant it is running inside cygwin.
>And of course, since the error messages from the <javac> task come straight
>from the compiler (which, as a native win32 task, will only work running
>with Win32 path.separator value), this means an additional transformation
>of the compilation message stream which I can't see a great place to hook
>into the Ant codebase.  But then again I am new to Ant internals, so maybe
>further investigation will reveal the correct place for such a hook.
Under cygwin, ant gets started like this :
so the presence of the system property cygwin.user.home can be used to tell
whether ant is running under cygwin.
There is already a bit of cygwin support in the CVS task.

So it is possible to do the same in the various compiler adapters.

Note that there is no java support for cygwin. For javac, for instance,
cygwin does not exist. That's why the compiler echoes the wrong files with
their Windows path names and not their cygwin path names.

I would advise you to do the following :
- 1 : try to improve your emacs macro; check if you can replace the
backslashes by \\ (double back-slash) before using the string

- 2 : open a bug report asking that paths of source files in error be
converted to cygwin form when ant is running under cygwin. Might not be
fixed immediately due to 400 other open bug reports, and not sure whether it
is a good idea to introduce more specific support for cygwin, as long as
Java does not recognize it as an OS. Also not sure whether there is a single
point in the source code where the change can be done, or whether all
compiler adapters would be hit.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message