Consider a makefile
all : a c
(cmd3)
a : b1 b2 b3 b4
(cmd2)
b% :
(cmd) $*
Consider that the dependencies b% can be parallelized and run on grid engine. What would be the simplest way to qsub these dependencies with minimal changes to the makefile so that cmd2 is executed only after all the dependencies are satisfied ?