Fix vf_tcdump's compilation
[mplayer/kovensky.git] / build / enable-mt
blobe9c2e031c32fea584a928d801adc877eb6fa8af9
1 #!/usr/bin/env python
3 import os
4 from os import path
5 from subprocess import check_call
7 from script.helpers import GitWrapper
9 def main():
10 git = GitWrapper()
11 open('ffmpeg-mt-enabled', 'w').close()
12 # Allow setups where both ffmpeg and ffmpeg-mt are checked out
13 # simultaneously, and leave the directories alone in that case.
14 if path.exists('ffmpeg/.git') and not path.exists('ffmpeg-mt/.git'):
15 # ffmpeg-mt should be an empty directory if things are right
16 os.rmdir('ffmpeg-mt')
17 os.rename('ffmpeg', 'ffmpeg-mt')
18 os.mkdir('ffmpeg')
19 if git.supports_nofetch:
20 cmd = 'git submodule update --no-fetch'.split()
21 else:
22 cmd = 'git submodule update'.split()
23 os.chdir('..')
24 check_call(cmd + ['build/ffmpeg-mt'])
25 os.chdir('build/ffmpeg-mt')
26 def func(cmd=cmd):
27 check_call(cmd)
28 git.foreach_module(func)
30 main()