withFeatureAs
lib.withFeatureAs
Docs pulled from | This Revision | 44 minutes ago
Create an "--{with-<feature>=<value>,without-<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
withFeatureAs :: bool -> string -> string -> string
Examples
lib.strings.withFeatureAs usage example
withFeatureAs true "shared" "foo"
=> "--with-shared=foo"
withFeatureAs false "shared" (throw "ignored")
=> "--without-shared"
Noogle detected
Implementation
The following is the current implementation of this function.
withFeatureAs =
flag: feature: value:
withFeature flag feature + optionalString flag "=${value}";