JoeAdmin has created a server project called sampleproject in /home/joeadmin/sampleproject. There is only one file, src.c , in sampleproject.
- JoeAdmin runs kwinject on the make command, using the -V option to substitute the projects_root directory with the kwpsroot variable, and using the -o option to specify a file name with the .tpl extension:
-
/home/joeadmin/sampleproject $ /kw-server/bin/kwinject -o sampleproject.tpl -V kwpsroot=`pwd` make clean all
- This command specifies that the build specification template file will be named sampleproject.tpl.
- The resulting build specification template file looks like this:
- version;105 config;/usr/bin/gcc|c;<compiler configuration flags here> compile;%(kwpsroot);/usr/bin/gcc|c;%(kwpsroot)/src.o;src.c link;%(kwpsroot);%(kwpsroot)/<default>;src.o
- JoeAdmin imports the build specification template into the integration project "sampleproject" on the Klocwork Server:
- /home/joeadmin/sampleproject $ /kw-server/bin/kwadmin import-config sampleproject sampleproject.tpl
- The developer JaneUser extracts sampleproject to /home/janeuser.
- She creates local-project and project-settings directories for sampleproject, and connects to the integration project on the Klocwork Server:
- /home/janeuser/sampleproject $ /kw-user/bin/kwcheck create --project sampleproject
- She runs a Klocwork analysis on sampleproject:
- /home/janeuser/sampleproject $ /kw-user/bin/kwcheck run
- Because of the connection to the integration project, kwcheck automatically detects and uses the build specification template. kwcheck replaces the kwpsroot variable with the location of the .kwps directory on her machine (/home/janeuser/sampleproject).