diff options
| author | aarne <aarne@chalmers.se> | 2010-04-06 08:53:44 +0000 |
|---|---|---|
| committer | aarne <aarne@chalmers.se> | 2010-04-06 08:53:44 +0000 |
| commit | ba13052d3117c3931a5477a0bbf2d3c38ed749c6 (patch) | |
| tree | c6049008c3f7e9440a24129db318b517546868c8 /src/compiler/GF/Command/Commands.hs | |
| parent | 2ced613d81b1fb93e3e60c974eee73a8872d7093 (diff) | |
dependency graph can be restricted to some modules; added help dg
Diffstat (limited to 'src/compiler/GF/Command/Commands.hs')
| -rw-r--r-- | src/compiler/GF/Command/Commands.hs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/compiler/GF/Command/Commands.hs b/src/compiler/GF/Command/Commands.hs index 51f1c1426..0ca54839c 100644 --- a/src/compiler/GF/Command/Commands.hs +++ b/src/compiler/GF/Command/Commands.hs @@ -208,6 +208,31 @@ allCommands cod env@(pgf, mos) = Map.fromList [ ], needsTypeCheck = False }), + ("dg", emptyCommandInfo { + longname = "dependency_graph", + syntax = "dg (-only=MODULES)?", + synopsis = "print module dependency graph", + explanation = unlines [ + "Prints the dependency graph of source modules.", + "Requires that import has been done with the -retain flag.", + "The graph is written in the file _gfdepgraph.dot", + "which can be further processed by Graphviz (the system command 'dot').", + "By default, all modules are shown, but the -only flag restricts them", + "by a comma-separated list of patterns, where 'name*' matches modules", + "whose name has prefix 'name', and other patterns match modules with", + "exactly the same name. The graphical conventions are:", + " solid box = abstract, solid ellipse = concrete, dashed ellipse = other", + " solid arrow empty head = of, solid arrow = **, dashed arrow = open", + " dotted arrow = other dependency" + ], + flags = [ + ("only","list of modules included (default: all), literally or by prefix*") + ], + examples = [ + "dg -only=SyntaxEng,Food* -- shows only SyntaxEng, and those with prefix Food" + ], + needsTypeCheck = False + }), ("dt", emptyCommandInfo { longname = "define_tree", syntax = "dt IDENT (TREE | STRING | \"<\" COMMANDLINE)", |
