help-make
[Top][All Lists]
Advanced

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

Keeping the make process running (not --keep-going, not 'watch make')


From: David Deutsch
Subject: Keeping the make process running (not --keep-going, not 'watch make')
Date: Mon, 20 Jul 2020 10:04:12 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

Hey everybody,

I use make to build a document tree, again and again, when prerequisites
change.

I observe outside change events and use inotify on some files and when a
change has occurred, I re-run make. So my problem is not detecting the
change - I already know when a change has occurred and where it happened.

My problem is that the more complex a document gets, the more makefiles
I put on the build graph (literally hundreds and hundreds of .mk and .d
files) and the more prerequisite files make has to parse on each startup.


It handles that remarkably well, but I wonder: Would it be possible to
keep the make process itself running with the state that it has
generated? It just seems like a waste to continually re-establish the
same state, over and over again.

Put differently: There are some applications of make where booting up
make and building the dependency graph is the most expensive part, by
far. Would it be possible to keep the make process running and that
graph in memory?


I assume the actually tricky part would then be telling make about those
changes, but let's say I'd be able to do something like:

~/my-project$ make my-target --keep-process-running

[... doing a bunch of stuff, then freeing the terminal for further input]

make[1]: Leaving directory '~/my-project'
make[1]: Keeping the process running in the background under ID XX


so it would tell me some kind of process ID, then I would later do
something like:

~/my-project$ make my-target --existing-process=ID
--assume-new=file/that/has/changed


Does anybody know if that is a use case that somebody has already
investigated?

Does anybody have an idea about the feasibility of extending make like
that (even when maintaining a custom fork) would be?

best regards,
David




reply via email to

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