help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Retrieving the "include" directory for Emacs Modules


From: Stefan Monnier
Subject: Re: Retrieving the "include" directory for Emacs Modules
Date: Sun, 08 Dec 2024 11:48:24 -0500
User-agent: Gnus/5.13 (Gnus v5.13)

>> > I honestly don't understand why you need this at all.  emacs-module.h
>> > is supposed to be installed in the compilers include tree, where the
>> > compiler looks for header files by default.  So you shouldn't even
>> > need to know where the header lives, in order to compile a module.
>> > The module's code should just do
>> >
>> >   #include <emacs-module.h>
>> >
>> > and that's it.  Or what am I missing?
>> 
>> That presumes that Emacs is installed system-wide (and "properly").
>
> What other way is there to install Emacs?

Compile manually and run from the build tree?
Uncompress a downloaded pre-compiled archive into a directory and just
use it from there (AFAIK, very common under macOS and Windows)?
With luck on some systems the C (or other) compiler is installed in
a similar way (i.e. in its own subdirectory, siloed from Emacs).

>> When the compilation of the module is initiated from within Emacs, it
>> would make a lot of sense for this "ambient" Emacs to be able to tell
>> `make/gcc/younameit` explicitly and reliably where its own
>> `emacs-module.h` can be found.
> But if Emacs is "not installed properly", we don't know that.

Emacs *should* know that, just like it knows where is its
`lisp-directory`.


        Stefan




reply via email to

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