improved parallel make support - Mailing list pgsql-hackers

From Peter Eisentraut
Subject improved parallel make support
Date
Msg-id 1288673007.7765.12.camel@vanquo.pezone.net
Whole thread Raw
Responses Re: improved parallel make support
List pgsql-hackers
I have worked on some improvements on how we handle recursive make in
our makefiles.  Most places uses for loops, which has some
disadvantages: parallel make doesn't work across directories, make -k
doesn't work, and make -q doesn't work.  Instead, I went with the
approach that we already use in the src/backend directory, where we call
the subordinate makes as target prerequisites.

Note that because with this, parallel make really works, the rule
dependencies must be correct.  This has always been the case, but now it
really shows up.  A frequent issue is that this sort of thing no longer
works:

all: submake-libpgport zic

zic: $(ZICOBJS)

because this relies on the "all" target to execute its prerequisites in
order.  Instead, you need to write it like this:

all: zic

zic: $(ZICOBJS) | submake-libpgport

(The bar is necessary so that zic isn't considered constantly out of
date because it depends on a phony target.)

This patch requires GNU make 3.80, because of the above "|" feature and
the $(eval) function.  Version 3.80 is dated October 2002, so it should
be no problem, but I do occasionally read of make 3.79 around here;
maybe it's time to get rid of that.  I did put in a check that makes the
build fail right away if a wrong version of make is used.


Attachment

pgsql-hackers by date:

Previous
From: Vaibhav Kaushal
Date:
Subject: Starting off with the development
Next
From: Fujii Masao
Date:
Subject: Re: Tracking latest timeline in standby mode