Python script to generate sweep makefile