Autodep
started 1/5/2002; 11:54:13 AM - last post 1/6/2002; 12:18:32 PM
|
|
Ehud Lamm - Autodep
1/5/2002; 11:54:13 AM (reads: 881, responses: 3)
|
|
Autodep |
(via sweetcode)
Autodep(1) is a utility which automates the maintenance of
dependancy information used by make(1) to build C, C++ and
Java programs. It runs the C, C++ or Java compiler comman-
dline given as its arguments, using some operating-system
specific trickery to detect when the compiler uses the
open(2) system call to read or write files, and creates an
output file describing the build dependancies between
input files (e.g. C header files) and output files (e.g.
object files) in a format suitable to be include'd into a
Makefile.
Not really a language tool, but it is a nice hack. In some sense it does teach an important design technique for language based tools: piggyback an existing compiler, if at all possible
Obviously good languages have depedency analysis builtin.
Downloads for several platforms are available.
Posted to general by Ehud Lamm on 1/5/02; 12:01:23 PM
|
|
|
|
David Bakin - Re: Autodep
1/5/2002; 2:40:55 PM (reads: 901, responses: 0)
|
|
Tracking actual file usage (including specific version) by tools is what Clearcase does. Except, they've implemented it as a file system (which also handles file naming syntax for specifying versions, branches, etc.). In fact, Clearcase also tracks the output files matching them with all input files used plus the specific tool and its command line and environment variables. That way, if you've ever generated a particular file with a tool (e.g., generated an object file) with the exact same input files and exact same tool and command line then it won't run the tool - it will just copy that output file into the correct destination directory. Very valuable on large projects with many branches and many developers, where most of the branches are similar to each other (therefore there is a lot of commonality).
(Forgive me if Clearcase has ever been discussed here before.)
Anyway, this looks like a nice way to get some useful information out of a cheap implementation (that doesn't require the full information that a file system can give you).
|
|
Alex Moffat - Re: Autodep
1/5/2002; 5:17:43 PM (reads: 888, responses: 0)
|
|
Sort of tangential but I've found with a large project at work (approx 2030 java files) that it's just quicker to compile the whole lot in one pass than to run a makefile system with dependencies. Originally I'd built a makefile setup that only recompiled the things that it needed to based on dependency info and it worked nicely. However, for our project it's just much faster to use ant and recompile everything. Ant is, I think, an interesting example of the innovator's dilemma. The relation between the "innovator's dilemma" and "worse is better" is also an interesting thing to consider. I wrote a slightly longer piece about ant and the innovator's dilemma here[http://www.zanthan.com/itymbi/archives/000037.html]. Some of the innovator's dilemma analysis is very applicable, I think, to "worse is better".
|
|
|
Obviously good languages have depedency analysis builtin.
Since IBM's Jikes compiler for Java builds in dependency analysis, does Jikes make Java a good language? Or was Java a good language to begin with? Or is it not a good language because not all compilers for it include this feature? ;)
|
|
|
|