Example: Determine how environment is set

This example illustrates how a program's environment is set.

In this example the program node in the project has a library node as a dependency. The environments have been defined as shown:

Table 1. Environment set for levels used in the example
Level Environment Set
System environment
PATH=/bin;/usr/bin 
VAR1=hello 
VAR2=bonjour 
VAR3=guten tag
My Library Environment
PATH=$(PATH);$(ProjectDir)/scripts 
VAR1=goodbye
My Program Environment
PATH=$(PATH);$(ProjectDir)/scripts 
VAR1=$(VAR1) world 
VAR2=$(VAR2) $(VAR1)

If the ProjectDir is /home/joe/project, the environment for the program will be:

PATH=/bin:/usr/bin/:/home/joe/project/scripts 
VAR1=goodbye world 
VAR2=bonjour goodbye world 
VAR3=guten tag