summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkonablend <[email protected]>2009-03-05 06:57:31 +0000
committerkonablend <[email protected]>2009-03-05 06:57:31 +0000
commitd9cbd469c2cda62f205599173910ec627031dadd (patch)
tree188532861f51a1650a643e426501c2dc257fd536
parent66672c6931393a17a4ffc48c1509205d23518221 (diff)
BuildSystem:
- increased inter-contrib module rebuild sanity; ie: if an svn update is done and a new x264 tarball is available, the system will fetch it and proceed to extract->patch->configure->build->install and because it is utterly dangerous (undefined results can easily occur) to re-extract over an existing extract, the appropriate steps are taken to first rm -fr the tarball extraction directory. This is generally good practice but I'm explaining it here in detail in case some developers are taking risks like editing files in the build/ tree and erroneously assuming they will not be overwritten by either this new build system or contrib (foreign) build systems. - added contrib touch/untouch targets; see doc. - updated docs accordingly. - fixed typo for GCCargs.g.max which caused --debug=max to not operate properly. - unofficial builds will no longer rebrand naming to 'NoNameBrand' git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2223 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--contrib/bzip2/module.defs6
-rw-r--r--contrib/xvidcore/module.defs10
-rw-r--r--doc/texi/building/chapter.via.terminal.texi18
-rw-r--r--make/configure.py20
-rw-r--r--make/include/contrib.defs76
-rw-r--r--make/include/gcc.defs2
6 files changed, 89 insertions, 43 deletions
diff --git a/contrib/bzip2/module.defs b/contrib/bzip2/module.defs
index dcc878ad4..83107cfdc 100644
--- a/contrib/bzip2/module.defs
+++ b/contrib/bzip2/module.defs
@@ -14,11 +14,13 @@ BZIP2.BUILD.ntargets = libbz2.a
define BZIP2.INSTALL
mkdir -p $(CONTRIB.build/)lib/ $(CONTRIB.build/)include/
- cp $(BZIP2.EXTRACT.target/)libbz2.a $(CONTRIB.build/)lib/
- cp $(BZIP2.EXTRACT.target/)bzlib.h $(CONTRIB.build/)include/
+ cp $(BZIP2.EXTRACT.dir/)libbz2.a $(CONTRIB.build/)lib/
+ cp $(BZIP2.EXTRACT.dir/)bzlib.h $(CONTRIB.build/)include/
+ $(TOUCH.exe) $@
endef
define BZIP2.UNINSTALL
rm $(CONTRIB.build/)lib/libbz2.a
rm $(CONTRIB.build/)include/bzlib.h
+ $(RM.exe) -f $(BZIP2.INSTALL.target)
endef
diff --git a/contrib/xvidcore/module.defs b/contrib/xvidcore/module.defs
index 0ec291a24..c45059b23 100644
--- a/contrib/xvidcore/module.defs
+++ b/contrib/xvidcore/module.defs
@@ -4,17 +4,19 @@ $(eval $(call import.CONTRIB.defs,XVIDCORE))
XVIDCORE.FETCH.url = http://download.m0k.org/handbrake/contrib/xvidcore-1.1.3.tar.gz
XVIDCORE.EXTRACT.tarbase = xvidcore
-XVIDCORE.CONFIGURE.dir = $(XVIDCORE.EXTRACT.target/)build/generic/
+XVIDCORE.CONFIGURE.dir = $(XVIDCORE.EXTRACT.dir/)build/generic/
-XVIDCORE.BUILD.dir = $(XVIDCORE.EXTRACT.target/)build/generic/
+XVIDCORE.BUILD.dir = $(XVIDCORE.EXTRACT.dir/)build/generic/
XVIDCORE.BUILD.ntargets = libxvidcore.a
define XVIDCORE.INSTALL
- cp $(XVIDCORE.EXTRACT.target/)build/generic/=build/libxvidcore.a $(CONTRIB.build/)lib/
- cp $(XVIDCORE.EXTRACT.target/)src/xvid.h $(CONTRIB.build/)include/
+ cp $(XVIDCORE.EXTRACT.dir/)build/generic/=build/libxvidcore.a $(CONTRIB.build/)lib/
+ cp $(XVIDCORE.EXTRACT.dir/)src/xvid.h $(CONTRIB.build/)include/
+ $(TOUCH.exe) $@
endef
define XVIDCORE.UNINSTALL
rm $(CONTRIB.build/)lib/libxvidcore.a
rm $(CONTRIB.build/)include/xvid.h
+ $(RM.exe) -f $(XVIDCORE.INSTALL.target)
endef
diff --git a/doc/texi/building/chapter.via.terminal.texi b/doc/texi/building/chapter.via.terminal.texi
index 0c323ab8c..29014819e 100644
--- a/doc/texi/building/chapter.via.terminal.texi
+++ b/doc/texi/building/chapter.via.terminal.texi
@@ -171,9 +171,25 @@ This usually invokes autotool clean.
Extra clean module; first invokes uninstall then recursively removes the module build directory.
@end table
+@anchor{terminal.targets.contrib.touch}
+@subsection Contrib Touch and Untouch
+Also available are some very granular targets which help force builds from specific cycle points. The following targets are available to touch and untouch the respective module target; this will force the build system to treat the target as satisfied after a touch or unsatisfied after an untouch:
+
+@itemize
+@item make @i{MODULE}.extract.touch
+@item make @i{MODULE}.extract.untouch
+@item make @i{MODULE}.patch.touch
+@item make @i{MODULE}.patch.untouch
+@item make @i{MODULE}.configure.touch
+@item make @i{MODULE}.configure.untouch
+@item make @i{MODULE}.build.touch
+@item make @i{MODULE}.build.untouch
+@item make @i{MODULE}.install.touch
+@item make @i{MODULE}.install.untouch
+@end itemize
+
@anchor{terminal.targets.contrib.aggregate}
@subsection Contrib Aggregates
-
For convenience, the following targets aggregate the all contrib modules' respective targets together:
@itemize
diff --git a/make/configure.py b/make/configure.py
index 59a512fb8..ce2884093 100644
--- a/make/configure.py
+++ b/make/configure.py
@@ -499,20 +499,12 @@ class Repository:
##
class Project:
def __init__( self ):
- if repo.type == 'unofficial':
- self.name = 'NoNameBrand'
- self.acro_lower = 'nnb'
- self.acro_upper = 'NNB'
- self.url_website = 'http://nonamebrand.com'
- self.url_community = 'http://forum.nonamebrand.com'
- self.url_irc = 'irc://irc.freenode.net/nonamebrand'
- else:
- self.name = 'HandBrake'
- self.acro_lower = 'hb'
- self.acro_upper = 'HB'
- self.url_website = 'http://handbrake.fr'
- self.url_community = 'http://forum.handbrake.fr'
- self.url_irc = 'irc://irc.freenode.net/handbrake'
+ self.name = 'HandBrake'
+ self.acro_lower = 'hb'
+ self.acro_upper = 'HB'
+ self.url_website = 'http://handbrake.fr'
+ self.url_community = 'http://forum.handbrake.fr'
+ self.url_irc = 'irc://irc.freenode.net/handbrake'
self.name_lower = self.name.lower()
self.name_upper = self.name.upper()
diff --git a/make/include/contrib.defs b/make/include/contrib.defs
index 772258c37..5f0b2d224 100644
--- a/make/include/contrib.defs
+++ b/make/include/contrib.defs
@@ -35,9 +35,12 @@ define import.CONTRIB.defs
## target: extract
##
$(1).EXTRACT.tarbase = $$(patsubst %.tar.gz,%,$$(notdir $$($(1).FETCH.url)))
- $(1).EXTRACT.target/ = $$($(1).build/)$$($(1).EXTRACT.tarbase)/
+ $(1).EXTRACT.dir/ = $$($(1).build/)$$($(1).EXTRACT.tarbase)/
+ $(1).EXTRACT.target = $$($(1).build/).stamp.extract
define $(1).EXTRACT
+ $$(RM.exe) -fr $$($(1).EXTRACT.dir/)
$$(TAR.exe) xfC $$($(1).FETCH.tar) $$($(1).build/)
+ $$(TOUCH.exe) $$@
endef
##
@@ -55,14 +58,15 @@ define import.CONTRIB.defs
$(1).PATCH.target = $$($(1).build/).stamp.patch
define $(1).PATCH
- $$(foreach p,$$($(1).PATCH.srcs),$$(call $(1).PATCH.item,$$($(1).EXTRACT.target/),$$(p)))
+ $$(foreach p,$$($(1).PATCH.srcs),$$(call $(1).PATCH.item,$$($(1).EXTRACT.dir/),$$(p)))
+ $$(TOUCH.exe) $$@
endef
##
## target: configure
##
$(1).CONFIGURE.sete = set -e;
- $(1).CONFIGURE.dir = $$($(1).EXTRACT.target/)
+ $(1).CONFIGURE.dir = $$($(1).EXTRACT.dir/)
$(1).CONFIGURE.bootstrap =
$(1).CONFIGURE.exe = ./configure
$(1).CONFIGURE.host = $$(CONTRIB.host)
@@ -91,13 +95,14 @@ define import.CONTRIB.defs
$(1).CONFIGURE.target = $$($(1).build/).stamp.configure
define $(1).CONFIGURE
$$(call fn.ARGS,$(1).CONFIGURE,$$($(1).CONFIGURE.args))
+ $$(TOUCH.exe) $$@
endef
##
## target: build
##
$(1).BUILD.make = $$(MAKE)
- $(1).BUILD.dir = $$($(1).EXTRACT.target/)
+ $(1).BUILD.dir = $$($(1).EXTRACT.dir/)
$(1).BUILD.extra =
$(1).BUILD.ntargets =
@@ -107,14 +112,14 @@ define import.CONTRIB.defs
$(1).BUILD.target = $$($(1).build/).stamp.build
define $(1).BUILD
$$(call fn.ARGS,$(1).BUILD,$$($(1).BUILD.args))
+ $$(TOUCH.exe) $$@
endef
##
## target: install
##
-
$(1).INSTALL.make = $$(MAKE)
- $(1).INSTALL.dir = $$($(1).EXTRACT.target/)
+ $(1).INSTALL.dir = $$($(1).EXTRACT.dir/)
$(1).INSTALL.extra =
$(1).INSTALL.ntargets =
@@ -124,13 +129,14 @@ define import.CONTRIB.defs
$(1).INSTALL.target = $$($(1).build/).stamp.install
define $(1).INSTALL
$$(call fn.ARGS,$(1).INSTALL,$$($(1).INSTALL.args))
+ $$(TOUCH.exe) $$@
endef
##
## target: uninstall
##
$(1).UNINSTALL.make = $$(MAKE)
- $(1).UNINSTALL.dir = $$($(1).EXTRACT.target/)
+ $(1).UNINSTALL.dir = $$($(1).EXTRACT.dir/)
$(1).UNINSTALL.extra =
$(1).UNINSTALL.ntargets = uninstall
@@ -139,13 +145,14 @@ define import.CONTRIB.defs
define $(1).UNINSTALL
$$(call fn.ARGS,$(1).UNINSTALL,$$($(1).UNINSTALL.args))
+ $$(RM.exe) -f $$($(1).INSTALL.target)
endef
##
## target: clean
##
$(1).CLEAN.make = $$(MAKE)
- $(1).CLEAN.dir = $$($(1).EXTRACT.target/)
+ $(1).CLEAN.dir = $$($(1).EXTRACT.dir/)
$(1).CLEAN.extra =
$(1).CLEAN.ntargets = clean
@@ -154,15 +161,18 @@ define import.CONTRIB.defs
define $(1).CLEAN
$$(call fn.ARGS,$(1).CLEAN,$$($(1).CLEAN.args))
+ $$(RM.exe) -f $$($(1).BUILD.target)
endef
+ ##
## other values used to aid prerequisite dirs and cleanup
##
$(1).out += $$($(1).build/)
$(1).out += $$($(1).FETCH.target)
+ $(1).out += $$($(1).EXTRACT.target)
$(1).out += $$($(1).PATCH.target)
$(1).out += $$($(1).CONFIGURE.target)
- $(1).out += $$($(1).ALL.target)
+ $(1).out += $$($(1).BUILD.target)
$(1).out += $$($(1).INSTALL.target)
BUILD.out += $$($(1).out)
@@ -187,12 +197,18 @@ $$($(1).FETCH.target): | $$(dir $$($(1).FETCH.target))
## target: extract
## must touch dir after extraction because old timestamp is restored via tar.
##
-$($(1).name).extract: | $$($(1).EXTRACT.target/)
+$($(1).name).extract: $$($(1).EXTRACT.target)
-$$($(1).EXTRACT.target/): | $$(dir $$($(1).build/))
-$$($(1).EXTRACT.target/): $$($(1).FETCH.target)
+$$($(1).EXTRACT.target): | $$(dir $$($(1).EXTRACT.target))
+$$($(1).EXTRACT.target): $$($(1).deps)
+$$($(1).EXTRACT.target): $$($(1).FETCH.target)
$$($(1).EXTRACT)
- $$(TOUCH.exe) $$@
+
+$($(1).name).extract.touch:
+ $$(TOUCH.exe) $$($(1).EXTRACT.target)
+
+$($(1).name).extract.untouch:
+ $$(RM.exe) $$($(1).EXTRACT.target)
##
## target: patch
@@ -200,9 +216,14 @@ $$($(1).EXTRACT.target/): $$($(1).FETCH.target)
$($(1).name).patch: $$($(1).PATCH.target)
$$($(1).PATCH.target): | $$(dir $$($(1).PATCH.target))
-$$($(1).PATCH.target): | $$($(1).EXTRACT.target/)
+$$($(1).PATCH.target): $$($(1).EXTRACT.target)
$$($(1).PATCH)
- $$(TOUCH.exe) $$@
+
+$($(1).name).patch.touch:
+ $$(TOUCH.exe) $$($(1).PATCH.target)
+
+$($(1).name).patch.untouch:
+ $$(RM.exe) $$($(1).PATCH.target)
##
## target: configure
@@ -210,10 +231,14 @@ $$($(1).PATCH.target): | $$($(1).EXTRACT.target/)
$($(1).name).configure: $$($(1).CONFIGURE.target)
$$($(1).CONFIGURE.target): | $$(dir $$($(1).CONFIGURE.target))
-$$($(1).CONFIGURE.target): $$($(1).deps)
$$($(1).CONFIGURE.target): $$($(1).PATCH.target)
$$($(1).CONFIGURE)
- $$(TOUCH.exe) $$@
+
+$($(1).name).configure.touch:
+ $$(TOUCH.exe) $$($(1).CONFIGURE.target)
+
+$($(1).name).configure.untouch:
+ $$(RM.exe) $$($(1).CONFIGURE.target)
##
## target: build
@@ -222,8 +247,14 @@ $($(1).name).build: $$($(1).BUILD.target)
$$($(1).BUILD.target): | $$(dir $$($(1).BUILD.target))
$$($(1).BUILD.target): $$($(1).CONFIGURE.target)
+ -$$($(1).CLEAN)
+$$($(1).BUILD)
- $$(TOUCH.exe) $$@
+
+$($(1).name).build.touch:
+ $$(TOUCH.exe) $$($(1).BUILD.target)
+
+$($(1).name).build.untouch:
+ $$(RM.exe) $$($(1).BUILD.target)
##
## target: install
@@ -233,21 +264,24 @@ $($(1).name).install: $$($(1).INSTALL.target)
$$($(1).INSTALL.target): | $$(dir $$($(1).INSTALL.target))
$$($(1).INSTALL.target): $$($(1).BUILD.target)
$$($(1).INSTALL)
- $$(TOUCH.exe) $$@
+
+$($(1).name).install.touch:
+ $$(TOUCH.exe) $$($(1).INSTALL.target)
+
+$($(1).name).install.untouch:
+ $$(RM.exe) $$($(1).INSTALL.target)
##
## target: uninstall
##
$($(1).name).uninstall:
-$$($(1).UNINSTALL)
- $$(RM.exe) -f $$($(1).INSTALL.target)
##
## target: clean
##
$($(1).name).clean:
-$$($(1).CLEAN)
- $$(RM.exe) -f $$($(1).BUILD.target)
##
## target: xclean
diff --git a/make/include/gcc.defs b/make/include/gcc.defs
index 4ed746392..ef4b180f8 100644
--- a/make/include/gcc.defs
+++ b/make/include/gcc.defs
@@ -89,7 +89,7 @@ define import.GCC
$(1).GCC.args.g.none = $$(GCC.args.g.none)
$(1).GCC.args.g.min = $$(GCC.args.g.min)
$(1).GCC.args.g.std = $$(GCC.args.g.std)
- $(1).GCC.args.g.max = $$(GCC.args.g.max )
+ $(1).GCC.args.g.max = $$(GCC.args.g.max)
$(1).GCC.args.O.none = $$(GCC.args.O.none)
$(1).GCC.args.O.size = $$(GCC.args.O.size)
$(1).GCC.args.O.speed = $$(GCC.args.O.speed)