Build Settings Reference

This appendix lists some of the build settings you are likely to use in Java-based projects. See the Project Builder release notes for a complete treatment of Project Builder’s build settings.

Project Settings Reference

Table A-1 describes build settings that apply to a project as a whole; that is, they apply to all targets in a project.

Table A-1  Project build settings

Build setting

Description

PROJECT_NAME

Name of the project. This setting is read-only.

SYMROOT

Base location for built products. Configured initially as <project_directory>/build.

BUILD_DIR

Base location for the temporary files generated by a project’s targets. Default: <project_directory>/build. This setting is read-only.

TARET_BUILD_DIR

The location for products. Set initially to $BUILD_DIR in development builds and $INSTALL_DIR in deployment builds when the product is installed. When the product is not installed, the setting is configured to $BUILD_DIR/UninstalledProducts in development and deployment builds.

BUILT_PRODUCTS_DIR

The base location for all products. Configured initially as $BUILD_DIR.

Deployment Settings Reference

Table A-2 describes build setting that determine the location of an installed product and its permissions.

Table A-2  Deployment build settings

Build setting

Description

DSTROOT

Base location for the installed product. Default: /tmp/$PROJECT_NAME.dst/.

INSTALL_PATH

Location of the installed product. For example, /my_app_path. This setting is undefined by default.

INSTALL_DIR

Fully qualified path for the installed product. By default, it concatenates DSTROOT and INSTALL_PATH. This setting is read-only.

SKIP_INSTALL

Determines whether the target’s product gets installed. When undefined, which is the default, the target’s product gets installed.

DEPLOYMENT_LOCATION

When YES, the product gets installed in its deployment location ($INSTALL_DIR). Otherwise, the product gets installed in $BUILT_PRODUCTS_DIR. This setting is undefined by default.

INSTALL_OWNER

User who owns the generated product. As pbxbuild should be run by root, the owner should be root. This is applied after the product is deployed.

INSTALL_GROUP

Group who owns the generated product. Usually, staff. This is applied after the product is deployed.

INSTALL_MODE_FLAG

The mode that is applied to the product after it’s deployed. Default: ugo-w, o+rX.

Target Settings Reference

Table A-3 describes build settings that identify a target and determine the location of source files and of a directory for temporary files created as a product gets built.

Table A-3  Target build settings

Build setting

Description

TARGET_NAME

Name of the target. This setting is read-only.

PRODUCT_NAME

Name of the product the target builds. This setting is read-only.

ACTION

The action being performed on the target. Values: build or clean from Project Builder, install, installhdrs, and installsrc from pbxbuild. When its value is clean, the target’s build directory is deleted and no build phases are executed. This setting is read-only.

SRCROOT

The base location of project sources. It’s set to the contents of the PWD environment variable when PWD is defined or to the current directory otherwise.

OBJROOT

The base location for intermediate build files. Configured initially as $SRCROOT/build (MyProject/build).

TEMP_DIR

The location of a target’s intermediate files. Configured initially as $OBJROOT/$PROJECT_NAME.build/$TARGET_NAME.build.

Java Compiler Settings

Table A-4 describes build settings that determine the flags that are used in the invocation of the Java compiler as well as the location of generated Java class files.

Table A-4  Java compiler build settings

Build setting

Description

CLASS_FILE_DIR

The base location for Java class files. Configured as $TEMP_DIR/JavaClasses. This setting is read-only.

JAVA_COMPILER

The compiler used in Sources (compilation) build phases. Initially configured as /usr/bin/javac.

JAVA_COMPILER_DEBUGGING_SYMBOLS

Determines whether Java classes are compiled with debugging symbols. When NO, debugging symbols are not generated. When undefined or YES, debugging symbols are generated. Initially undefined.

JAVA_COMPILER_DISABLE_WARNINGS

Determines whether the compiler generates warnings. When YES, warnings are not produced. When undefined or NO, warnings are produced. Initially undefined.

JAVA_COMPILER_DEPRECATED_WARNINGS

Determines whether the compiler shows a description of the use of deprecated API (whether the -deprecation command-line option of javac and jikes is used).

JAVA_COMPILER_TARGET_VM_VERSION

Determines the target Java virtual machine for generated class files (javac and jikes-target command-line options).

JAVAC_SOURCE_FILE_ENCODING

Determines the value for the -encoding command-line option of javac and jikes. When undefined, MACINTOSH is used.

JAVA_COMPILER_FLAGS

Use to set compiler options not supported in build settings for javac and jikes. For example, you can set the -extdirs command-line option of javac to include paths to additional JAR files.

JAVAC_DEFAULT_FLAGS

Base javac command-line options to use for javac. When undefined, the options are configured as -J-Xms64m -J-XX:NewSize=4M -J-Dfile.encoding=UTF8. For more information, see Inside Mac OS X: Java Development on Mac OS X.

JIKES_DEFAULT_FLAGS

Base jikes command-line options to use for javac. When undefined, the options are configured as +E +OLDCSO.

JAVA_CLASS_SEARCH_PATHS

Space-separated list of paths of required JAR files. This list is added to the -classpath command-line option of the compiler invocation.

OTHER_JAVA_CLASS_PATH

Colon-separated list of additional paths of required JAR files. This list is added to the -classpath command-line option of the compiler invocation.

LINKED_CLASS_ARCHIVES

Space-separated list of required JAR files. Initially configured as the combination of $LINKED_CLASS_ARCHIVES and $OTHER_JAVA_CLASS_PATH. This setting is read-only.

Java Application Settings

Table A-5 describes build settings that determine whether Java class files are archived, how they are archived, and the name of the archive file, among other items.

Table A-5  Java application build settings

Build setting

Description

JAVA_ARCHIVE_CLASSES

Determines the disposition of Java class files generated by the target. This setting can have two values, YES or NO. When YES (the default), Java classes are archived in a JAR file, which is then copied to the product’s Contents/Resources/Java directory. When NO, the class files are copied to that directory. You should not change the value of this setting if you plan to distribute your application or tool.

JAVA_ARCHIVE_COMPRESSION

Determines whether the contents of the archive file are compressed. When YES the contents of the archive are compressed; otherwise, the contents are not compressed. Initially unconfigured.

CLASS_ARCHIVE_SUFFIX

Determines the extension used for the JAR file. Values: .jar, .war, or .ear.

JAVA_MANIFEST_FILE

Project-directory based path to the file used to supplement the default manifest file (MANIFEST.MF) of the JAR file.

JAVA_APP_STUB

Path to the Cocoa application stub that’s embedded in a bundle-based Java application to launch the Java application. Configured as /System/Library/Frameworks/JavaVM.framework/Resources/MacOS/JavaApplicationStub. This setting is read-only.

DEVELOPMENT_PLIST_FILE

Path to the development-settings property list file of the product. Initially configured as $SYMROOT/pbdevelopment.plist.