Behold, it's Perl. I wrote this long ago to handle orkign with PrC scripts. Building ALL the scripts will take hours, so you want to have to do that as rarely as possible. I guess you could tweak make and makedepend to do the job for you, but always wanting to do everything backwards, I decided to put together my own little utility for dependencies. This does the opposite of makedepend, ie. "I know what files I've changed, but which scripts do I now need to recompile and redistribute?"
You'd be looking at something like:
Bash: for n in `nssdepend.pl changedfile.nss otherchange.nss`; do nwnsscomp -c $n; done
CMD: for /F %n in ('perl nssdepend.pl changedfile.nss otherchange.nss') do nwnsscomp -c %n
Want to know what files to include in module if you were to modify nw_i0_generic?
nssdepend.pl nw_i0_generic.nss
...forget it.
I guess now y'all want a script that can be executed from desktop and given the name of the modified script(s), without .nss extension, and will automatically rebuild everything. Or better yet, recompile everything that needs to be recompiled automatically. Well, it does what I need it to do, I'll probably improve it when it no longer does. As an added benefit in current form it can be used to do those "what is affected" queries. Note that it ONLY shows leaves of the dependency tree, ie. it doesn't show all include-files you need for compiling that set.
Ps. Ofcourse you need Perl for this to work.