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

Re: PATCH: Allow parallel make



On Tue, Sep 8, 2026 at 4:21 PM Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
>
> ---
>
> Back in workers/23102 Vincent reported that make -j2 didn't work, and we
> added .NOTPARALLEL etc to the build rules. I finally got a bit bored
> with seeing my cpu sit at 50% when building zsh (yes, I only have a dual
> core cpu), so here's my stab at fixing it.
>
> The rule depending on headers in src/Makefile.in is the main thing that
> avoids the error Vincent saw, but there's also some follow-on errors
> that needed fixing up.
>
> I won't commit this unless a lot of people says it works on various make
> implementations (I only have GNU Make), and please try it at different
> job counts. The newuser.c failure only happened to me with make -j3, not
> make -j10 for example. The others didn't happen and are purely by
> inspection.
>
> Tighten up the atomicity of the header generation rules in zsh.mdd now
> that they could in theory be invoked concurrently.
>
> The phony rules in curses.mdd and terminfo.mdd are because I have some
> vague memory that Make may be unhappy with defining multiple identical
> rules in the same Makefile, and the mdd files' rules all end up combined
> somewhere (I assume), so I used two phony rules instead. I didn't bother
> doing that for newuser.mdd since it's the only one defining a rule for
> ../zshpaths.h

These aren't built in the default target, but they all wrote to the
same intermediate files. With --tidy they don't do that, so add that.
(Will fold this into the previous commit, if it is found to work
well).

diff --git i/Doc/Makefile.in w/Doc/Makefile.in
index 3b68ed61a1..0731e278b7 100644
--- i/Doc/Makefile.in
+++ w/Doc/Makefile.in
@@ -39,9 +39,9 @@ LN_S            = @LN_S@
 @DEFS_MK@

 MAKEINFO = makeinfo
-TEXI2DVI = @TEXI2DVI@
+TEXI2DVI = @TEXI2DVI@ --tidy
 DVIPS = dvips
-TEXI2PDF  = @TEXI2PDF@
+TEXI2PDF  = @TEXI2PDF@ --tidy
 TEXI2HTML = @TEXI2HTML@
 SET_TEXI2ANY_VAR = @SET_TEXI2ANY_VAR@
 PAPERSIZE = @PAPERSIZE@
@@ -416,6 +416,7 @@ clean-here:
        rm -f *.html *.info* *.dvi *.ps *.pdf
        rm -f *.aux *.cp *.cps *.fn *.fns *.ky *.kys *.log *.idx
        rm -f *.pg *.pgs *.toc *.tp *.tps *.vr *.vrs
+       rm -rf *.t2d
        rm -rf infodir
        rm -f texi2html.conf
 .PHONY: clean-here

-- 
Mikael Magnusson




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