[Emacs-ada-mode] Finding spec/body in same directory

Manuel Gomez mgrojo at gmail.com
Thu Jun 19 13:40:02 PDT 2008


Simon Wright wrote:
> The important thing is to find the file where the compiler will find it!
> 
> GCC, I think, uses the first occurrence of a file on its search path.  
> gnatmake, however, insists on there being only one file on the search  
> path for the project (unless you are extending another project).

I agree with you in the general case, but in my specific case, I'd 
prefer to configure Emacs Ada Mode in some way to search the 
complementary file in the same directory.

Ideally the search of the Ada file could be done on the search-file 
generated by GNAT using the -C=file switch. This would improve 
performance while preserving the same search path than the compiler. But 
since this problem of mine is not very usual, this is probably asking 
too much.

> So it's not that simple .. but with about 500 directories and 19_000  
> source files, it typically takes less than a second on a 3 GHz Windows  
> box to get to the right place (that's using AdaCore's GLIDE; but the  
> general mechanism is the same, I feel their convert_prj utility is  
> quite fast compared to gnatpath but no timings to hand),

The problem is the virtual file-system we are using. It's a Clear Case 
dynamic view, and it's really slow on the stat() system call.

Regards.

--
Manuel



More information about the Emacs-ada-mode mailing list