Writing batch files for simulation in Modelsim/QuestaSim
Forget the Verilog preprocessor for this. Put Questa/ModelSim on your path and use a makefile to drive the vlog/vsim commands, run it all from the command line. This works natively on Linux, or Windows if you use Cygwin.