ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Evenson <even...@panix.com>
Subject Re: [BUG] emacs cygwin compile.el next-error fails with Ant
Date Thu, 24 Jul 2003 12:04:41 GMT
Following the suggestion of Joe Buehler the following scripts placed in
$HOME/bin, with ant-emacs chmod'd to execute

ant-emacs
----------------------------------------------------------------------
#!/bin/sh
ANT_ARGS="$ANT_ARGS -emacs" 
ANT_OPTS="$ANT_OPTS -Dbuild.compiler.emacs=true" 
export ANT_ARGS ANT_OPTS
ant $* 2>&1 | gawk -f $HOME/bin/transform.gawk 2>&1 | sed s/\\r//g | sed s/^gawk.*$//
----------------------------------------------------------------------

and the following gawk script 

transform.gawk
----------------------------------------------------------------------
/^[A-Z]:/ {
      command = "tr \\\\\\\\\ / | xargs cygpath "; 
      printf "%s", $1 | command;  
      close(command); 
      for (i = 2; i < NF; i++) {
        printf " %s", $i;
      };
      printf "\n";

      next;
}
{print}
----------------------------------------------------------------------

will make next-error work in compile.el with Emacs running under cygwin.
This is not perfect, as it changes the output slightly (I have a extra
newline emitted somehow), but it might help someone else.

After some investigation and further reflection, I think this can be
classified as a problem with Ant, and not with cygwin and/or Emacs as Ant
should emit "UNIX normalized" pathnames if it is running under
cygwin/Emacs.  The problem with implementing this is that Ant is merely
passing back the output from a native win32 javac which necessarily needs
the platform dependent path.separator variable.  Maybe I will have time his
weekend to look into this.

-- 
Mark Evenson <evenson@panix.com>

"A screaming comes across the sky.  It has happened before, but there is
nothing to compare to it now."

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message