I was only able to find one way to do multiple builds cleanly (although I use Java), and it was by making a plugin. I can’t find the tutorial I used, so here’s the code I ended up with. You need something a little different, but hopefully this’ll help.
This goes in RunBuild.py located in folder RunBuild under packages
[code]import sublime, sublime_plugin
class RunBuildCommand(sublime_plugin.WindowCommand):
def run(self, build_system):
self.window.run_command( “set_build_system”, {“file”: build_system } )
self.window.run_command( “build” )[/code]
This goes in the user key bindings file:
{ "keys": "ctrl+1"], "command": "run_build", "args": { "build_system": "Packages/RunBuild/JavaC.sublime-build" } },
{ "keys": "ctrl+2"], "command": "run_build", "args": { "build_system": "Packages/RunBuild/JavaR.sublime-build" } },
{ "keys": "ctrl+3"], "command": "run_build", "args": { "build_system": "Packages/RunBuild/JavaA.sublime-build" } }
][/code]
And the final step is to add build configurations, located in the RunBuild folder (This is JavaA.sublime-build, located in the RunBuild folder):
[code]{
"cmd": "appletviewer", "applet.html" ],
"file_regex": "^(...*?):([0-9]*):?([0-9]*)",
"working_dir": "${file_path}",
"selector": "source.java"
}
You’ll need to modify it a bit to suit your needs, but at least it should point you in the right direction.