Dynamic variables

Joel Roth edited this page Apr 30, 2017 · 3 revisions

Dynamic variables

Compile automatically creates variables that can be used in the functions.

System variables

To help you in recipe writing, Compile gives you the following run-time variables to use, each referring to a specific filesystem hierarchy's member.

  • $goboExecutables
  • $goboHeaders
  • $goboModules
  • $goboLibraries
  • $goboPrograms
  • $goboSettings
  • $goboTemp
  • $goboVariable
Which respectively point to (by default):
  • /System/Index/bin
  • /System/Index/include
  • /System/Kernel/Modules
  • /System/Index/lib
  • /Programs
  • /System/Settings
  • /System/Variable/tmp
  • /System/Variable
Thus, if you're writing a recipe for some program which accepts configure options and for which you need to manually specify a library path, you can use the $goboLibraries variable like

The same applies to the remaining as well, depending on specific program's needs.

Program variables

For every recipe there will always be variables for the program prefix as well as variables for the settings directory and the variable directory for the program.

  • $target
  • $settings_target
  • $variable_target
For the recipe for Foobar 2.1 those variables will have the values of $goboPrograms/FooBar/2.1, $goboPrograms/FooBar/Settings and $goboPrograms/FooBar/Variable respectively.

Dependency variables

There will also be variables for every dependency listed in the Dependency file. If for example Foo 1.2 is listed as dependency, the variables will be called

  • $foo_path
  • $foo_settings_path
  • $foo_variable_path
Note that these variables will point to the latest installed version of Foo, instead of the version listed in the Dependency file. Also note that special characters will be replaced with underscore. If, for example, GTK+ is listed in the Dependency file, the variable will be called $gtk__path, and Tcl-Tk will be $tcl_tk_path.
Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.