[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to build with Alire
From: |
Simon Wright |
Subject: |
Re: How to build with Alire |
Date: |
Tue, 10 Oct 2023 09:03:38 +0100 |
You can use "alr edit", with some inconveniences.
It basically sets the environment as in "alr printenv" and then starts the
editor in that environment.
I run the attached shell script; if the argument is "emacs", it configures "alr
edit" to run a new copy of emacs; otherwise, GNATStudio.
Disadvantage: it opens emacs on the GPR, so you have to navigate to an Ada
source before you can set the GPR as the one to use.
#!/bin/sh
case $1 in
emacs)
alr config --global --set editor.cmd 'open -n -a emacs ${GPR_FILE}'
;;
*)
alr config --global --set editor.cmd 'open -n -a gnatstudio --
${GPR_FILE}'
;;
esac
set-alr-edit.sh
Description: Binary data
> On 10 Oct 2023, at 00:10, Left Right <olegsivokon@gmail.com> wrote:
>
> Hello,
>
> I'm still very new to Ada in general and Ada mode specifically.
>
> One thing I discovered is that when trying to build a project by
> pressing C-c C-c, the code seems to want to run gprbuild -- but cannot
> find it because it's only available from Alire cache directory which
> is added to the system path when I run `alr build' command.
>
> So, is there a way to tell Ada mode to first run something like `alr
> printenv' to find out the necessary variables, and then use that
> environment when running the build?
>
> Thanks!
>
> Oleg
>