tech-toolchain archive

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

Re: make: dealing with targets with multiple outputs

On 5/31/19 2:06 PM, Simon J. Gerraty wrote:
David Holland <> wrote:
We already have a solution for this problem, it's just waiting for
someone to find time to implement it.

Namely: given multiple targets on the left, don't schedule them in
parallel, and after building the first one check to see how many of
the others also got knocked off at the same time.

Couple that with a special target to trigger it - sounds good.
That way you avoid the need to rewrite lots of makefiles with .for loops

The key is still to associate all the targets that were on lhs

I guess that I have to ask the question - why not just add additional dependencies to more or less force serial operation?

I did this previously, and it worked OK for both single processor and large -j values:

cfg_schema_parse.h: cfg_schema_parse.c
cfg_schema_parse.c: ${.CURDIR}/../common/cfg_schema_parse.y ${INCS}
        ${YACC} ${YFLAGS} --output=${.TARGET} ${.IMPSRC}


Home | Main Index | Thread Index | Old Index