enableFeatureAs
lib.strings.enableFeatureAs
Docs pulled from | This Revision | 44 minutes ago
Create an "--{enable-<feature>=<value>,disable-<feature>}" string that
can be passed to standard GNU Autoconf scripts.
Inputs
flag- 1. Function argument
feature- 2. Function argument
value- 3. Function argument
Type
enableFeatureAs :: bool -> string -> string -> string
Examples
lib.strings.enableFeatureAs usage example
enableFeatureAs true "shared" "foo"
=> "--enable-shared=foo"
enableFeatureAs false "shared" (throw "ignored")
=> "--disable-shared"
Noogle detected
Implementation
The following is the current implementation of this function.
enableFeatureAs =
flag: feature: value:
enableFeature flag feature + optionalString flag "=${value}";