>> > Using the jobserver directly would require quite a bit of work for the >> > current patch set, but I wonder if there is another way to determine >> > the -jN parameter for make<4.2 that we could use. Maybe simply >> > polling the jobserver fds at the start? >> >> AIUI the job server does not reveal how many jobs are allowed. It >> merely grants you an execution token. >> >> Or did you have something else in mind? > > The idea (hardely tested) would be to read tokens from the input fd > until it blocks, do the scheme compiles with however many tokens were > read, then write them back out. Crude, I guess, and probably error > prone; compile-all.scm could be invoked when make has job tokens tied > up building the daemon source... > > Anyhow, the current patch works well for me with a recent make. I'm > content leaving further improvements to a future hypothetical hacker. :) Sounds reasonable. Let’s make sure the hypothetical hacker has enough on their plate. :-) I’ve pushed this and the easy parts of this patch series, with commit d298c815e638581d466222f3a883b280f019b368 as the tip. Thanks for the review! Ludo’.