generating code to run multiple targets/configurations from single

MFHorn arosen at hawk.ulowell.edu
Tue Apr 11 21:54:53 AEST 1989


> >>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 at 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



More information about the Comp.unix.wizards mailing list