emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Project out of sources compilation


From: Ergus
Subject: Re: Project out of sources compilation
Date: Sun, 17 Mar 2024 18:58:57 +0100

On Sun, Mar 17, 2024 at 07:38:16PM +0200, Eli Zaretskii wrote:
Date: Sun, 17 Mar 2024 18:33:21 +0100
From: Ergus <spacibba@aol.com>
Cc: dmitry@gutov.dev, emacs-devel@gnu.org

>Maybe I'm missing something, but isn't the build tree just one more
>tree that is part of the project?  If so, can't you use
>project-external-roots to add this tree to the project?  I thought
>this was the mechanism to add trees to a project as included in the
>original design of project.el and its support in Emacs?
>

>> There is also some need for a 'bin' dir, that is, where the final executable 
will reside, useful to execute and debug with tools like gud and independent from 
'build'...  For example in a python project this may be the project root OR where the 
file with __main__ resides, but a python project usually won't specify a build dir. 
But let's go for one thing at a time.
>
>Likewise here.
>
>Or what am I missing?

Hi Eli:

More or less we have it, that's why I said that there was just some
(small) missing pieces.

We have the `project-external-roots`, but project.el uses them only to
find files and regexps. So it looks like they are intended to be source
places somehow.

The compile or debug programs doesn't know that they are intended to
execute there.

However, a `build` or `bin` are different because they are where the
`compile` or `gud` are intended to run; generally not a place to search
for sources (unless the source is generated like config.h).

Are you saying that "M-x compile" and "M-x gdb" are not (yet)
supported by project.el?


Kind of. There is project-compile, but executes in the root
directory. And M-x compile does not have any custom to control the
execution place, so it needs to do a let around it.

something similar happen to gdb, or project-eshell.

So, what is not actually supported is out of sources
compilation/execution. In the first email I explained that part. Even
Eglot requires extra work to function properly.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]