Need source and object file organiza - (nf)

rpw3 at fortune.UUCP rpw3 at fortune.UUCP
Sun Apr 8 10:07:26 AEST 1984


#R:rdin:-37000:fortune:11600083:000:1334
fortune!rpw3    Apr  7 04:53:00 1984

If I understand what you are asking... (we called it the "tree cloning"
method of (ha!) "source control"...)

The most useful (but also the most painful) thing to do is to go through
ALL of your makefiles and change the rules (explicit and default) to
"unlink" a target (with "rm -f") just as you start creating it.

You also want to make sure that all of your editors rename the original
file to a backup name ("mv foo ,foo" or equiv.) just before writing out
the updated text. (Rand "E" does this, as do some others. We hacked "vi"
to do so.)

That way, when someone wants to try out a new version, they can "clone
a tree" (do a recursive-"cp", a.k.a. "mkdir" + "ln"), edit some source file
(which does NOT overwrite the original source but produces a new file with
linkcount=1), do a "make", and exactly the set of objects that depended on
the source will get unlinked and re-built. (The rest of the ".o" files just
lie there and get ld'd. ;-} )

There was a period during our porting efforts that there were about
two dozen complete kernel trees on the machine, but occupying maybe
only 3-5 times the disk space of one tree (savings of from 5:1 to 8:1).

Rob Warnock

UUCP:	{ihnp4,ucbvax!amd70,hpda,harpo,sri-unix,allegra}!fortune!rpw3
DDD:	(415)595-8444
USPS:	Fortune Systems Corp, 101 Twin Dolphin Drive, Redwood City, CA 94065



More information about the Comp.unix.wizards mailing list