On Apr 11, 11:42 pm, "TD" <thinkdiffer...@mailinator.com> wrote:
> Thanks, Brian, some of that was a bit mind blowing. But thanks for
> the info. I had a quick look at the showdependencies script but
> unfortunately it relies on the scripts being documented with requires
> and that is not the case with my system. It's an older system with no-
> one who knows the system to explain it's structure. I was thinking
> there ought to be something within ksh, as you described, which could
> help. I might check that out.
You mean: "ksh93 -I depfile myscript" ? It is the preferable solution.
I hope you at least investigate it. (Ksh93 is freely downloadable
through
kornshell.com).
It would be a pity if you couldn't use it, because the AT&T AST
library
(including ksh, cdb, ciao, ...) is a 1000 man-years of software tools
primarily devised for reverse engineering of complex legacy software.
> I have taken a quick and dirty
> approach for now where I did a grep for each line mentioning the
> basename of the file within any other file thus generating a list of
> files and names which that file refers to. I'm now trying to generate
> a dependency diagram from that list.
This is a practical goal. If the above doesn't pan out,
GraphViz (or even better, WebDot) is a free and viable solution,
although you will have to generate the dependency table yourself.
Here is an example (with source, so cheat!):
GraphViz/WebDot example: "Module Dependencies":
http://www.graphviz.org/Gallery/undi...softmaint.html http://www.graphviz.org/webdot/
"WebDot.tcl": GraphVix GUI
http://www.graphviz.org/webdot/demo.html # look at "jsort"
I was thinking that "scriptran" just might be a java executable,
and therefore runnable on non-Solaris systems (if' that what
you have -- you didn't mention); it is at least worth investigating:
"scriptran": "Bourne shell script analysis tool"
http://soldc.sun.com/tools/linux/L3.html http://developers.sun.com/solaris/do.../lincat_3.html
=Brian