6 $Id: XCodeMake.py 655 2010-09-29 22:40:22Z soothe $
16 # ------------------------------------------------------------
18 # ------------------------------------------------------------
21 print 'Error: %s' % (errMsg
)
26 print ' %s -p <path to project> -b [Release|Debug|etc.] -t [All|Platinum|PlatinumFramework|etc.] -s [macosx|iphoneos]' % (sys
.argv
[0])
28 print ' REQUIRED OPTIONS'
29 print '\t-p <project>'
30 print '\t-b <configuration>'
34 print ' BUILD OPTIONS'
35 print '\t-c\tMake clean'
38 # ------------------------------------------------------------
40 # ------------------------------------------------------------
42 opts
, args
= getopt
.getopt(sys
.argv
[1:], "p:b:t:s:c")
43 except getopt
.GetoptError
, (msg
, opt
):
44 # print 'Error: invalid argument, %s: %s' % (opt, msg)
45 usage('invalid argument, %s: %s' % (opt
, msg
))
69 if makeClean
: buildSwitch
= 'clean'
71 cmd_list
= ['xcodebuild', '-project', '%s' % projectFile
, '-target', '%s' % targetName
, '-sdk', '%s' % sdk
, '-configuration', '%s' % buildName
, '%s' % buildSwitch
]
72 cmd
= " ".join(cmd_list
)
75 retVal
= subprocess
.call(cmd_list
)
76 # only the least sig 8 bits are the real return value
79 print '** BUILD FAILURE **'
81 except NameError, (name
):
82 usage('missing argument %s' % (name
))