[M3devel] cm3 -DTARGET=foo

Jay K jay.krell at cornell.edu
Sun Oct 20 11:10:27 CEST 2013


attached, ok?


I recently split ScanCommandLine into ScanCommandLine1 and ScanCommandLine2.
This puts them back together.


You could already say cm3 -DFOO=BAR, but the processing worked like so:
  write FOO = BAR into build_dir/m3make.args
  read/run cm3.cfg
  read/run m3make.args
  
  
The intent of the change is to reverse the order, somewhat.


So that -D on the command line can precede/override cm3.cfg.
I don't see the signficance of m3make.args, other than
cm3 -keep leaves it to be viewed.
This change defines the values directly into memory, before
reading/running cm3.cfg.
This change continues to write m3make.args the same, but changes
quake to allow assigning read only values, if the new value is equivalent
to the old. The assignment is silently ignored and the old value kept
(i.e. equivalent, not equal).


I'd also be ok with an approach that removes m3make.args entirely.
I suspect its existance is related to when makefiles were generated
for each package (which I might bring back..for distribution/packing purposes...)



 - Jay


________________________________
> From: jay.krell at cornell.edu 
> To: m3devel at elegosoft.com 
> Date: Fri, 30 Aug 2013 06:02:41 +0000 
> Subject: [M3devel] cm3 -DTARGET=foo 
> 
> I'd like the above to work. 
> 
> Or cm3 -target=foo or -target:foo. 
> The underlying implementation would be "like" -DTARGET=foo. 
> 
> This doesn't work due to the order of evaluation, command line vs. 
> config file vs. -D written to a file. 
> 
> I don't have the change yet. 
> 
> Any objection to the intent? 
> 
> I wonder if it might subtlely reorder things though. 
> 
> 
> - Jay 
> 
> 		 	   		  
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 2.txt
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20131020/8845ecde/attachment-0001.txt>


More information about the M3devel mailing list