Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site ncr-sd.UUCP Path: utzoo!watmath!clyde!burl!ulysses!bellcore!decvax!ittatc!dcdwest!ncr-sd!greg From: greg@ncr-sd.UUCP (Greg Noel) Newsgroups: net.unix Subject: Re: /bin/true Message-ID: <469@ncr-sd.UUCP> Date: Fri, 2-May-86 16:36:05 EDT Article-I.D.: ncr-sd.469 Posted: Fri May 2 16:36:05 1986 Date-Received: Sun, 4-May-86 05:30:23 EDT References: <481@batcomputer.TN.CORNELL.EDU> <518@looking.UUCP> <2437@teddy.UUCP> <142@myab.UUCP> <765@bentley.UUCP> <401@brl-smoke.ARPA> Reply-To: greg@ncr-sd.UUCP (Greg Noel) Organization: NCR Corporation, San Diego Lines: 40 In article <401@brl-smoke.ARPA> gwyn@brl.ARPA writes: >[The true and false commands] main use is to hang system-type links on. >For example, on the system I'm typing this on, "gould" is linked to "true" >and other system types such as "vax" are linked to "false". These commands >are very useful if you maintain code for multiple systems all in the same >place. Well, I admit that doing it that way is better than nothing, but I've been in the same environment and I've always considered it a bit of a misfeature. The problem is one of future compatibility -- if you add a new machine type, you have to put in a link on every machine in the world. A better scheme would have been a single command, say "machid", that only consisted of the command "echo gould". Then, the usual sequence of: if pdp11; then ... elif vax; then ... elif pyr; then ... elif gould; then ... elif tower; then ... elif sequent; then ... elif amiga; then ... elif telefunken; then .... else echo "I don't know how to handle this machine"; fi (an exageration, admittedly, but do \you/ have links for all those machines?) becomes: case `machid` in pdp11) ... ;; vax) ... ;; pyr) ... ;; gould) ... ;; tower) ... ;; sequent) ... ;; amiga) ... ;; telefunken) ... ;; *) echo "I don't know how to handle machine-type `machid`" ;; esac This is no more difficult to manage, and easy to extend compatibly. And if you don't have a link for "telefunken" then it doesn't cause your makefile to punt....... -- -- Greg Noel, NCR Rancho Bernardo Greg@ncr-sd.UUCP or Greg@nosc.ARPA