QNX Recursive Make Builder
Monitoring the QNX Recursive make process requires a command/shell file be created on your machine because of how Momentics sets the MAKE environment variable. The command/shell file sets MAKE to the correct value.
Create the command/shell file kwinjectqnx
Before you can create the command/shell file, you must ensure you have the command line desktop analysis tools installed. For more information, see Downloading and deploying the desktop analysis plug-ins
Windows: Create a kwinjectqnx.bat
file and place it in the <command_line_tools>\bin directory
(for example, C:\Klocwork\Klocwork 2024.4 Command Line\bin
). The kwinjectqnx.bat
file should contain two lines:
set MAKE=%1 kwinject -u -o buildspec.out %*
Linux: Create an executable kwinjectqnx.sh
file and place it in the <command_line_tools>/bin
directory (for example, /opt/tools/klocwork/commandlinetools/bin
). The kwinjectqnx.sh
file should contain three lines:
MAKE=$1 export MAKE kwinject -u -o buildspec.out $*
Modify each project's Build Command
In the Momentics Project Explorer, select each C/C++ project in turn and view the C/C++ Build tab of the project properties.
In the Momentics Project Explorer, select each QNX C/C++ project in turn and view the Make Builder tab of the project properties.
Deselect Use Default Build command and add the appropriate command/shell in front of the existing Build Command contents. For example:
Windows
${system_path:kwinjectqnx.bat} ${QNX_HOST}/usr/bin/make ...
Linux
${system_path:kwinjectqnx.sh} ${QNX_HOST}/usr/bin/make ...
Build each project
Build each project in turn by doing a Clean followed by a Build. Verify that there are no build errors in the Momentics Console window.
Modify each project's Klocwork Build settings
To modify each project's Klocwork Build Settings to use the build specification (buildspec.out
) generated by the previous steps:
- In the Klocwork Build Settings page of the project properties, select Use build specification file.
- Enter the location of the build specification file (
buildspec.out
). This file must be unique for each project. The previous steps cause the file to be created in the root of the project's Momentics source tree (that is, where the project's makefile is located). Clicking Browse automatically brings you to this folder. Note that the build specification file won't exist until after the project is cleaned and built.
Now go back to Connect to a project on the Validate server.