Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ulowell!hawk.ulowell.edu!arosen From: arosen@hawk.ulowell.edu (MFHorn) Newsgroups: comp.unix.wizards Subject: Re: generating code to run multiple targets/configurations from single Message-ID: <12741@swan.ulowell.edu> Date: 11 Apr 89 11:54:53 GMT References: <3129@stpstn.UUCP> <18927@adm.BRL.MIL> <10445@bloom-beacon.MIT.EDU> Sender: news@swan.ulowell.edu Reply-To: arosen@hawk.ulowell.edu Organization: University of Lowell, CS Dept Lines: 38 > >>I need (for a long time) a better way to produce multiple configurations on > >>multiple targets from a single set of sources. > > I like the way X 11.3 does it -- you have one tree of sources, and for each > make you create a tree of links into it. Tcsh added two environment variables, HOST and HOSTTYPE. HOST is your hostname, HOSTTYPE is compile-time configurable. I like the idea, but to be really useful, it has to become part of configuration files and part of the filesystem. I should be able to put into a makefile a line like prog: prog.c prog.h cc prog.c -o $HOSTTYPE/prog All programs that use some sort of configuration file (inetd, syslog, sendmail) would need to recognize $ENVIRONMENT to be really useful. lrwx------ 1 arosen 9 Jan 1 00:00 bin -> bin/$HOSTTYPE [for this, you could "set path = ( ~/bin/$HOSTTYPE $path )"] lrwx------ 1 arosen 19 Jan 1 00:00 .Xdefaults -> $DISPLAY/.Xdefaults lrwx------ 1 arosen 14 Jan 1 00:00 .history -> $HOST/.history All that's needed is an efficient way for the kernel to get at a process' environment variables. Yeah, I know ATT has also suggested environment variables be incorporated into path names, but I came up with the idea on my own before I heard about it. Honest. I just would've had a little more trouble getting the idea in print. -- Andy Rosen | arosen@hawk.ulowell.edu | "I got this guitar and I ULowell, Box #3031 | ulowell!arosen | learned how to make it Lowell, Ma 01854 | | talk" -Thunder Road RD in '88 - The way it should've been