Skip to content

Commit 083ba48

Browse files
committedMar 8, 2009
BuildSystem: general, configure and Xcode updates.
*** NOTICE: This changeset requires a clean build directory. Please issue 'make xclean' inside build dir(s) after 'svn up'. This will help ensure there are no unexpected results. *** GENERAL: - renamed makevar PROJECT/ -> SRC/ for clarity. - renamed makevar PREFIX.install/ -> PREFIX/ for clarity. - split custom GNUmakefile overrides into defs/rules files. - inserted optional level of make customization at SRC/ level; see docs. - dropped HB.repo.wcversion (svnversion is no longer used). - corrected several 'rm' usages to use -f flag which avoids some build errors. - refreshed generated 00-Building.*.txt docs; work still in progress on the wiki front. *** CONFIGURE: - made configure more robust; configure may now be run outside of build directory! - adding log recording of configure activities. - improved readability of default options for configure - added: --force overwrite existing build config --src=DIR specify top-level source dir [.] --build=DIR specify build scratch/output dir [.] --prefix=DIR specify install dir for products [/Applications] - dropped --launch-force (replaced by --force) - dropped --launch-dir (replaced by --build) - dropped --launch-log *** XCODE: - renamed pbxproj definition EXTERNAL_PROJECT -> EXTERNAL_SRC for clarity. - fixed all configurations to default to EXTERNAL_JOBS=1 . - enabled Xcode internal parallelization (libhb, HandBrakeCLI and HandBrake benefit). - make now tickles Xcode build files to cause Info.plist regeneration and posting to HandBrake.app output; ie: svn up; click build and HandBrake.app's about panel will reflect the new repository rev. *** DARWIN: - added support to build universal binaries; see docs. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2242 b64f7644-9d1e-0410-96f1-a4d463321fa5
1 parent 92d511d commit 083ba48

34 files changed

+1586
-859
lines changed
 

‎00-Building.cygwin.txt

+106-33
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Guide to Building HandBrake svn2213 (2009030301) on Cygwin
1+
Guide to Building HandBrake svn2241 (2009030801) on Cygwin
22
**********************************************************
33

44
Table of Contents
@@ -16,7 +16,8 @@ Table of Contents
1616
5.4.1 Global
1717
5.4.2 General Modules
1818
5.4.3 Contrib Modules
19-
5.4.4 Contrib Aggregates
19+
5.4.4 Contrib Touch and Untouch
20+
5.4.5 Contrib Aggregates
2021
5.5 Customizing Make
2122

2223

@@ -81,14 +82,17 @@ recommended you use these versions or similar:
8182
************
8283

8384
This chapter is for building from a terminal/shell environment in as
84-
few commands as possible. If more flexibility is required you should
85-
skip this chapter and jump to *Note overview::.
85+
few commands as possible. Upon completion of the following commands you
86+
should have a fresh build of HandBrake. Further instructions are
87+
available beginning with *Note overview:: which describes procedures
88+
suitable for repeating builds. This chapter should be skipped by those
89+
seeking more than a minimalist build.
8690

8791
svn checkout svn://svn.handbrake.fr/HandBrake/trunk hb-trunk
8892
cd hb-trunk
8993
./configure --launch
9094

91-
The special option `--launch' selected launch mode and performs the
95+
The special option `--launch' selects launch mode and performs the
9296
following steps:
9397

9498
* assert scratch directory `build/' does not exist
@@ -99,10 +103,14 @@ following steps:
99103

100104
* launch `make'
101105

102-
* capture build output to `build/log.txt'
106+
* capture build output to `build/log/build.txt'
103107

104108
* echo build output
105109

110+
* print elapsed time
111+
112+
* indicate if build ultimately succeeded or failed
113+
106114
4 Overview
107115
**********
108116

@@ -133,16 +141,14 @@ use Subversion 1.5.0 or higher. Lower versions should also work.
133141

134142
Configure the build system.
135143

136-
rm -fr build/
137-
mkdir build/
138-
cd build/
139-
../configure
144+
./configure
140145

141-
Create a scratch directory which will contain all files created during
142-
the build process. The directory name is arbitrary but we recommend
143-
something simple and descriptive. One directory is required for each
144-
distinctly configured build. We name our directory `build' for example
145-
purposes.
146+
Configure will automatically create a scratch build directory `build'
147+
unless you use GNU-style build procedures and first `cd' to a directory
148+
other than top-level source. Additionally you may specify use `--build'
149+
to specify the directory. The name of the directory is arbitrary but it
150+
is recommended to use something which indicates transient files which
151+
are not checked into the repository.
146152

147153
The `configure' utility accepts many options. It is recommended that
148154
you specify `--help' for the complete list of options. The following
@@ -151,14 +157,26 @@ options are also documented here:
151157
`--help'
152158
List available options.
153159

154-
`--prefix=PREFIX'
160+
`--src=DIR'
161+
Specify top-level source directory for HandBrake sources.
162+
163+
`--build=DIR'
164+
Specify destination directory for final product install. The
165+
default is to use either `build' if in the top-level source
166+
directory, otherwise `.'
167+
168+
`--prefix=DIR'
155169
Specify destination directory for final product install. This
156170
defaults to a reasonable platform-specific value.
157171

172+
`--launch'
173+
All-in-one option which launches the build and logs output
174+
automatically. Useful for novices and quickstart procedures.
175+
158176
`--disable-xcode'
159-
Disable driving the build through Xcode. If this option is
160-
disabled only `HandBrakeCLI' will be produced and Xcode will not
161-
be invoked. Mac OS X only.
177+
Disable shunting the build through Xcode. If this option is
178+
applied, `HandBrakeCLI' will be produced in a similare fashion as
179+
it is on other platforms; sans Xcode. Mac OS X only.
162180

163181
`--disable-gtk'
164182
Disable building the GTK GUI on applicable platforms such as
@@ -179,10 +197,6 @@ options are also documented here:
179197
architectures. The available choices are hard-coded per platform
180198
and no sanity checks for the required tools are performed.
181199

182-
`--gcc=EXE'
183-
Specify the `gcc' executable to use where EXE is the executable
184-
name which is either absolute or environment `PATH' is searched
185-
accordingly.
186200

187201
Clean-room procedures dictate that when certain factors change, old
188202
builds should be scrapped and new builds configured. This is the main
@@ -261,6 +275,14 @@ period.
261275
Build auto-generated project documentation. Various articles are
262276
produced and may be found in `build/doc/articles'.
263277

278+
`make report.help'
279+
Print list of available makefile vars report targets. These
280+
reports detail var definitions and expanded values used by the
281+
build system. For experts only.
282+
283+
`make report.all'
284+
Convenience target which aggregates all reports. For experts only.
285+
264286
5.4.2 General Modules
265287
---------------------
266288

@@ -313,7 +335,36 @@ Contrib modules such as `a52dec', `bzip2', `faac', `faad2', `ffmpeg',
313335
Extra clean module; first invokes uninstall then recursively
314336
removes the module build directory.
315337

316-
5.4.4 Contrib Aggregates
338+
5.4.4 Contrib Touch and Untouch
339+
-------------------------------
340+
341+
Also available are some very granular targets which help force builds
342+
from specific cycle points. The following targets are available to
343+
touch and untouch the respective module target; this will force the
344+
build system to treat the target as satisfied after a touch or
345+
unsatisfied after an untouch:
346+
347+
* make MODULE.extract.touch
348+
349+
* make MODULE.extract.untouch
350+
351+
* make MODULE.patch.touch
352+
353+
* make MODULE.patch.untouch
354+
355+
* make MODULE.configure.touch
356+
357+
* make MODULE.configure.untouch
358+
359+
* make MODULE.build.touch
360+
361+
* make MODULE.build.untouch
362+
363+
* make MODULE.install.touch
364+
365+
* make MODULE.install.untouch
366+
367+
5.4.5 Contrib Aggregates
317368
------------------------
318369

319370
For convenience, the following targets aggregate the all contrib
@@ -341,19 +392,41 @@ modules' respective targets together:
341392
====================
342393

343394
If the need arises to override settings in the build system
344-
(essentially gnu-make variables) the recommended method is to
345-
create/edit the optional include file `build/GNUmakefile.custom' which
346-
sits adjacent to the top-level makefile. Do not check this file into
347-
the respository. The sole purpose is to allow a place to store local
348-
build settings for testing, tweaking, and experimenting with build
349-
configuration without losing your settings if `configure' is invoked;
350-
ie: `configure' would overwrite `GNUmakefile' and any customizations
351-
contained therein would be lost. Here is a short example of what the
352-
contents of `build/GNUmakefile.custom' might contain:
395+
(essentially gnu-make variables) the recommended method is to create
396+
optional include files which are automatically included if present and
397+
follow this naming convention; Do not check these files into the
398+
respository:
399+
400+
`_SRC_/custom.defs'
401+
Custom makevar definitions outside `build'. Suitable for settings
402+
which apply across all builds for a particular checkout; or which
403+
survives manual removal of `build'.
404+
405+
`_SRC_/custom.rules'
406+
Custom make rules outside `build'. Suitable for settings which
407+
apply across all builds for a particular checkout; or which
408+
survives manual removal of `build'.
409+
410+
`_BUILD_/GNUmakefile.custom.defs'
411+
Custom makevar definitions specific to a `build' directory.
412+
413+
`_BUILD_/GNUmakefile.custom.rules'
414+
Custom makevar rules specific to a `build' directory.
415+
416+
417+
The purpose is to allow a place to store local build settings for
418+
testing, tweaking, and experimenting with build configuration without
419+
losing your settings if `configure' is invoked; ie: `configure' would
420+
overwrite `GNUmakefile' and any customizations contained therein would
421+
be lost. Here is a short example of what the contents of
422+
`_SRC_/custom.defs' might contain:
353423

354424
## bump to gcc-4.2 in current path
355425
GCC.gcc = gcc-4.2
356426

357427
## replace optimize for 'speed' with more agressive settings
358428
GCC.args.O.speed = -O3 -fomit-frame-pointer -msse4.2
359429

430+
See also `make report.help' which displays a set of reports used to
431+
dump makefile vars.
432+

0 commit comments

Comments
 (0)
Please sign in to comment.