Ludovic Brenta <[email protected]> writes:

> Stephen Leake wrote:
>> Stephen Leake <[email protected]> writes:
>>> Ludovic Brenta <[email protected]> writes:
>>>
>>>> It is simpler for us to use $ADA_OBJECTS_PATH, which we also
>>>> generate automatically, than to fix our GNAT project file
>>>> generators.
>>>
>>> Which I guess rules out using a .gpr for the Ada mode project file.
>>>
>>> So you now have a line like:
>>>
>>> obj_dir=$ADA_OBJECTS_PATH
>>>
>>> in your Emacs Ada mode .prj file?
>>>
>>> Or does gnatfind see the env var directly?
>>
>> You can set an environment variable for project-specific background
>> processes in the Emacs Ada mode .prj file by prefixing the variable
>> name
>> with $ :
>>
>> $ADA_OBJECTS_PATH=...
>
> Actually I didn't even have to refer to $ADA_OBJECTS_PATH explicitly.
> I created a hook that runs when the user loads an Ada file and creates
> an Ada Mode project file if none exists yet.  In this project file,
> the hook inserts the current directory as src_dir, obj_dir and
> build_dir, then explicitly calls ada-parse-prj-file and
> ada-select-prj-file on it.  It is the obj_dir that counts for cross-
> referencing with gnatfind (it is different from the src_dir in our
> case); the patch by Evguenyi makes that work, otherwise the obj_dir
> was simply being ignored.

Ok. But instead of setting obj_dir in the created .prj file, you can set
$ADA_OBJECTS_PATH instead; then you don't need Evguenyi's patch.

-- 
-- Stephe

_______________________________________________
Emacs-ada-mode mailing list
[email protected]
http://host114.hostmonster.com/mailman/listinfo/emacs-ada-mode_stephe-leake.org

Reply via email to