In my original jobserver implementation, I filled the job pipe with
up to 256 bytes, numbers from 0-255. The idea being that then make
could distinguish each job with a unique ID number. That idea got
thrown away when we decided to raise the limit to PIPEBUF (4096 on
traditional Unix, much larger now on Linux).

I'm looking for a way to expose a job ID number to the individual
jobs, in a consecutive range from 1-[number of jobs]. Not just unique
numbers, for that we could just use $$ already. The purpose is to
e.g. assign non-overlapping network port numbers when firing off a
number of client/server test scripts in parallel.

Is there anything that could do this now, exposed as a Make variable?
-- 
  -- Howard Chu
  CTO, Symas Corp.           http://www.symas.com
  Director, Highland Sun     http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/

Reply via email to