User Tools

Site Tools


cookbooks:devel:core

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
cookbooks:devel:core [2022/02/14 08:49]
miconda [tcp_script_mode]
cookbooks:devel:core [2022/04/11 17:10] (current)
bkaufman [substdefs]
Line 439: Line 439:
  
 Similar to **subst**, but in addition it adds a **#!define ID "subst"** (note the difference from #!substdef that the value for define is enclosed in double quotes, useful when the define is used in a place for a string value). Similar to **subst**, but in addition it adds a **#!define ID "subst"** (note the difference from #!substdef that the value for define is enclosed in double quotes, useful when the define is used in a place for a string value).
 +
 +==== trydefenv ====
 +
 +<code c>
 +#!trydefenv ID=ENVVAR
 +</code>
 +
 +Similar to **defenv**, but will not error if the environmental variable is not set.  This allows for boolean defines via system ENVVARs.  For example, using an environmental variable to toggle loading of db_mysql:
 +
 +<code c>
 +#!trydefenv WITH_MYSQL
 +
 +#!ifdef WITH_MYSQL
 +loadmodule "db_mysql.so"
 +#!ifdef
 +</code>
 +
 +==== trydefenvns ====
 +
 +Similar to **#!trydefenv**, but the value is defined in between double quotes to make it convenient to be used as a string token.
 +
 +<code c>
 +#!trydefenvs ENVVAR
 +#!trydefenvs ID=ENVVAR
 +</code>
 +
 ===== Core Keywords ===== ===== Core Keywords =====
  
cookbooks/devel/core.txt ยท Last modified: 2022/04/11 17:10 by bkaufman