[][src]Struct autotools::Config

pub struct Config { /* fields omitted */ }

Builder style configuration for a pending autotools build.

Methods

impl Config[src]

pub fn new<P: AsRef<Path>>(path: P) -> Config[src]

Creates a new blank set of configuration to build the project specified at the path path.

pub fn enable_shared(&mut self) -> &mut Config[src]

Enables building as a shared library (--enable-shared).

pub fn disable_shared(&mut self) -> &mut Config[src]

Disables building as a shared library (--disable-shared).

pub fn enable_static(&mut self) -> &mut Config[src]

Enables building as a static library (--enable-static).

pub fn disable_static(&mut self) -> &mut Config[src]

Disables building as a static library (--disable-static).

pub fn make_args(&mut self, flags: Vec<String>) -> &mut Config[src]

Additional arguments to pass through to make.

pub fn enable<P: AsRef<OsStr>>(
    &mut self,
    opt: P,
    optarg: Option<P>
) -> &mut Config
[src]

Passes --enable-<opt><=optarg> to configure.

pub fn disable<P: AsRef<OsStr>>(
    &mut self,
    opt: P,
    optarg: Option<P>
) -> &mut Config
[src]

Passes --disable-<opt><=optarg> to configure.

pub fn with<P: AsRef<OsStr>>(
    &mut self,
    opt: P,
    optarg: Option<P>
) -> &mut Config
[src]

Passes --with-<opt><=optarg> to configure.

pub fn without<P: AsRef<OsStr>>(
    &mut self,
    opt: P,
    optarg: Option<P>
) -> &mut Config
[src]

Passes --without-<opt><=optarg> to configure.

pub fn cflag<P: AsRef<OsStr>>(&mut self, flag: P) -> &mut Config[src]

Adds a custom flag to pass down to the C compiler, supplementing those that this library already passes.

pub fn cxxflag<P: AsRef<OsStr>>(&mut self, flag: P) -> &mut Config[src]

Adds a custom flag to pass down to the C++ compiler, supplementing those that this library already passes.

pub fn ldflag<P: AsRef<OsStr>>(&mut self, flag: P) -> &mut Config[src]

Adds a custom flag to pass down to the linker, supplementing those that this library already passes.

pub fn target(&mut self, target: &str) -> &mut Config[src]

Sets the target triple for this compilation.

This is automatically scraped from $TARGET which is set for Cargo build scripts so it's not necessary to call this from a build script.

pub fn host(&mut self, host: &str) -> &mut Config[src]

Sets the host triple for this compilation.

This is automatically scraped from $HOST which is set for Cargo build scripts so it's not necessary to call this from a build script.

pub fn out_dir<P: AsRef<Path>>(&mut self, out: P) -> &mut Config[src]

Sets the output directory for this compilation.

This is automatically scraped from $OUT_DIR which is set for Cargo build scripts so it's not necessary to call this from a build script.

pub fn env<K, V>(&mut self, key: K, value: V) -> &mut Config where
    K: AsRef<OsStr>,
    V: AsRef<OsStr>, 
[src]

Configure an environment variable for the configure && make processes spawned by this crate in the build step.

pub fn reconf<P: AsRef<OsStr>>(&mut self, flags: P) -> &mut Config[src]

Options to pass through to autoreconf prior to configuring the build.

pub fn make_target(&mut self, make_target: &str) -> &mut Config[src]

Build the given make target.

If this function is not called, the build will default to make install.

pub fn insource(&mut self, build_insource: bool) -> &mut Config[src]

Build the library in-source.

This is generally not recommended, but can be required for libraries that make extensive use of nested Makefiles, which cannot be included in out-of-source builds.

pub fn build(&mut self) -> PathBuf[src]

Run this configuration, compiling the library with all the configured options.

This will run both the build system generator command as well as the command to build the library.

Auto Trait Implementations

impl Send for Config

impl Sync for Config

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.