-
Notifications
You must be signed in to change notification settings - Fork 31
fpp locate defs
This tool parses FPP source files and reports the locations of symbol definitions. It is useful when exporting symbols from a directory containing FPP source files.
For example, you can run find
dir -name '*.fpp'
to find
all the FPP files in dir, and you can use the output as the input to
fpp-locate-defs
.
The result will be a manifest of all the FPP symbols defined in dir.
You can save this manifest in a file, say dir /exported.fpp
.
When building a file that depends on dir, say client.fpp
, you can
do the following:
-
Run
fpp-depend
dir/exported.fpp
client.fpp
to compute the file dependencies ofclient.fpp
on specific files in dir. -
Run
fpp-locate-uses -i
dir/exported.fpp
client.fpp
to compute the locations of symbols defined in dir and used inclient.fpp
.
Options:
-
-d
dir: Specify the base directory for locating files. The default directory is the current directory.
Input: A list fl of files specified on the command line.
Output:
-
An FPP source file, written to stdout. The source file contains one location specifier for each symbol defined in fl.
Procedure:
-
Parse each of the files in fl, generating a list tul of translation units. When parsing, recursively resolve include specifiers.
-
For each definition d appearing in tul write out a location specifier for d relative to the base directory.