Revision: 474 http://trac.macosforge.org/projects/darwinbuild/changeset/474 Author: wsiegrist@apple.com Date: 2009-02-17 17:13:37 -0800 (Tue, 17 Feb 2009) Log Message: ----------- Various updates and clarifications to the README Modified Paths: -------------- trunk/README Modified: trunk/README =================================================================== --- trunk/README 2009-02-06 00:02:15 UTC (rev 473) +++ trunk/README 2009-02-18 01:13:37 UTC (rev 474) @@ -1,7 +1,8 @@ -Darwin Build Scripts -Updated 4-Oct-2006 +Darwinbuild +Updated 2009-02-17 Kevin Van Vechten <kvv@apple.com> +William Siegrist <wsiegrist@apple.com> 1. Overview 1.1 Availability, Bug Reports, Contributions, and Discussion @@ -23,7 +24,7 @@ 1. Overview =========== -The Darwin Build Scripts are a collection of tools that assist compilation of +Darwinbuild is a collection of tools that assist compilation of the many projects contained in Darwin[1], the open source base of Apple's Mac OS X operating system[2]. Apple publishes the sources of these projects in an archive format (.tar.gz). An archive is published for each project @@ -34,70 +35,81 @@ [1] <http://developer.apple.com/darwin/> [2] <http://www.apple.com/macosx/> -[3] <http://www.opensource.apple.com/darwinsource/> +[3] <http://www.opensource.apple.com/> 1.1 Availability, Bug Reports, Contributions, and Discussion -The latest release of the Darwin Build Scripts is available on the web[1]. -Pre-release versions are available via Subversion[2]. +Due to the constant development of darwinbuild, the only version you should +be working with is trunk of the subversion repository[1]. Trunk should +always be stable enough for building projects. If you find a problem or have +a enhancement in mind, file a ticket at the website[2]. -Bugs or enhancement requests should be filed in Trac[3]. +Discussion about darwinbuild, or building Darwin projects in +general, should take place on the darwinbuild-dev[3] mailing list. -Discussion about the Darwin Build Scripts, or building Darwin projects in -general, should take place on the darwinbuild-dev[4] mailing list. +[1] <http://svn.macosforge.org/repository/darwinbuild/trunk> +[2] <http://darwinbuild.macosforge.org/report/1> +[3] <http://lists.macosforge.org/mailman/listinfo/darwinbuild-dev> -[1] <http://trac.macosforge.org/projects/darwinbuild/> -[2] <http://svn.macosforge.org/repository/darwinbuild/trunk> -[3] <http://trac.macosforge.org/projects/darwinbuild/report> -[4] <http://lists.macosforge.org/mailman/listinfo/darwinbuild-dev> - =============== 2. Installation =============== -The included Makefile will compile the tools and install them into the -location specified by the DESTDIR parameter. If the DESTDIR parameter is -not specified, the files will be installed into /usr/local. +You can install the latest version of darwinbuild using MacPorts. + % port install darwinbuild + +Or, you can also install by checking out the source and building +darwinbuild yourself. The included Makefile will compile the tools and install +them into the location specified by the DESTDIR parameter. If the +DESTDIR parameter is not specified, the files will be installed into /usr/local. + +By default, darwinbuild will match the architectures of libSystem. If you want +to override this, set a list of -arch arguments in RC_CFLAGS. + % make % sudo make install 2.1 Creating the Build Directory -After installation, you must initialize the build directory using darwinbuild. -It is strongly recommended that builds be performed on a UFS or case-sensitive -HFSX filesystem. On Mac OS X, it is possible to use a disk image. It is -important that the volume's file ownership is honored: +After installation, you must initialize the build directory using darwinbuild. +In order to build Xcode-based projects, you need to use UFS to workaround a +bug. For Makefile-based projects, you can use any filesystem. You know you +have hit the bug when you get a build error about a missing project or +platform (depending on which version of Xcode you have). - % hdiutil create -size 4g -type UDIF -fs HFSX -volname Builds \ - -uid 0 -gid 0 -attach Builds.dmg - % sudo vsdbutil -a /Volumes/Builds - % sudo -s - Password: - # cd /Volumes/Builds - # mkdir Build8C46 - # cd Build8C46 - # darwinbuild -init 8C46 - Attempting to download http://svn.macosforge.org/repository/darwinbuild/trunk/plists//8C46.plist ... +To create a UFS disk image: + + % hdiutil create -size 4g -type UDIF -fs UFS -volname dbufs -attach dbufs.dmg + +To initialize your build environment, assuming you used the step above: + + # cd /Volumes/dbufs + # mkdir 9G55 + # cd 9G55 + # sudo -s + # darwinbuild -init 9G55 + Attempting to download http://svn.macosforge.org/repository/darwinbuild/trunk/plists//9G55.plist ... Download complete - Attempting to download http://svn.macosforge.org/repository/darwinbuild/trunk/plists//8B15.plist ... + Attempting to download http://svn.macosforge.org/repository/darwinbuild/trunk/plists//9F33.plist ... Download complete - Attempting to download http://svn.macosforge.org/repository/darwinbuild/trunk/plists//8A428.plist ... + ... + Attempting to download http://svn.macosforge.org/repository/darwinbuild/trunk/plists//9A581.plist ... Download complete # ls .build Headers Logs Roots Sources Symbols After initialization, the build directory will contain the following: -.build contains private data for the DarwinBuild system +.build contains private data for the darwinbuild system Headers contains the resulting header files from previous builds Logs contains logs of previous build attempts Roots contains the finished products of previous successful builds Sources contains sources downloaded from the web Symbols contains debug symbol versions of previous build products -When using the darwinbuild script, it is necessary that the current +When using the darwinbuild command, it is necessary that the current working directory be this build directory, or alternatively, that the DARWIN_BUILDROOT environment variable be set to the absolute path of the destination directory. The example usages in this document @@ -123,9 +135,9 @@ darwinbuild will attempt to download the sources from the web. If it does not already exist, a BuildRoot directory will be created. This -is where the build will actually take place. During the build, DarwinBuild +is where the build will actually take place. During the build, darwinbuild will change the root directory to BuildRoot (see the chroot(8) man page for -details). DarwinBuild is capable of copying the required tools, libraries +details). Darwinbuild is capable of copying the required tools, libraries and headers from the Roots directory into the BuildRoot prior to building. If a necessary dependency is not found in the Roots directory, it will be downloaded from the web. @@ -162,7 +174,7 @@ The results of a -headers build are placed in the Headers directory, in the same style as the Roots directory for a regular build. For example: - % sudo bin/darwinbuild -headers IOKitUser 184 + % sudo darwinbuild -headers IOKitUser % ls Headers/IOKitUser/IOKitUser-184.hdrs~1
participants (1)
-
source_changes@macosforge.org