usage: dependencies.py [-h] [-v] [-f {gcc-minus-h,cmake}] [-r ROOT] [-s SUFFIX] [-o FILE] [--strip-prefix PREFIX] [--verbose] [--filter-contract-directories] [--filter-drop-absolute-paths] [--filter-drop-loops] [--filter-source REGEX] [--filter-target REGEX] [--filter-source-and-target REGEX] [--filter-drop-source REGEX] [--filter-drop-target REGEX] [--filter-drop-source-and-target REGEX] [--filter-dependencies REGEX] [--filter-reverse-dependencies REGEX] [--filter-generic LAMBDA] optional arguments: -h, --help show this help message and exit -v, --version show program's version number and exit -f {gcc-minus-h,cmake}, --format {gcc-minus-h,cmake} The format of the dependency information, either "gcc- minus-h" or "cmake" (default: "gcc-minus-h"). -r ROOT, --root ROOT The root of the subtree with dependency information (default: "."). -s SUFFIX, --suffix SUFFIX The suffix of the files with dependency information (default: ".d"). Use "depend.make" for cmake dependency format. -o FILE, --output FILE The output is written to this file (default: stdout). --strip-prefix PREFIX Strips PREFIX from all filenames if matching. The root directory is always stripped. Useful for out-of-source builds or weird automounters. Can be given multiple times. The prefixes are tried in the order of their appearance on the command line. The first match (except the root directory) stops processing of the remaining prefixes. --verbose Enables the verbose mode. Filter options: The following options control filters to postprocess the dependency graph. All filter options can be given multiple times and are applied in the order of their appearance on the command line. --filter-contract-directories Replaces all nodes representing files in a particular directory by a single node for that directory. --filter-drop-absolute-paths Removes all nodes representing files with an absolute path. --filter-drop-loops Removes all loops, i.e., edges where source and target are equal. --filter-source REGEX Removes all edges with sources not matching REGEX. --filter-target REGEX Removes all edges with targets not matching REGEX. --filter-source-and-target REGEX Removes all edges with sources and targets not matching REGEX. --filter-drop-source REGEX Removes all edges with sources matching REGEX. --filter-drop-target REGEX Removes all edges with targets matching REGEX. --filter-drop-source-and-target REGEX Removes all edges with sources and targets matching REGEX. --filter-dependencies REGEX Removes all nodes not reachable from nodes matching REGEX by a forward graph traversal, i.e., only the dependencies of nodes matching REGEX remain. --filter-reverse-dependencies REGEX Removes all nodes not reachable from nodes matching REGEX by a backward graph traversal, i.e., only the nodes depending on nodes matching REGEX remain. --filter-generic LAMBDA Applies the given lambda function to all edges of the graph. The lambda function must accept two string arguments. It is called for all edges with the source and target nodes as arguments. It must return None, which removes the edge, or a pair of two strings. In the latter case, this pair is interpreted as new source and target node of the edge. For example, "lambda s, t: (t, s)" reverts the direction of all edges.