Makefile - variables

  • Revision slug: How_Mozilla's_build_system_works/Makefile_-_variables
  • Revision title: Makefile - variables
  • Revision id: 38375
  • Created:
  • Creator: Joey Armstrong
  • Is current revision? No
  • Comment 8 words added, 31 words removed

Revision Content

note: non-functional links can be fixed by inserting 'en/'

Variable name Description
ADD_TO_DEF_FILE  
CPP_SOURCES  
CPP_UNIT_TESTS A list of source files to compile as unit tests
CSRCS A list of C source files to compile.
EXPAND_MOZLIBNAME  
EXPORTS A list of exported header files and sources to install for external use.
EXPORTS_NAMESPACES Exported package include directory: dist/include/${namespace}
EXPORTS_${namespace} A list of exports/headers that should be copied into the exported namespace directory
EXTRA_COMPONENTS nsDefaultCLH.manifest
EXTRA_DSO_LIBS  
EXTRA_DSO_LDOPTS  
EXTRA_JS_MODULES  
EXTRA_PP_COMPONENTS nsDefaultCLJ.js
GARBAGE A "clean target" macro containing a list of files to remove.
GARBAGE_DIRS A "clean target" macro containing a list of directories to remove.
GLOBAL_DEPS A list of common dependencies (Makefile.in, autoconf.mk) that will force rebuilding.
LIBOBJS  
HAVE_DTRACE Sun Microsystem's dynamic tracing environment is available.
LOCAL_INCLUDES Allow use of MOZ_OBJDIR in .mozconfig with older gcc on BeOS
MODULE    
MODULE_NAME    
NO_DIST_INSTALL Inhibit generating and copying exports/install targets into $(MOZ_OBJDIR)/dist/install
NS_PRINTING  
OBJS  
OBJ_SUFFIX Filename suffix to use when writing object files
MODULE Instructs the build system where to install exported headers
SIMPLE_PROGRAMS  
SUPPRESS_DEFAULT_RULES Inhibit processing of makefile TIER targets / directory processing will be unordered.
TIER  Build order dependencies - subdirectories for make to traverse prior to building current.
XPIDL_MODULE Module name to use when generating .xpt files, default to MODULE
XPIDLSRCS INTERNAL: A list of .idl files to generate exported headers from
configure.sh Variables    Description Description
BUILD_PROJECT_ARG    command line / environment override command line /environment override
CONFIGURE_ENV_ARGS    command line / environment override command line / environment override
Directory Variable  
DIRS A list of subdirectories to build recursively
PARALLEL_DIRS A list of subdirectories to build recursively that may be built concurrently
STATIC_DIRS Subdirectories containing static makefiles that are not autogenerated
TOOL_DIRS A list of directories to process makefile 'tool' targets in
MOZ_ Variable Description
MOZ_AUTO_DEPS  
MOZ_BUILD_APP  
MOZ_BUILD_PROJECTS Build multiple projects in the same sandbox.  Dest=$(MOZ_OBJDIR)/$project
MOZ_CURRENT_PROJECT  
MOZ_DEBUG  
MOZ_ENABLE_XREMOTE  
MOZ_FEEDS  
MOZ_HELP_VIEWER  
MOZ_NATIVE_NSPR  
MOZ_PKG_MAINFEST  
MOZ_PREFLIGHT_ALL  
MOZ_RDF  
MOZ_TOOLKIT_SEARCH  
MOZ_URL_CLASSIFIER  
MOZ_WIDGET_TOOLKIT  android, beos cocoa, gtk2, os2, qt, windows,
MOZ_XPCTOOLS  
MOZ_XUL  
MOZ_X11  

Test Variable

Description
ENABLE_TESTS Boolean value that should wrapper all unit tests to allow disabling on demand [1]
XPC_SHELL_TESTS  
Compiler Variable Description
GNU_CC Defined if the gcc compiler is available
MODULE_OPTIMIZE_FLAGS Additional flags for enabling or overriding compiler optimizations (-O2)
SOLARIS_SUNPRO_CC Sun Studio compiler

[table-spacer]

Export Variables Description
AUTOCFG_JS_EXPORTS  
EXPORTS A list of exported headers and source files for external use
HAS_EXTRA_EXPORTS  
PREF_JS_EXPORTS  JavaScript preferences file to export. [1]
SDK_HEADERS  
NO_ Variable Description
NO_PROFILE_GUIDED_OPTIMIZE Inhibit PGO builds
NO_DIST_INSTALL  

 * Values will be appended to the EXPORT variable when present.

OS_ Variable Description
OS_ARCH Platform type
OS_TARGET Target binary type if building on an intermediate platform (building mobile binaries on Linux)
HOST_ Variable Description
HOST_CMSRCS A list of .m sources to compile
HOST_CMMSRCS A list of .mm sources to compile
HOST_OBJS  
HOST_OS_ARCH ARCH of real platform a target platform is being built on (building mobile binaries on Linux)

 Release Targets

Variable Description
DIST  Top level distribution directory for install/packaging/repacking
DIST_FILES A list of files copied into the distribution archive (~application.ini)
DIST_CHROME_FILES Exists in rules.mk but not referenced by mozilla-central.  Deprecated?

 l10n.mk / localization

Variable Description
EN_US_BINARY_URL Server URL from which wget will FTP binaries.
L10NBASEDIR  
PACKAGER_NO_LIBS  Hack to allow one makefile to include another without pulling in libs:: target definitions.
STAGEDIST Local staging directory for localization and packaging.

Revision Source

<p>note: non-functional links can be fixed by inserting 'en/'</p>
<table class="standard-table" style="width: 1219px; height: 332px;"> <thead> <tr> <th>Variable name</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>ADD_TO_DEF_FILE</code></td> <td> </td> </tr> <tr> <td><code>CPP_SOURCES</code></td> <td> </td> </tr> <tr> <td><code>CPP_UNIT_TESTS</code></td> <td>A list of source files to compile as unit tests</td> </tr> <tr> <td><code>CSRCS</code></td> <td>A list of C source files to compile.</td> </tr> <tr> <td><code>EXPAND_MOZLIBNAME</code></td> <td> </td> </tr> <tr> <td><code>EXPORTS</code></td> <td>A list of exported header files and sources to install for external use.</td> </tr> <tr> <td><code>EXPORTS_NAMESPACES</code></td> <td>Exported package include directory: dist/include/${namespace}</td> </tr> <tr> <td><code>EXPORTS_${namespace}</code></td> <td>A list of exports/headers that should be copied into the exported namespace directory</td> </tr> <tr> <td><code>EXTRA_COMPONENTS</code></td> <td>nsDefaultCLH.manifest</td> </tr> <tr> <td><code>EXTRA_DSO_LIBS</code></td> <td> </td> </tr> <tr> <td><code>EXTRA_DSO_LDOPTS</code></td> <td> </td> </tr> <tr> <td><code>EXTRA_JS_MODULES</code></td> <td> </td> </tr> <tr> <td><code>EXTRA_PP_COMPONENTS</code></td> <td>nsDefaultCLJ.js</td> </tr> <tr> <td><code>GARBAGE</code></td> <td>A "clean target" macro containing a list of files to remove.</td> </tr> <tr> <td><code>GARBAGE_DIRS</code></td> <td>A "clean target" macro containing a list of directories to remove.</td> </tr> <tr> <td><a href="/en/GLOBAL_DEPS" title="en/GLOBAL DEPS"><code>GLOBAL_DEPS</code></a></td> <td>A list of common dependencies (Makefile.in, autoconf.mk) that will force rebuilding.</td> </tr> <tr> <td><code>LIBOBJS</code></td> <td> </td> </tr> <tr> <td><code>HAVE_DTRACE</code></td> <td>Sun Microsystem's dynamic tracing environment is available.</td> </tr> <tr> <td><code>LOCAL_INCLUDES</code></td> <td>Allow use of MOZ_OBJDIR in .mozconfig with older gcc on BeOS</td> </tr> <tr> <td><code>MODULE</code></td> <td> </td> <td> </td> </tr> <tr> <td><code>MODULE_NAME</code></td> <td> </td> <td> </td> </tr> <tr> <td><code>NO_DIST_INSTALL</code></td> <td>Inhibit generating and copying exports/install targets into $(MOZ_OBJDIR)/dist/install</td> </tr> <tr> <td><code>NS_PRINTING</code></td> <td> </td> </tr> <tr> <td><code>OBJS</code></td> <td> </td> </tr> <tr> <td><code>OBJ_SUFFIX</code></td> <td>Filename suffix to use when writing object files</td> </tr> <tr> <td><code><a href="/en/MODULE" title="En/MODULE">MODULE</a></code></td> <td>Instructs the build system where to install exported headers</td> </tr> <tr> <td><code>SIMPLE_PROGRAMS</code></td> <td> </td> </tr> <tr> <td><code>SUPPRESS_DEFAULT_RULES</code></td> <td>Inhibit processing of makefile TIER targets / directory processing will be unordered.</td> </tr> <tr> <td><code><a href="/En/TIER" title="En/TIER">TIER</a></code></td> <td> Build order dependencies - subdirectories for make to traverse prior to building current.</td> </tr> <tr> <td><code>XPIDL_MODULE</code></td> <td>Module name to use when generating .xpt files, default to MODULE</td> </tr> <tr> <td><code>XPIDLSRCS</code></td> <td>INTERNAL: A list of .idl files to generate exported headers from</td> </tr> </tbody>
</table>
<table border="1" cellpadding="1" cellspacing="1" class="standard-table"> <thead> <tr> <th scope="col">configure.sh Variables    Description</th> <th scope="col">Description</th> </tr> </thead> <tbody> <tr> <td><code>BUILD_PROJECT_ARG</code>    command line / environment override</td> <td>command line /environment override</td> </tr> <tr> <td><code>CONFIGURE_ENV_ARGS</code>    command line / environment override</td> <td>command line / environment override</td> </tr> </tbody>
</table>
<table border="1" cellpadding="1" cellspacing="1" class="standard-table"> <thead> <tr> <th scope="col">Directory Variable</th> <th scope="col"> </th> </tr> </thead> <tbody> <tr> <td><code><a href="/en/DIRS" title="en/DIRS">DIRS</a></code></td> <td>A list of subdirectories to build recursively</td> </tr> <tr> <td><code><a href="/En/PARALLEL_DIRS" title="En/PARALLEL DIRS">PARALLEL_DIRS</a></code></td> <td>A list of subdirectories to build recursively that may be built concurrently</td> </tr> <tr> <td><code><a href="/en/STATIC_DIRS" title="en/STATIC DIRS">STATIC_DIRS</a></code></td> <td>Subdirectories containing static makefiles that are not autogenerated</td> </tr> <tr> <td><code>TOOL_DIRS</code></td> <td>A list of directories to process makefile 'tool' targets in</td> </tr> </tbody>
</table>
<table border="1" cellpadding="1" cellspacing="1" class="standard-table"> <thead> <tr> <th scope="col">MOZ_ Variable</th> <th scope="col">Description</th> </tr> </thead> <tbody> <tr> <td><code>MOZ_AUTO_DEPS</code></td> <td> </td> </tr> <tr> <td><code>MOZ_BUILD_APP</code></td> <td> </td> </tr> <tr> <td><code><a href="/en/Configuring_Build_Options" title="en/Configuring Build Options">MOZ_BUILD_PROJECTS</a></code></td> <td>Build multiple projects in the same sandbox.  <code>Dest=$(MOZ_OBJDIR)/$project</code></td> </tr> <tr> <td><code>MOZ_CURRENT_PROJECT</code></td> <td> </td> </tr> <tr> <td><code>MOZ_DEBUG</code></td> <td> </td> </tr> <tr> <td><code>MOZ_ENABLE_XREMOTE</code></td> <td> </td> </tr> <tr> <td><code>MOZ_FEEDS</code></td> <td> </td> </tr> <tr> <td><code>MOZ_HELP_VIEWER</code></td> <td> </td> </tr> <tr> <td><code>MOZ_NATIVE_NSPR</code></td> <td> </td> </tr> <tr> <td><code>MOZ_PKG_MAINFEST</code></td> <td> </td> </tr> <tr> <td><code>MOZ_PREFLIGHT_ALL</code></td> <td> </td> </tr> <tr> <td><code>MOZ_RDF</code></td> <td> </td> </tr> <tr> <td><code>MOZ_TOOLKIT_SEARCH</code></td> <td> </td> </tr> <tr> <td><code>MOZ_URL_CLASSIFIER</code></td> <td> </td> </tr> <tr> <td><code>MOZ_WIDGET_TOOLKIT</code></td> <td> android, beos cocoa, gtk2, os2, qt, windows,</td> </tr> <tr> <td><code>MOZ_XPCTOOLS</code></td> <td> </td> </tr> <tr> <td><code>MOZ_XUL</code></td> <td> </td> </tr> <tr> <td><code>MOZ_X11</code></td> <td> </td> </tr> </tbody>
</table>
<table border="1" cellpadding="1" cellspacing="1" class="standard-table" style="width: 747px; height: 41px;"> <thead> <tr> <th scope="col"> <p>Test Variable</p> </th> <th scope="col">Description</th> </tr> </thead> <tbody> <tr> <td><code>ENABLE_TESTS</code></td> <td>Boolean value that should wrapper all unit tests to allow disabling on demand [<a href="/en/How_to_add_a_build-time_test" title="en/How to add a build-time test">1</a>]</td> </tr> <tr> <td><code>XPC_SHELL_TESTS</code></td> <td> </td> </tr> </tbody>
</table>
<table border="1" cellpadding="1" cellspacing="1" class="standard-table"> <thead> <tr> <th scope="col">Compiler Variable</th> <th scope="col">Description</th> </tr> </thead> <tbody> <tr> <td><code>GNU_CC</code></td> <td>Defined if the gcc compiler is available</td> </tr> <tr> <td><code>MODULE_OPTIMIZE_FLAGS</code></td> <td>Additional flags for enabling or overriding compiler optimizations (-O2)</td> </tr> <tr> <td><code>SOLARIS_SUNPRO_CC</code></td> <td>Sun Studio compiler</td> </tr> </tbody>
</table>
<p>[table-spacer]</p>
<table border="1" cellpadding="1" cellspacing="1" class="standard-table"> <thead> <tr> <th scope="col">Export Variables</th> <th scope="col">Description</th> </tr> </thead> <tbody> <tr> <td><code>AUTOCFG_JS_EXPORTS</code></td> <td> </td> </tr> <tr> <td><code><a href="/en/Installing_headers_using_EXPORTS" title="en/Installing headers using EXPORTS">EXPORTS</a></code></td> <td>A list of exported headers and source files for external use</td> </tr> <tr> <td><code>HAS_EXTRA_EXPORTS</code></td> <td> </td> </tr> <tr> <td><code>PREF_JS_EXPORTS</code></td> <td> JavaScript preferences file to export. [<a href="/User:xFallenAngel/Build_System" title="User:xFallenAngel/Build System">1</a>]</td> </tr> <tr> <td><code>SDK_HEADERS</code></td> <td> </td> </tr> </tbody>
</table>
<table border="1" cellpadding="1" cellspacing="1" class="standard-table"> <thead> <tr> <th scope="col">NO_ Variable</th> <th scope="col">Description</th> </tr> </thead> <tbody> <tr> <td><code>NO_PROFILE_GUIDED_OPTIMIZE</code></td> <td>Inhibit PGO builds</td> </tr> <tr> <td><code>NO_DIST_INSTALL</code></td> <td> </td> </tr> </tbody>
</table>
<p> * Values will be appended to the EXPORT variable when present.</p>
<table border="1" cellpadding="1" cellspacing="1" class="standard-table"> <thead> <tr> <th scope="col">OS_ Variable</th> <th scope="col">Description</th> </tr> </thead> <tbody> <tr> <td><code>OS_ARCH</code></td> <td>Platform type</td> </tr> <tr> <td><code>OS_TARGET</code></td> <td>Target binary type if building on an intermediate platform (building mobile binaries on Linux)</td> </tr> </tbody>
</table>
<table border="1" cellpadding="1" cellspacing="1" class="standard-table"> <thead> <tr> <th scope="col">HOST_ Variable</th> <th scope="col">Description</th> </tr> </thead> <tbody> <tr> <td><code>HOST_CMSRCS</code></td> <td>A list of .m sources to compile</td> </tr> <tr> <td><code>HOST_CMMSRCS</code></td> <td>A list of .mm sources to compile</td> </tr> <tr> <td><code>HOST_OBJS</code></td> <td> </td> </tr> <tr> <td><code>HOST_OS_ARCH</code></td> <td><code>ARCH</code> of real platform a target platform is being built on (building mobile binaries on Linux)</td> </tr> </tbody>
</table>
<p> Release Targets</p>
<table border="1" cellpadding="1" cellspacing="1" class="standard-table"> <thead> <tr> <th scope="col">Variable</th> <th scope="col">Description</th> </tr> </thead> <tbody> <tr> <td><code>DIST</code></td> <td> Top level distribution directory for install/packaging/repacking</td> </tr> <tr> <td><code>DIST_FILES</code></td> <td>A list of files copied into the distribution archive (~application.ini)</td> </tr> <tr> <td><code>DIST_CHROME_FILES</code></td> <td>Exists in <code>rules.mk</code> but not referenced by mozilla-central.  Deprecated?</td> </tr> </tbody>
</table>
<p> l10n.mk / localization</p>
<table border="1" cellpadding="1" cellspacing="1" class="standard-table" style="width: 860px; height: 72px;"> <thead> <tr> <th scope="col">Variable</th> <th scope="col">Description</th> </tr> </thead> <tbody> <tr> <td><code>EN_US_BINARY_URL</code></td> <td>Server URL from which <code>wget</code> will FTP binaries.</td> </tr> <tr> <td><code>L10NBASEDIR</code></td> <td> </td> </tr> <tr> <td><code>PACKAGER_NO_LIBS</code></td> <td> Hack to allow one <code>makefile</code> to include another without pulling in libs:: target definitions.</td> </tr> <tr> <td><code>STAGEDIST</code></td> <td>Local staging directory for localization and packaging.</td> </tr> </tbody>
</table>
Revert to this revision