2

Do I have to manually tell the static analyser which files to include in the analysis?

I'm using a NetBeans-based IDE (MPLAB X) to program an embedded system in C (with the XC8 compiler). It is very easy to build the project, and when I add .c or .h files to the project via the GUI, it automatically adds them to the set of files that are compiled.

What is common practice for automation of adding files to be passed to a tool? (such as a static analyser, (I will probably use splint, or possibly frama-c).

In other words, I would like to be able to run the static analyser by hitting a shortcut key, whereby it will include all necessary .c and .h files automatically, analyse them, and return the result.

Yet another way of putting it: I don't want to have to manually manipulate the arguments sent to the static analyser CLI executable each time I add a .c or .h file, or change their names, etc.

How should this be done? How is this typically done for supplementary tools to the build process, such as static analysers?

Thanks

Jodes
  • 14,118
  • 26
  • 97
  • 156
  • 2
    A separate makefile that you run occasionally should do it. A simple way to identify your files that are used in a particular build is to first use **touch** to set the time on each file to the current time, then wait a minute, then run the build, then use **ls -lut** and the files referenced in the build will have a new time value. – Marichyasana Feb 23 '14 at 12:08

0 Answers0