mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-28 17:20:47 +08:00
Makefile target to get module dependeny subgraphs.
E.g. what depends on Text.Pandoc.Parsing?
make modules.pdf ROOTNODE=T.P.Parsing
This is helpful for figuring out what we can split out as separate
packages.
This commit is contained in:
@@ -8,6 +8,7 @@ COMMIT=$(shell git rev-parse --short HEAD)
|
||||
TIMESTAMP=$(shell date "+%Y%m%d_%H%M")
|
||||
LATESTBENCH=$(word 1,$(shell ls -t bench_*.csv 2>/dev/null))
|
||||
BASELINE?=$(LATESTBENCH)
|
||||
ROOTNODE?=T.P
|
||||
ifeq ($(BASELINE),)
|
||||
BASELINECMD=
|
||||
else
|
||||
@@ -174,8 +175,10 @@ modules.dot: $(SOURCEFILES)
|
||||
| sed -e 's/Text\.Pandoc\([^ ]*\)/"T\.P\1"/g' >> $@
|
||||
@echo "}" >> $@
|
||||
|
||||
# To get the module dependencies of T.P.Parsing:
|
||||
# make modules.pdf ROOTNODE=T.P.Parsing
|
||||
modules.pdf: modules.dot
|
||||
cat $< | dot -Tpdf > $@
|
||||
gvpr -f tools/cliptree.gvpr -a '"$(ROOTNODE)"' $< | dot -Tpdf > $@
|
||||
|
||||
clean: ## clean up
|
||||
cabal clean
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
/* Construct subgraph reachable from node ARGV[0] by forward edges */
|
||||
BEG_G {
|
||||
node_t r = node($,ARGV[0]);
|
||||
|
||||
$tvroot = r;
|
||||
$tvtype = TV_fwd;
|
||||
//print ("// Staring node: ", r.name);
|
||||
}
|
||||
N{
|
||||
print ("// subgraph node: ", $.name);
|
||||
$tvroot=NULL;
|
||||
subnode($T,$);
|
||||
}
|
||||
E{
|
||||
print ("// subgraph edge: ", $.name);
|
||||
subedge($T,$);
|
||||
}
|
||||
Reference in New Issue
Block a user