From d6d286775d9d08bc8db56c7673ced7058f53acc8 Mon Sep 17 00:00:00 2001 From: Bryan O'Sullivan Date: Thu, 30 Oct 2008 19:57:37 +0000 Subject: Windows build: only run vstool.exe once per build type. Reviewed by Mani. --- indra/develop.py | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) (limited to 'indra/develop.py') diff --git a/indra/develop.py b/indra/develop.py index 2dd7b39410..928165e765 100755 --- a/indra/develop.py +++ b/indra/develop.py @@ -543,14 +543,26 @@ class WindowsSetup(PlatformSetup): '''Override to add the vstool.exe call after running cmake.''' PlatformSetup.run_cmake(self, args) if self.unattended == 'OFF': - for build_dir in self.build_dirs(): - vstool_cmd = (os.path.join('tools','vstool','VSTool.exe') + - ' --solution ' + - os.path.join(build_dir,'SecondLife.sln') + - ' --config ' + self.build_type + - ' --startup secondlife-bin') - print 'Running %r in %r' % (vstool_cmd, getcwd()) - self.run(vstool_cmd) + self.run_vstool() + + def run_vstool(self): + for build_dir in self.build_dirs(): + stamp = os.path.join(build_dir, 'vstool.txt') + try: + prev_build = open(stamp).read().strip() + except IOError: + prev_build = '' + if prev_build == self.build_type: + # Only run vstool if the build type has changed. + continue + vstool_cmd = (os.path.join('tools','vstool','VSTool.exe') + + ' --solution ' + + os.path.join(build_dir,'SecondLife.sln') + + ' --config ' + self.build_type + + ' --startup secondlife-bin') + print 'Running %r in %r' % (vstool_cmd, getcwd()) + self.run(vstool_cmd) + print >> open(stamp, 'w'), self.build_type def run_build(self, opts, targets): cwd = getcwd() -- cgit v1.2.3