Description Usage Arguments Value Author(s) References See Also Examples
This function is used to post-process the output of a call to the GCC compiler (gcc or g++) to generate the list of files on which a particular source file depends, i.e. includes either directly or indirectly. This information is then used to filter the symbols, routines, data structures, etc. in which we are interested by limiting them to files typically other than these or by matching these to ones in a known directory of interest.
This function does not perform the call to the compiler to generate the dependencies. Instead
1 | readDependencies(filename)
|
filename |
the name of the file to which the dependency information was written in the call to the GCC compiler, or the output itself, i.e. the raw lines emitted by the compiler. |
A character vector giving the fully-qualified names of the included
files and the names of the elements in this vector are the
corresponding base names of these files.
Since the TU output discards the directory information,
we return this base name form for easy comparison
but maintain the directory information for completeness.
So often we use the names()
of the result for use with TUs.
Additionally, the name of the file from which the dependencies
were computed, i.e. the source file passed to the compiler,
is available via the attribute "source"
.
Duncan Temple Lang
The GCC compiler suite
getClassNodes
getAllDeclarations
getRoutines
getGlobalVariables
getEnumerations
1 2 3 4 5 6 7 8 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.