[Emacs-ada-mode] gnatgpr

Stephen Leake stephen_leake at stephe-leake.org
Sun Oct 15 03:30:15 PDT 2006


Emmanuel Briot <briot at adacore.com> writes:

> Stephen Leake wrote:
>>     gnatgpr -P<file> --source_dirs
>>     gnatgpr -P<file> --object_dirs
>
> I think what you are planning is exactly what the command
>     gnat -Pfile -v
>
> gives you.

Hmm. Not with GNAT 5.04a on windows.

Hmm. Maybe you meant 'gnatls -Pfile -v':

GNATLS Pro 5.04a (20060125-34)
Copyright 1997-2005 Free Software Foundation, Inc.

Source Search Path:
   <Current_Directory>
   C:\Projects\gnavi\gnatcom\FRAMEW~1\
   C:/Gnu/Gnat-5.04a/lib/gcc/pentium-mingw32msv/3.4.6/adainclude/


Object Search Path:
   <Current_Directory>
   C:\Projects\gnavi\gnatcom\FRAMEW~1\
   C:/Gnu/Gnat-5.04a/lib/gcc/pentium-mingw32msv/3.4.6/adalib/


Project Search Path:
   <Current_Directory>
   C:\Gnu\Gnat-5.04a\lib\gnat\


Hmm. It doesn't actually use the project file; I get exactly the same
output with a different project file.

The -P option is not shown in 'gnatls -v', nor in the GNAT user guide.
So this is expected, except that it should have reported an error
about "unrecognized option".

GNAT 5.05w doesn't have it either.

So apparently this only outputs the system libraries. Although I have
no idea why 'gnavi\gnatcom' is showing up here. Something in the
Windows registry?


So I still need to implement 'gnatgpr'.

Perhaps I should implement it as a patch to 'gnatls'. However, the
5.04a1 gnatls source does not 'with Prj.*', and the data structures
for storing the lists of things are entirely different from those used
by Prj.*, so it would be a complicated patch. I assume that's why
AdaCore hasn't done it yet :).

Implementing a separate 'gnatgpr' would be much simpler.

Would AdaCore be interested in adopting that code, once I get it
working? 

-- 
-- Stephe



More information about the Emacs-ada-mode mailing list