Example 2: Ounce/Make with recursive option
With the -r
option, Ounce/Make operates
recursively (follows calls to other makefiles contained inside a makefile).
Since multiple-project file mode is the default mode, when used with
the -r
option, Ounce/Make creates an AppScan®
Source project
file for every makefile encountered that compiles source code.
See Directory structure and files for a graphical explanation of the directory structure and files that are assumed by this example.
Command
ouncemake -r
The -r
(recursive)
option instructs Ounce/Make to follow makefile calls to other makefiles.
For a more detailed description of the recursive option, refer to
the table in Ounce/Make command syntax and make options.
The following diagram shows the contents of the directories after Ounce/Make runs:
In this example, Ounce/Make creates an AppScan® Source project file in /usr/source and /usr/source/server. Since the makefile in /usr/source called the makefiles in /usr/source/database and /usr/source/server, Ounce/Make checked to see if those makefiles compiled source code.
In the case of the makefile in /usr/source/database, Ounce/Make determined that this makefile does not compile source code; therefore, it did not create an AppScan® Source project file. However, Ounce/Make determined that the makefile in /usr/source/server compiled the source files in that directory, and thus generated an AppScan® Source project file for the source files in /usr/source/server.