SPFE Documentation | Collections > SPFE Development > Executing the SPFE build system

Executing the SPFE build system

Think

The SPFE Open Toolkit build system processes a set of topics specified in its configuration to generate output. You will invoke the spfe script with a content set configuration file to run the build system.

Plan

Do

You must properly install the toolkit before executing the SPFE build system.

Set the environment variable SPFE_BUILD_DIR to the full path name of a directory you want the build system to generate run files and output. The files for each content set will go in a separate subdirectory with the name of its content-set-id.

Execute either the Windows spfe.bat or Unix Bash spfe.sh script in the SPFEOT_HOME directory, depending on your operating system. A link is provided so that, in most cases, you will need only execute the command spfe.

Execute the spfe command with arguments specifying the content set configuration file name and either draft or final output forms.

        spfe content-set.xml draft
        spfe content-set.xml final
            

The draft form adds a number before each paragraph for reference by editors.

By default, the log will print to the screen. To save to a file you may pipe the command through the tee filter in a Unix environment or in Windows PowerShell:

        spfe content-set.xml final | tee spfe.log
            

Optional arguments provide additional messaging in the log:

        spfe content-set.xml final -verbose | tee spfe.log
        spfe content-set.xml final -verbose -debug | tee spfe.log
            

Reviewing the log

Review the output log for warnings and errors. Each stage of the build process is preceded with a line indicating the stage. The following label the primary stages:

        --build.synthesis
        --build.presentation
        --build.format
            

Warnings such as the following indicate things that are not quite right but are not serious enough to prevent output generation:

        Warning: Authored element description found for an element not found in the schema: . . .
        Subject not resolved: feature name "topic-type" not resolved in topic . . .
            

An "ERROR" message may or may not appear in the log if a build fails. Look for the string "Fatal" in the log if a build fails without an explicit ERROR message or if a topic fails to appear in the output that should have. Such fatal errors occur when the XML syntax is invalid.

Reviewing output

Find output in the formats specified in the configuration in the directory SPFE_BUILD_DIR/content-set-id/output, where "content-set-id" is the content set identifier in the configuration.