57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
(member modname ignores)
(member unitname ignores)))
(print " \""unitname"\" -> \""modname"\";"))
(print-err "ERROR: bad declare line \""inl"\""))
(loop modname))))
(else
(loop modname)))))))))
(define (main)
(match (command-line-arguments)
(("todot" ignoreunits . files)
(let* ((ignores (string-split ignoreunits ",")))
(print-err "Making graph for files: " (string-intersperse files ", "))
(print "digraph uses_unit {")
(for-each
(lambda (fname)
(print "// Filename: "fname)
(process-file ignores fname))
files)
(print "}")))
(else
(print-err "Usage: plot-uses u1,u2... file1.scm ...")
(print-err " where u1,u2... are units to ignore and file1.scm... are the files to process."))))
(main)
)
;;
;; ;; Gather the usages
|
>
>
>
>
>
>
>
>
|
|
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
(member modname ignores)
(member unitname ignores)))
(print " \""unitname"\" -> \""modname"\";"))
(print-err "ERROR: bad declare line \""inl"\""))
(loop modname))))
(else
(loop modname)))))))))
;; ./utils/plot-uses todot portlogger,stml2,debugprint,mtargs
;; apimod.scm commonmod.scm configfmod.scm dbmod.scm megatestmod.scm
;; mtmod.scm processmod.scm rmtmod.scm servermod.scm
;; tcp-transportmod.scm > uses.dot
;; dot uses.dot -Tpdf -o uses.pdf
(define (main)
(match (command-line-arguments)
(("todot" ignoreunits . files)
(let* ((ignores (string-split ignoreunits ",")))
(print-err "Making graph for files: " (string-intersperse files ", "))
(print "digraph uses_unit {")
(for-each
(lambda (fname)
(print "// Filename: "fname)
(process-file ignores fname))
files)
(print "}")))
(else
(print-err "Usage: plot-uses todot u1,u2... file1.scm ...")
(print-err " where u1,u2... are units to ignore and file1.scm... are the files to process."))))
(main)
)
;;
;; ;; Gather the usages
|