[M3commit] CVS Update: cm3

Jay Krell jkrell at elego.de
Sat Oct 9 13:36:40 CEST 2010


CVSROOT:	/usr/cvs
Changes by:	jkrell at birch.	10/10/09 13:36:40

Modified files:
	cm3/m3-sys/m3cc/src/: m3makefile 

Log message:
	cleanup the "NOACTION" feature, by wrapping the whole thing
	in a function and using early return
	NOTE: This would also be perfectly clean and natural using goto.
	Goto is not evil! Compare it to the contortions people go through
	to avoid it. Those are evil.
	It would be evil to not have the option of if/else/switch/for/while/break/continue,
	but not having goto is also evil.
	
	let PREBUILT_CM3CG work with cross builds, by copying to build_dir
	instead of just dot (move the code down to after build_dir
	is computed/created)
	
	PREBUILT_CM3CG doesn't use $WORKSPACE but requires it be set. Why?
	To avoid honoring it in other random settings?
	Let PREBUILT_CM3CG also work if $USER = jay.
	Really: we should not be defining our own environment variables
	that don't start with CM3_! Even that isn't great.
	And we should try to use cm3 -D options instead?
	Environment variables are fairly flat namespace (though
	you can use underscores and long names) and they flow
	into unrelated processes, so perhaps to be avoided.
	However they also flow automatically into child processes,
	which can be good, when you don't control the command lines
	all the way through. (It turns out, there's just no
	perfect solution here. You can also store configuration
	state globally like in files or registry, but then
	you can't scope it to a particular process or process tree.
	A good hybrid, if there is much parameters/state, is stash it
	in a temporary file/directory, and put that file/directory
	path in an environment variable -- ie: use just one environment
	variable).




More information about the M3commit mailing list