-
Notifications
You must be signed in to change notification settings - Fork 1
/
buildDocumentation.py
executable file
·57 lines (44 loc) · 1.2 KB
/
buildDocumentation.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#! /usr/bin/env python
import os
import sys
import subprocess
def usage():
print "usage:"
print "$0 variant [target] [-c]"
print "variant: scons configuration (ex variant=release)"
print "target: optional target for all subdirs (ex Lib)"
print "-c: optional clean"
if (sys.argv[0] == "--help"):
usage()
sys.exit()
if (sys.argv[0] == "-h"):
usage()
sys.exit()
def build(path, args=''):
externalProgram = 'scons Docs'
#navigate to folder to build at
for folder in path:
os.chdir(folder)
if (args != ''):
externalProgram += ' ' + args
#pass command arguments
for i in range(1, len(sys.argv)):
externalProgram += ' ' + sys.argv[i]
retcode = subprocess.call(externalProgram, shell=True)
#return to path before function call
for folder in path:
os.chdir('..')
if not retcode == 0:
exit()
build(['Docs'])
build(['Xml'])
build(['Kodegen'])
build(['External'])
build(['LibUpnpCil','Core'])
build(['LibUpnpCil','Toolkit'])
build(['LibUpnpCil','SysLib'])
build(['LibUpnpCil','Control'])
build(['LibUpnpCil','Services'])
build(['LibUpnpCil','DidlLite'])
build(['LibUpnpCil','Topology'])
build(['Kinsky'])