summaryrefslogtreecommitdiffstats
path: root/make/configure.py
diff options
context:
space:
mode:
authorkonablend <[email protected]>2009-03-04 00:54:53 +0000
committerkonablend <[email protected]>2009-03-04 00:54:53 +0000
commit6d2d51974af122bdfe6eb82f355e270cd66c48af (patch)
tree5a82b3790f4dd0c3f71aa1643838e937edca597a /make/configure.py
parentc4d9c49de0f020f451325dbb39b97642eaf96032 (diff)
BuildSystem: darwin
- made Xcode external targets consistent for each configuration. - shunted terminal NAME=VALUE vars through xcodebuild. - folded macosx/module.xcode shunt functions into single. - added new report target to show a single var; eg: make report.var NAME=GCC.gcc . BuildSystem: darwin ppc - fixed configure on ppc host: correctly identify native architecture. - fixed configure to be more resilient when svn probes fail. - fixed configure to show error output for svn probes. BuildSystme: xcode - added external target 'external' to represent 'all things in external system' which is slight more than what 'libhb' might represent. - added doc section Building.osx: External Targets . git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2214 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'make/configure.py')
-rw-r--r--make/configure.py60
1 files changed, 34 insertions, 26 deletions
diff --git a/make/configure.py b/make/configure.py
index 2f8cf6e00..59a512fb8 100644
--- a/make/configure.py
+++ b/make/configure.py
@@ -141,7 +141,7 @@ class Guess:
self.release = ''
self.extra = ''
elif re.match( 'darwin', p_system ):
- self.machine = p_machine
+ self.machine = p_processor
self.vendor = 'apple'
self.system = p_system
self.systemc = p_systemc
@@ -263,7 +263,13 @@ class OptionMode( list ):
self.mode = self.default
def __str__( self ):
- return ' '.join( self ).replace( self.mode, '*'+self.mode )
+ s = ''
+ for a in self:
+ if a == self.mode:
+ s += ' *' + a
+ else:
+ s += ' ' + a
+ return s[1:]
def addToGroup( self, group, option, name ):
group.add_option( '', option, help='select %s mode: %s' % (name,self), default=self.mode, metavar='MODE' )
@@ -435,38 +441,40 @@ class Repository:
# parse output: svnversion PROJECT_DIR
cmd = 'svnversion ' + initial_project_dir
- print 'running: %s' % (cmd)
+ print 'attempting to probe subversion: %s' % (cmd)
try:
- p = subprocess.Popen( cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE )
+ p = subprocess.Popen( cmd, shell=True, stdout=subprocess.PIPE )
p.wait();
- if p.returncode == 0:
- self.wcversion = p.stdout.readline().rstrip()
+ if p.returncode:
+ sys.exit( 1 )
+ self.wcversion = p.stdout.readline().rstrip()
except:
pass
# parse output: svn info PROJECT_DIR
cmd = 'svn info ' + initial_project_dir
- print 'running: %s' % (cmd)
+ print 'attempting to probe subversion: %s' % (cmd)
try:
- p = subprocess.Popen( cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE )
+ p = subprocess.Popen( cmd, shell=True, stdout=subprocess.PIPE )
p.wait();
- if p.returncode == 0:
- for line in p.stdout:
- (name,value) = re.match( '([^:]+):\\s+(.+)', line.rstrip() ).groups()
- if name == 'URL':
- self.url = value
- elif name == 'Repository Root':
- self.root = value
- elif name == 'Repository UUID':
- self.uuid = value
- elif name == 'Revision':
- self.rev = int( value )
- elif name == 'Last Changed Date':
- # strip chars in parens
- if value.find( ' (' ):
- self.date = value[0:value.find(' (')]
- else:
- self.date = value
+ if p.returncode:
+ sys.exit( 1 )
+ for line in p.stdout:
+ (name,value) = re.match( '([^:]+):\\s+(.+)', line.rstrip() ).groups()
+ if name == 'URL':
+ self.url = value
+ elif name == 'Repository Root':
+ self.root = value
+ elif name == 'Repository UUID':
+ self.uuid = value
+ elif name == 'Revision':
+ self.rev = int( value )
+ elif name == 'Last Changed Date':
+ # strip chars in parens
+ if value.find( ' (' ):
+ self.date = value[0:value.find(' (')]
+ else:
+ self.date = value
except:
pass
@@ -629,7 +637,7 @@ config.add( 'HB.version.major', project.vmajor )
config.add( 'HB.version.minor', project.vminor )
config.add( 'HB.version.point', project.vpoint )
config.add( 'HB.version', project.version )
-config.add( 'HB.version.hex', '%04x%02x%02x%02x%06x' % (project.vmajor,project.vminor,project.vpoint,0,repo.rev) )
+config.add( 'HB.version.hex', '%04x%02x%02x%08x' % (project.vmajor,project.vminor,project.vpoint,repo.rev) )
config.add( 'HB.build', project.build )