Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Building a new ZSH module outside the ZSH source tree



 >On May 24, 2:57pm, tetsujin@xxxxxxxxxxxxx wrote:
 >}
 >} I'm not really clear on the process for building a module
>} without tying it into the zsh build system.
>
 >I haven't actually tried the following yet.
>
> --- Forwarded mail from Sebastian Gniazdowski
<psprint2@xxxxxxxxxxxx>
>
> Hello
 >1/ Turned out that it's easy to build Zsh modules away from complete
 >source. Here is a minimum build setup:
>
>
https://github.com/psprint/zplugin/tree/6a4ba014eb167cbc97353f0a59e63f62bd6442bc/zmodules

Thanks! Unfortunately it seems this project gets around the issue by
duplicating the zsh source tree and build environment, and planting
the zdharma/zplugin project within it.

It gets the job done, but it's not really ideal. I guess the main
thing (perhaps) is the *.mdh file that gets generated - what it does,
and how I can generate it myself.

"What it does", I guess, is set a bunch of defines to change the
module load/unload functions' names to a form specific to the package
(#define boot_ boot_zdharmaQszplugin for instance) and set some
defines prior to including shell headers...

The way to generate it, I guess, is to run zsh/Src/mkmakemod.sh, which
produces the Makefile for the module, which in turn generates the
module headers and other files.

Perhaps the best answer is to call into the script from my module's
build system, and then use the Makefile it generates. Perhaps that
could even work without having to place my module in a subdirectory of
the shell's build tree? (Not sure about that one.)

---GEC



Messages sorted by: Reverse Date, Date, Thread, Author