<labelid="sidebar-toggle"class="icon-button"for="sidebar-toggle-anchor"title="Toggle Table of Contents"aria-label="Toggle Table of Contents"aria-controls="sidebar">
<inputtype="search"id="searchbar"name="searchbar"placeholder="Search this book ..."aria-controls="searchresults-outer"aria-describedby="searchresults-header">
<p>Rule for building external libraries with configure-make pattern. Some 'configure' script is invoked with --prefix=install (by default), and other parameters for compilation and linking, taken from Bazel C/C++ toolchain and passed dependencies. After configuration, GNU Make is called.</p>
<tr><tdstyle="text-align: left"><aid="configure_make-name"></a>name</td><tdstyle="text-align: left">A unique name for this target.</td><tdstyle="text-align: left"><ahref="https://bazel.build/concepts/labels#target-names">Name</a></td><tdstyle="text-align: left">required</td><tdstyle="text-align: left"></td></tr>
<tr><tdstyle="text-align: left"><aid="configure_make-additional_inputs"></a>additional_inputs</td><tdstyle="text-align: left"><strong>deprecated</strong>: Please use the <code>build_data</code> attribute.</td><tdstyle="text-align: left"><ahref="https://bazel.build/concepts/labels">List of labels</a></td><tdstyle="text-align: left">optional</td><tdstyle="text-align: left"><code>[]</code></td></tr>
<tr><tdstyle="text-align: left"><aid="configure_make-additional_tools"></a>additional_tools</td><tdstyle="text-align: left"><strong>deprecated</strong>: Please use the <code>build_data</code> attribute.</td><tdstyle="text-align: left"><ahref="https://bazel.build/concepts/labels">List of labels</a></td><tdstyle="text-align: left">optional</td><tdstyle="text-align: left"><code>[]</code></td></tr>
<tr><tdstyle="text-align: left"><aid="configure_make-alwayslink"></a>alwayslink</td><tdstyle="text-align: left">Optional. if true, link all the object files from the static library, even if they are not used.</td><tdstyle="text-align: left">Boolean</td><tdstyle="text-align: left">optional</td><tdstyle="text-align: left"><code>False</code></td></tr>
<tr><tdstyle="text-align: left"><aid="configure_make-args"></a>args</td><tdstyle="text-align: left">A list of arguments to pass to the call to <code>make</code></td><tdstyle="text-align: left">List of strings</td><tdstyle="text-align: left">optional</td><tdstyle="text-align: left"><code>[]</code></td></tr>
<tr><tdstyle="text-align: left"><aid="configure_make-autoconf"></a>autoconf</td><tdstyle="text-align: left">Set to True if 'autoconf' should be invoked before 'configure', currently requires <code>configure_in_place</code> to be True.</td><tdstyle="text-align: left">Boolean</td><tdstyle="text-align: left">optional</td><tdstyle="text-align: left"><code>False</code></td></tr>
<tr><tdstyle="text-align: left"><aid="configure_make-autoconf_options"></a>autoconf_options</td><tdstyle="text-align: left">Any options to be put in the 'autoconf.sh' command line.</td><tdstyle="text-align: left">List of strings</td><tdstyle="text-align: left">optional</td><tdstyle="text-align: left"><code>[]</code></td></tr>
<tr><tdstyle="text-align: left"><aid="configure_make-autogen"></a>autogen</td><tdstyle="text-align: left">Set to True if 'autogen.sh' should be invoked before 'configure', currently requires <code>configure_in_place</code> to be True.</td><tdstyle="text-align: left">Boolean</td><tdstyle="text-align: left">optional</td><tdstyle="text-align: left"><code>False</code></td></tr>
<tr><tdstyle="text-align: left"><aid="configure_make-autogen_command"></a>autogen_command</td><tdstyle="text-align: left">The name of the autogen script file, default: autogen.sh. Many projects use autogen.sh however the Autotools FAQ recommends bootstrap so we provide this option to support that.</td><tdstyle="text-align: left">String</td><tdstyle="text-align: left">optional</td><tdstyle="text-align: left"><code>"autogen.sh"</code></td></tr>
<tr><tdstyle="text-align: left"><aid="configure_make-autogen_options"></a>autogen_options</td><tdstyle="text-align: left">Any options to be put in the 'autogen.sh' command line.</td><tdstyle="text-align: left">List of strings</td><tdstyle="text-align: left">optional</td><tdstyle="text-align: left"><code>[]</code></td></tr>
<tr><tdstyle="text-align: left"><aid="configure_make-autoreconf"></a>autoreconf</td><tdstyle="text-align: left">Set to True if 'autoreconf' should be invoked before 'configure.', currently requires <code>configure_in_place</code> to be True.</td><tdstyle="text-align: left">Boolean</td><tdstyle="text-align: left">optional</td><tdstyle="text-align: left"><code>False</code></td></tr>
<tr><tdstyle="text-align: left"><aid="configure_make-autoreconf_options"></a>autoreconf_options</td><tdstyle="text-align: left">Any options to be put in the 'autoreconf.sh' command line.</td><tdstyle="text-align: left">List of strings</td><tdstyle="text-align: left">optional</td><tdstyle="text-align: left"><code>[]</code></td></tr>
<tr><tdstyle="text-align: left"><aid="configure_make-build_data"></a>build_data</td><tdstyle="text-align: left">Files needed by this rule only during build/compile time. May list file or rule targets. Generally allows any target.</td><tdstyle="text-align: left"><ahref="https://bazel.build/concepts/labels">List of labels</a></td><tdstyle="text-align: left">optional</td><tdstyle="text-align: left"><code>[]</code></td></tr>
<tr><tdstyle="text-align: left"><aid="configure_make-configure_command"></a>configure_command</td><tdstyle="text-align: left">The name of the configuration script file, default: configure. The file must be in the root of the source directory.</td><tdstyle="text-align: left">String</td><tdstyle="text-align: left">optional</td><tdstyle="text-align: left"><code>"configure"</code></td></tr>
<tr><tdstyle="text-align: left"><aid="configure_make-configure_in_place"></a>configure_in_place</td><tdstyle="text-align: left">Set to True if 'configure' should be invoked in place, i.e. from its enclosing directory.</td><tdstyle="text-align: left">Boolean</td><tdstyle="text-align: left">optional</td><tdstyle="text-align: left"><code>False</code></td></tr>
<tr><tdstyle="text-align: left"><aid="configure_make-configure_options"></a>configure_options</td><tdstyle="text-align: left">Any options to be put on the 'configure' command line.</td><tdstyle="text-align: left">List of strings</td><tdstyle="text-align: left">optional</td><tdstyle="text-align: left"><code>[]</code></td></tr>
<tr><tdstyle="text-align: left"><aid="configure_make-configure_prefix"></a>configure_prefix</td><tdstyle="text-align: left">A prefix for the call to the <code>configure_command</code>.</td><tdstyle="text-align: left">String</td><tdstyle="text-align: left">optional</td><tdstyle="text-align: left"><code>""</code></td></tr>
<tr><tdstyle="text-align: left"><aid="configure_make-copts"></a>copts</td><tdstyle="text-align: left">Optional. Add these options to the compile flags passed to the foreign build system. The flags only take affect for compiling this target, not its dependencies.</td><tdstyle="text-align: left">List of strings</td><tdstyle="text-align: left">optional</td><tdstyle="text-align: left"><code>[]</code></td></tr>
<tr><tdstyle="text-align: left"><aid="configure_make-data"></a>data</td><tdstyle="text-align: left">Files needed by this rule at runtime. May list file or rule targets. Generally allows any target.</td><tdstyle="text-align: left"><ahref="https://bazel.build/concepts/labels">List of labels</a></td><tdstyle="text-align: left">optional</td><tdstyle="text-align: left"><code>[]</code></td></tr>
<tr><tdstyle="text-align: left"><aid="configure_make-defines"></a>defines</td><tdstyle="text-align: left">Optional compilation definitions to be passed to the dependencies of this library. They are NOT passed to the compiler, you should duplicate them in the configuration options.</td><tdstyle="text-align: left">List of strings</td><tdstyle="text-align: left">optional</td><tdstyle="text-align: left"><code>[]</code></td></tr>
<tr><tdstyle="text-align: left"><aid="configure_make-deps"></a>deps</td><tdstyle="text-align: left">Optional dependencies to be copied into the directory structure. Typically those directly required for the external building of the library/binaries. (i.e. those that the external build system will be looking for and paths to which are provided by the calling rule)</td><tdstyle="text-align: left"><ahref="https://bazel.build/concepts/labels">List of labels</a></td><tdstyle="text-align: left">optional</td><tdstyle="text-align: left"><code>[]</code></td></tr>
<tr><tdstyle="text-align: left"><aid="configure_make-env"></a>env</td><tdstyle="text-align: left">Environment variables to set during the build. <code>$(execpath)</code> macros may be used to point at files which are listed as <code>data</code>, <code>deps</code>, or <code>build_data</code>, but unlike with other rules, these will be replaced with absolute paths to those files, because the build does not run in the exec root. This attribute is subject to make variable substitution. No other macros are supported.Variables containing <code>PATH</code> (e.g. <code>PATH</code>, <code>LD_LIBRARY_PATH</code>, <code>CPATH</code>) entries will be prepended to the existing variable.</td><tdstyle="text-align: left"><ahref="https://bazel.build/rules/lib/dict">Dictionary: String -> String</a></td><tdstyle="text-align: left">optional</td><tdstyle="text-align: left"><code>{}</code></td></tr>
<tr><tdstyle="text-align: left"><aid="configure_make-includes"></a>includes</td><tdstyle="text-align: left">Optional list of include dirs to be passed to the dependencies of this library. They are NOT passed to the compiler, you should duplicate them in the configuration options.</td><tdstyle="text-align: left">List of strings</td><tdstyle="text-align: left">optional</td><tdstyle="text-align: left"><code>[]</code></td></tr>
<tr><tdstyle="text-align: left"><aid="configure_make-install_prefix"></a>install_prefix</td><tdstyle="text-align: left">Install prefix, i.e. relative path to where to install the result of the build. Passed to the 'configure' script with --prefix flag.</td><tdstyle="text-align: left">String</td><tdstyle="text-align: left">optional</td><tdstyle="text-align: left"><code>""</code></td></tr>
<tr><tdstyle="text-align: left"><aid="configure_make-lib_name"></a>lib_name</td><tdstyle="text-align: left">Library name. Defines the name of the install directory and the name of the static library, if no output files parameters are defined (any of static_libraries, shared_libraries, interface_libraries, binaries_names) Optional. If not defined, defaults to the target's name.</td><tdstyle="text-align: left">String</td><tdstyle="text-align: left">optional</td><tdstyle="text-align: left"><code>""</code></td></tr>
<tr><tdstyle="text-align: left"><aid="configure_make-lib_source"></a>lib_source</td><tdstyle="text-align: left">Label with source code to build. Typically a filegroup for the source of remote repository. Mandatory.</td><tdstyle="text-align: left"><ahref="https://bazel.build/concepts/labels">Label</a></td><tdstyle="text-align: left">required</td><tdstyle="text-align: left"></td></tr>
<tr><tdstyle="text-align: left"><aid="configure_make-linkopts"></a>linkopts</td><tdstyle="text-align: left">Optional link options to be passed up to the dependencies of this library</td><tdstyle="text-align: left">List of strings</td><tdstyle="text-align: left">optional</td><tdstyle="text-align: left"><code>[]</code></td></tr>
<tr><tdstyle="text-align: left"><aid="configure_make-out_bin_dir"></a>out_bin_dir</td><tdstyle="text-align: left">Optional name of the output subdirectory with the binary files, defaults to 'bin'.</td><tdstyle="text-align: left">String</td><tdstyle="text-align: left">optional</td><tdstyle="text-align: left"><code>"bin"</code></td></tr>
<tr><tdstyle="text-align: left"><aid="configure_make-out_binaries"></a>out_binaries</td><tdstyle="text-align: left">Optional names of the resulting binaries.</td><tdstyle="text-align: left">List of strings</td><tdstyle="text-align: left">optional</td><tdstyle="text-align: left"><code>[]</code></td></tr>
<tr><tdstyle="text-align: left"><aid="configure_make-out_data_dirs"></a>out_data_dirs</td><tdstyle="text-align: left">Optional names of additional directories created by the build that should be declared as bazel action outputs</td><tdstyle="text-align: left">List of strings</td><tdstyle="text-align: left">optional</td><tdstyle="text-align: left"><code>[]</code></td></tr>
<tr><tdstyle="text-align: left"><aid="configure_make-out_headers_only"></a>out_headers_only</td><tdstyle="text-align: left">Flag variable to indicate that the library produces only headers</td><tdstyle="text-align: left">Boolean</td><tdstyle="text-align: left">optional</td><tdstyle="text-align: left"><code>False</code></td></tr>
<tr><tdstyle="text-align: left"><aid="configure_make-out_include_dir"></a>out_include_dir</td><tdstyle="text-align: left">Optional name of the output subdirectory with the header files, defaults to 'include'.</td><tdstyle="text-align: left">String</td><tdstyle="text-align: left">optional</td><tdstyle="text-align: left"><code>"include"</code></td></tr>
<tr><tdstyle="text-align: left"><aid="configure_make-out_interface_libs"></a>out_interface_libs</td><tdstyle="text-align: left">Optional names of the resulting interface libraries.</td><tdstyle="text-align: left">List of strings</td><tdstyle="text-align: left">optional</td><tdstyle="text-align: left"><code>[]</code></td></tr>
<tr><tdstyle="text-align: left"><aid="configure_make-out_lib_dir"></a>out_lib_dir</td><tdstyle="text-align: left">Optional name of the output subdirectory with the library files, defaults to 'lib'.</td><tdstyle="text-align: left">String</td><tdstyle="text-align: left">optional</td><tdstyle="text-align: left"><code>"lib"</code></td></tr>
<tr><tdstyle="text-align: left"><aid="configure_make-out_shared_libs"></a>out_shared_libs</td><tdstyle="text-align: left">Optional names of the resulting shared libraries.</td><tdstyle="text-align: left">List of strings</td><tdstyle="text-align: left">optional</td><tdstyle="text-align: left"><code>[]</code></td></tr>
<tr><tdstyle="text-align: left"><aid="configure_make-out_static_libs"></a>out_static_libs</td><tdstyle="text-align: left">Optional names of the resulting static libraries. Note that if <code>out_headers_only</code>, <code>out_static_libs</code>, <code>out_shared_libs</code>, and <code>out_binaries</code> are not set, default <code>lib_name.a</code>/<code>lib_name.lib</code> static library is assumed</td><tdstyle="text-align: left">List of strings</td><tdstyle="text-align: left">optional</td><tdstyle="text-align: left"><code>[]</code></td></tr>
<tr><tdstyle="text-align: left"><aid="configure_make-postfix_script"></a>postfix_script</td><tdstyle="text-align: left">Optional part of the shell script to be added after the make commands</td><tdstyle="text-align: left">String</td><tdstyle="text-align: left">optional</td><tdstyle="text-align: left"><code>""</code></td></tr>
<tr><tdstyle="text-align: left"><aid="configure_make-targets"></a>targets</td><tdstyle="text-align: left">A list of targets within the foreign build system to produce. An empty string (<code>""</code>) will result in a call to the underlying build system with no explicit target set</td><tdstyle="text-align: left">List of strings</td><tdstyle="text-align: left">optional</td><tdstyle="text-align: left"><code>["", "install"]</code></td></tr>
<tr><tdstyle="text-align: left"><aid="configure_make-tool_prefix"></a>tool_prefix</td><tdstyle="text-align: left">A prefix for build commands</td><tdstyle="text-align: left">String</td><tdstyle="text-align: left">optional</td><tdstyle="text-align: left"><code>""</code></td></tr>
<tr><tdstyle="text-align: left"><aid="configure_make-tools_deps"></a>tools_deps</td><tdstyle="text-align: left"><strong>deprecated</strong>: Please use the <code>build_data</code> attribute.</td><tdstyle="text-align: left"><ahref="https://bazel.build/concepts/labels">List of labels</a></td><tdstyle="text-align: left">optional</td><tdstyle="text-align: left"><code>[]</code></td></tr>
<tr><tdstyle="text-align: left"><aid="configure_make_variant-toolchain"></a>toolchain</td><tdstyle="text-align: left">The desired make variant toolchain to use, e.g. @rules_foreign_cc//toolchains:preinstalled_nmake_toolchain</td><tdstyle="text-align: left">none</td></tr>