ADC Home > Reference Library > Reference > Mac OS X > Mac OS X Man Pages

 

This document is a Mac OS X manual page. Manual pages are a command-line technology for providing documentation. You can view these manual pages locally using the man(1) command. These manual pages come from many different sources, and thus, have a variety of writing styles.

This manual page is associated with the Mac OS X developer tools. The software or headers described may not be present on your Mac OS X installation until you install the developer tools package. This package is available on your Mac OS X installation DVD, and the latest versions can be downloaded from developer.apple.com.

For more information about the manual page format, see the manual page for manpages(5).



XCODEBUILD(1)             BSD General Commands Manual            XCODEBUILD(1)

NAME
     xcodebuild -- build Xcode projects

SYNOPSIS
     xcodebuild [-project projectname] [-activetarget] [-alltargets] [-target targetname]
                [-parallelizeTargets] [-activeconfiguration] [-configuration configurationname]
                [buildaction ...] [setting=value ...] [-default=value ...]
     xcodebuild -version
     xcodebuild -list
     xcodebuild -help

DESCRIPTION
     xcodebuild builds a target contained in an Xcode project.

   Usage
     Run xcodebuild from the directory containing your project (i.e. the directory containing the
     projectname.xcodeproj package). If you have multiple projects in the this directory you will need to
     use -project to indicate which project should be built.

     By default, xcodebuild builds the first target listed in your project, with the default build configu-ration. configuration.
     ration. The order of the targets is a property of the project and is the same for all users of the
     project. The active target and active build configuration properties are set for each user of the
     project and can vary from user to user.

   Options
     -project projectname
           Build the project specified by projectname.  Required if there are multiple project files in the
           same directory.

     -activetarget
           Builds the user's active target.

     -alltargets
           Build all the targets in the project.

     -target targetname
           Build the target specified by targetname.

     -nodependencies
           Only perform the action on the specified target(s), not on any targets upon which they depend.
           This option only applies to the 'clean' action.

     -parallelizeTargets
           Build independent targets in parallel when possible.  With distributed builds or multiprocessor
           machines, this can cause projects with many simple targets to build substantially faster.  This
           option only applies to targets with target dependencies.

     -activeconfiguration
           Use the user's active build configuration when building the target.

     -configuration configurationname
           Use the build configuration specified by configurationname when building the target.

     buildaction ...
           Specify a build action (or actions) to perform on the target. Available build actions are:

           build       Build the target in the build root (SYMROOT).  This is the default build action.

           installsrc  Copy the source of the project to the source root (SRCROOT).

           install     Build the target and install it into the target's installation directory in the dis-tribution distribution
                       tribution root (DSTROOT).

           clean       Remove build products and intermediate files from the build root (SYMROOT).

     setting=value
           Set the build setting setting to value.

     -default=value
           Set the user default default to value.

     -version
           Displays version information for xcodebuild.

     -list
           Lists the targets in the project. Does not initiate a build.

     -nodistribute
           Disable distributed building. Overrides the distributed build setting stored in the user defaults
           by the Xcode preferences panel.

     -bonjourbuildhosts
           Enable distributed building and search for build machines using Bonjour. Build machines are added
           dynamically during the build as they are discovered. May be used alone or in conjunction with
           -buildhosts or -buildhostsfile.

     -nobonjourbuildhosts
           Do not search for build machines using Bonjour. Overrides the Bonjour distributed build setting
           stored in the user defaults by the Xcode preferences panel.

     -buildhosts hostlist
           Enable distributed building and set the list of build machines to the space separated list given
           in hostlist.

     -buildhostsfile hostsfile
           Enable distributed building and set the list of build machines to the contents of hostsfile.
           hostsfile is a text file containing build machine names, one per line.

     -help
           Displays usage information for xcodebuild.

EXAMPLES
     xcodebuild clean install

             Cleans the build directory; then builds and installs the first target in the project.

     xcodebuild -target MyTarget OBJROOT=/Build/MyProj/Obj.root SYMROOT=/Build/MyProj/Sym.root

             Builds the target MyTarget putting object (intermediate) files in one directory and the prod-ucts products
             ucts of the build in another directory.

Mac OS X                        April 22, 2005                        Mac OS X

Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.