Element: <variable>

Syntax


<!ELEMENT variable       (#PCDATA)>
<!ATTLIST variable
          name           CDATA #REQUIRED
          mode           CDATA #IMPLIED>

This element occurs in the element environment.

Description

The element variable allows to add a variable definition to the environment.

The name of the variable is given by the attribute name of the element.

The attribute mode can take the value "append", in which case the content of the element is appended to the value of the environment variable

The value of the variable is given by the textual content of the element.

Examples


<stage>
    <stageinfo>
        <base>/usr/src/gzip.1.2.4a</base>
        <environment>
            <variable name="GCCFLAGS">-O2</variable>
            <variable name="PATH" mode="append">:/opt/foo</variable>
        </environment>
    </stageinfo>

    <configure />

    <make />

    <make>
        <param>install</param>
    </make>
</stage>

The equivalent bash script is :


echo Stage

export GCCFLAGS=-O2
export PATH=${PATH}:/opt/foo
echo Executing configure
cd /usr/src/gzip.1.2.4a
./configure

echo Executing make
cd /usr/src/gzip.1.2.4a
make

echo Executing make
cd /usr/src/gzip.1.2.4a
make install

echo Exiting stage