I am trying to use GNU make to run some old code in parallel (say, 50 or 100 instances at a time); but because of a legacy resource issue (sigh), each parallel instance has to execute in a separate directory.
Hence I would like to use -j 50 but where:
- job #0 runs in directory0
- job #1 runs in directory1
- job #2 runs in directory2, etc
I can see horrible ways of achieving this (I'm running under Windows 10), but no good way. :-(
Does GNU make offer any mechanism a given parallel job can use to determine the index of the job slot it is running in?