mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-28 17:20:47 +08:00
Makefile: add moduledeps target.
make moduledeps ROOTNODE=T.P.Parsing
This commit is contained in:
@@ -180,6 +180,11 @@ modules.dot: $(SOURCEFILES)
|
||||
modules.pdf: modules.dot
|
||||
gvpr -f tools/cliptree.gvpr -a '"$(ROOTNODE)"' $< | dot -Tpdf > $@
|
||||
|
||||
# make moduledeps ROOTNODE=T.P.Parsing
|
||||
moduledeps: modules.dot ## Print dependencies of a module ROOTNODE
|
||||
gvpr -f tools/depthfirst.gvpr -a '"$(ROOTNODE)"' modules.dot
|
||||
.PHONY: moduledeps
|
||||
|
||||
clean: ## clean up
|
||||
cabal clean
|
||||
.PHONY: clean
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
BEGIN {
|
||||
int i, indent;
|
||||
int seen[string];
|
||||
void prInd (int cnt) {
|
||||
for (i = 0; i < cnt; i++) printf (" "); }
|
||||
}
|
||||
BEG_G {
|
||||
$tvtype = TV_prepostfwd; $tvroot = node($,ARGV[0]);
|
||||
} N{
|
||||
if (seen[$.name]) {
|
||||
indent--;
|
||||
if (indent == 0) exit(0);
|
||||
} else {
|
||||
prInd(indent); print ($.name);
|
||||
seen[$.name] = 1;
|
||||
indent++;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user