summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkonablend <[email protected]>2009-03-01 20:29:06 +0000
committerkonablend <[email protected]>2009-03-01 20:29:06 +0000
commitdc202093832299fb42383b18e0da795c398aeecf (patch)
tree89913bbc3f8e11bf496934a908509ecc228d66a8
parent883b33c821d547afc1482bf19d6c496949599683 (diff)
BuildSystem:
- added configure --prefix to specify an install location - propagated prefix to gtk's aggregated build - value is exposed to make as two variables, use either depending on if ending slash is desired $(INSTALL.prefix) $(INSTALL.prefix/) git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2185 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--gtk/module.rules5
-rw-r--r--make/configure.py14
-rw-r--r--make/include/report.defs2
3 files changed, 19 insertions, 2 deletions
diff --git a/gtk/module.rules b/gtk/module.rules
index 215c8776e..6c197199d 100644
--- a/gtk/module.rules
+++ b/gtk/module.rules
@@ -12,8 +12,9 @@ $(GTK.CONFIGURE.stamp): | $(dir $(GTK.CONFIGURE.stamp))
set -e; cd $(GTK.src/); NOCONFIGURE=1 ./autogen.sh
set -e; cd $(GTK.build/); $(call fn.ABSOLUTE,$(GTK.src/))configure \
CFLAGS="$(call fn.ARGS,GTK.GCC,.g .O)" \
- LDFLAGS="$(call fn.ARGS,GTK.GCC,?strip .g .O)" \
- --with-hb=$(call fn.ABSOLUTE,$(BUILD/))
+ LDFLAGS="$(call fn.ARGS,GTK.GCC,?strip .g .O)" \
+ --prefix=$(INSTALL.prefix) \
+ --with-hb=$(call fn.ABSOLUTE,$(BUILD/))
$(TOUCH.exe) $@
$(GTK.BUILD.stamp): $(LIBHB.a)
diff --git a/make/configure.py b/make/configure.py
index 1aa85bd39..421001791 100644
--- a/make/configure.py
+++ b/make/configure.py
@@ -290,9 +290,19 @@ elif guessHost.match( 'powerpc-*-darwin9.*' ):
else:
archMode = OptionMode( 0, guessHost.proc )
+if guessHost.match( '*-*-darwin*' ):
+ d_prefix = '/Applications'
+else:
+ d_prefix = '/usr/local'
+
## create parser
parser = OptionParser( 'Usage: %prog' )
+group = OptionGroup( parser, 'Installation Options' )
+group.add_option( '', '--prefix', default=d_prefix, action='store',
+ help='install destination for final products (%s)' % (d_prefix) )
+parser.add_option_group( group )
+
group = OptionGroup( parser, 'Feature Options' )
group.add_option( '', '--disable-xcode', default=False, action='store_true',
help='disable Xcode (Darwin only)' )
@@ -628,6 +638,10 @@ config.add( 'BUILD/', os.curdir + os.sep )
config.add( 'PROJECT/', project_dir + os.sep )
config.addBlank()
+config.add( 'INSTALL.prefix', options.prefix )
+config.add( 'INSTALL.prefix/', '$(INSTALL.prefix)/' )
+
+config.addBlank()
config.add( 'FEATURE.xcode', 0 if options.disable_xcode else 1 )
config.add( 'FEATURE.gtk', 0 if options.disable_gtk else 1 )
diff --git a/make/include/report.defs b/make/include/report.defs
index 6ff71dc99..858c45523 100644
--- a/make/include/report.defs
+++ b/make/include/report.defs
@@ -36,6 +36,8 @@ $(info #########################################################################
$(info $(foreach v,$(sort $(filter HB.%,$(.VARIABLES))),$(call fn.PRINTVAR,$v)))
$(info $(foreach v,$(sort $(filter HOST.%,$(.VARIABLES))),$(call fn.PRINTVAR,$v)))
$(info $(foreach v,$(sort $(filter BUILD.%,$(.VARIABLES))),$(call fn.PRINTVAR,$v)))
+$(info $(foreach v,$(sort $(filter INSTALL.%,$(.VARIABLES))),$(call fn.PRINTVAR,$v)))
+$(info $(foreach v,$(sort $(filter FEATURE.%,$(.VARIABLES))),$(call fn.PRINTVAR,$v)))
$(info $(foreach v,$(sort $(filter CONTRIB.%,$(.VARIABLES))),$(call fn.PRINTVAR,$v)))
$(info )
endif