adapath.el

gnatpmake automates the management of GNAT Ada program libraries (in a simple way) by the use of a special file (.adapath) which is optionally present in each program library directory. Each .adapath file specifies the paths used for compilation of the library directory in which it is found in standard form (the path components are separated by colons; no white space!).

adapath.el contains an Emacs function adapath which manages the directory search lists used to find files from Ada and compilation modes. It's my first attempt at Emacs Lisp, so any criticisms will be welcome.

You need to have the following in your ~/.emacs (I assume you'll have put adapath.el on your Emacs load path):

(load-library "adapath")
Normally, I just (load-library "adapath") in my .emacs as above, and then run adapath in my project base directory. Alternatively, you could say
(load-library "adapath")
(adapath "my/project/directory")

Licensing

This program is issued under the GNU Public License.

Changes since April 1998

All the generated pathnames are made absolute (otherwise, including "." or ".." has unpredictable and bad results!)

adapath takes an optional parameter, which is defaulted to the current buffer's directory (so you can run adapath in a compilation buffer, if you forgot to do it first).

The list of directories in which to look for compiler-supplied sources is given in a customisable variable adapath-system-directories.

I used to recommend that you put adapath into your ada-mode-hook, and made ada-search-directories buffer-local. Both were bad advice!


Simon Wright
Last updated: 23.i.99