summaryrefslogtreecommitdiffstats
path: root/make
diff options
context:
space:
mode:
authorBradley Sepos <[email protected]>2016-12-22 00:42:42 -0500
committerBradley Sepos <[email protected]>2016-12-22 02:55:27 -0500
commit6ccbfa43e09d1c8c22c4a1c2749a5bf4b6e017e2 (patch)
treef4f8e4e2714ea1cdebcc0f72cad352445ab7960d /make
parenta827c12dd0639f1f3e49a540c1a594affa0d0ac9 (diff)
build: Add install, install-strip, and uninstall targets for Darwin/Mac.
Also refactor test.* convenience targets for Darwin/Mac. Configure parameter --prefix now sets HandBrakeCLI install directory [/usr/local] like on other systems. New configure parameter --xcode-prefix sets HandBrake.app install directory [/Applications]. Not used on other systems.
Diffstat (limited to 'make')
-rw-r--r--make/configure.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/make/configure.py b/make/configure.py
index cc758330c..36c782380 100644
--- a/make/configure.py
+++ b/make/configure.py
@@ -99,10 +99,14 @@ class Configure( object ):
self.build_final = os.curdir
self.src_final = self._final_dir( self.build_dir, self.src_dir )
self.prefix_final = self._final_dir( self.build_dir, self.prefix_dir )
+ if host.match( '*-*-darwin*' ):
+ self.xcode_prefix_final = self._final_dir( self.build_dir, self.xcode_prefix_dir )
self.infof( 'compute: makevar SRC/ = %s\n', self.src_final )
self.infof( 'compute: makevar BUILD/ = %s\n', self.build_final )
self.infof( 'compute: makevar PREFIX/ = %s\n', self.prefix_final )
+ if host.match( '*-*-darwin*' ):
+ self.infof( 'compute: makevar XCODE.prefix/ = %s\n', self.xcode_prefix_final )
## perform chdir and enable log recording
def chdir( self ):
@@ -198,6 +202,8 @@ class Configure( object ):
self.src_dir = os.path.normpath( options.src )
self.build_dir = os.path.normpath( options.build )
self.prefix_dir = os.path.normpath( options.prefix )
+ if host.match( '*-*-darwin*' ):
+ self.xcode_prefix_dir = os.path.normpath( options.xcode_prefix )
if options.sysroot != None:
self.sysroot_dir = os.path.normpath( options.sysroot )
else:
@@ -1356,6 +1362,8 @@ def createCLI():
grp = OptionGroup( cli, 'Xcode Options' )
grp.add_option( '--disable-xcode', default=False, action='store_true',
help='disable Xcode' )
+ grp.add_option( '--xcode-prefix', default=cfg.xcode_prefix_dir, action='store', metavar='DIR',
+ help='specify install dir for Xcode products [%s]' % (cfg.xcode_prefix_dir) )
grp.add_option( '--xcode-symroot', default='xroot', action='store', metavar='DIR',
help='specify root of the directory hierarchy that contains product files and intermediate build files' )
xcconfigMode.cli_add_option( grp, '--xcode-config' )
@@ -1493,7 +1501,9 @@ try:
cfg = Configure( verbose )
host = HostTupleProbe(); host.run()
- cfg.prefix_dir = ForHost( '/usr/local', ['/Applications','*-*-darwin*'] ).value
+ cfg.prefix_dir = '/usr/local'
+ if host.match( '*-*-darwin*' ):
+ cfg.xcode_prefix_dir = '/Applications'
build = BuildAction()
arch = ArchAction(); arch.run()
@@ -1856,6 +1866,8 @@ int main()
if not Tools.xcodebuild.fail and not options.disable_xcode:
doc.addBlank()
+ doc.add( 'XCODE.prefix', cfg.xcode_prefix_final )
+ doc.add( 'XCODE.prefix/', cfg.xcode_prefix_final + os.sep )
doc.add( 'XCODE.driver', options.xcode_driver )
if os.path.isabs(options.xcode_symroot):
doc.add( 'XCODE.symroot', options.xcode_symroot )