[Emacs-ada-mode] [patch] Surround project file name with double-quotes
Stephen Leake
stephen_leake at stephe-leake.org
Wed Nov 14 18:51:13 PST 2007
Ludovic Brenta <ludovic at ludovic-brenta.org> writes:
> On windows, my project files are in C:\Documents and Settings\... and
> the default compile and gnat find commands (C-u C-c C-c and C-r C-r
> respectively) fail because the command launched cannot find the project
> file. The fix is to surround the project file name with double-quote
> characters, e.g. gnatmake -P"C:\Documents and Settings\...\f.gpr".
> The patch below does this unconditionally because the double-quote
> characters are harmless even if they are not necessary.
Right. There are a couple other uses of the project file as well.
> another fix in this patch is the use of the variable ada-gnat-cmd
> instead of hardcoded "gnat" in "gnat find". This is handy when you
> don't have a native GNAT installed but only a cross gnat, e.g.
> powerpc-wrs-vxworks-gnat.
That makes sense in general, but it violates the intended use of this
variable, which is to allow "gnatpath" to replace "gnat" when parsing
project files. Obviously, the name of the variable could be improved
:(. I don't want to change it, though, since that would break current
setups.
I gather you are not using gnatpath; have you tried it? I find it to
be _much_ faster than 'gnat list'. Hmm. I just tried to reproduce
that, and the difference seems smaller on this machine, but still
noticeable. It is very noticeable on the Lynx boxes I use at work. One
of these days, I'll get around to asking AdaCore to implement an
option for 'gnat list' that does exactly what we need.
Back to your issue of specifying the gnat executable name; you should
set the 'cross-prefix' Emacs project file variable, and then I should
fix ada-xref.el to use it more consistently (just done in my version).
A couple weeks ago, I fixed 'ada-make-body-gnatstub' to use project
files; I'll post a new version with all these changes.
--
-- Stephe
More information about the Emacs-ada-mode
mailing list