[M3devel] Re: wierdness around user overrides vs. uname in sysinfo.sh?‏

Jay jayk123 at hotmail.com
Fri Dec 28 12:17:53 CET 2007


[another tactic attempted...]

----------------------------------------
> From: jayk123 at hotmail.com
> To: jayk123 at hotmail.com
> Subject: test
> Date: Fri, 28 Dec 2007 11:15:58 +0000
> 
> 
> I wanted to change upgrade.sh to have the following features:
> 
> 1) optionally skip building m3cc, since it is the slowest part
> 
> 2) optionally clean between various steps, as was apparently necessary for me
> 
> I really cannot hack sh though. Sorry. I've tried several times through the years.
> I just can't stand these languages where pretty much everything is a string.
> e.g. sh, Tcl, cmd.
> I admit hypocrisy in that I can and have hacked cmd.
> 
> So I started rewriting scripts/* in Python.
> I'm not going to delete scripts/*.sh or anything THAT obnoxious (and get my
> access revoked), just add a new scripts/python directory.
> Tempting to call it scripts/jay.
> I'm making good progess here.
> 
> Actually I started with Perl, which I have more experience with, but
> it was frustrating and...
> 
> Anyway, so the real point here is, I'm reading scripts/* fairly closely.
> 
> I'd like to at times bounce my interpretation off folks.
> 
> In particular, I detect some massive wierdness.
> 
> Most variables can be set by the caller.
> I assume that is mostly meant for the user to override things.
> I agree that is mostly a good thing.
> 
> However it seems often data is derived, and then later overrides can kick in.
> 
> In particular, sysinfo.sh sets, e.g. M3OSTYPE and other data based on uname.
> And it sets CM3_TARGET.
> But TARGET is then set via the user override, or CM3_TARGET if no user override.
> 
> I draw one of two conclusions:
> 
> If a user sets TARGET, such as for a cross build, then user darn well better
> set other variables manually to.
> 
> OR sysinfo.sh ought to check for TARGET being set, and derive data from that.
> It should check preset TARGET or uname, not both.
> 
> I'm just going to leave it alone.
> 
> Presumably mostly the overrides are never set.
> They are mainly for cross builds and/or bringing up new targets probably.
> 
> There aren't THAT MANY variables anyway.
> Many could be removed, such as TAR, GREP, CM3*SEARCHPATH, etc.
> Some are only for Win32.
> 
> Maybe after this I'll try rewriting scripts in Quake. :)
> 
>  - Jay
> _________________________________________________________________
> Share life as it happens with the new Windows Live.
> http://www.windowslive.com/share.html?ocid=TXT_TAGHM_Wave2_sharelife_122007

_________________________________________________________________
Share life as it happens with the new Windows Live.
http://www.windowslive.com/share.html?ocid=TXT_TAGHM_Wave2_sharelife_122007



More information about the M3devel mailing list