Integrating with Make

To integrate OpenText SAST with make, run sourceanalyzer with Make for the build process. For example, if you build your project with the following build commands:

make clean
make
make install

You can simultaneously translate and compile the entire project with the following example commands:

make clean
sourceanalyzer -b MyProject make
make install

As an alternative to build integration, you can modify your build script to prefix each compiler, linker, and archiver operation with the sourceanalyzer command. For example, a makefile often defines variables for the names of these tools:

CC=gcc
CXX=g++
LD=ld AR=ar

You can prepend the tool references in the makefile with the sourceanalyzer command and the appropriate options.

CC=sourceanalyzer -b MyProject gcc
CXX=sourceanalyzer -b MyProject g++
LD=sourceanalyzer -b MyProject ld
AR=sourceanalyzer -b MyProject ar

When you use the same build ID for each operation, OpenText SAST automatically combines each of the separately-translated files into a single translated project.