Review Board 2.0.15


scons: interpret paths relative to launch directory

Review Request #604 - Created March 24, 2011 and submitted

Information
Steve Reinhardt
gem5
Reviewers
Default
ali, gblack, nate, stever
scons: interpret paths relative to launch directory

Make sure all command-line targets and EXTRAS directories
are interpreted relative to the launch directory.  This
turns out to be very useful when building code from an
EXTRAS directory using SCons's -C option.

We were trying to do this with targets but it didn't actually
work since we didn't update BUILD_TARGETS (so SCons got
confused internally).  We weren't even trying with EXTRAS.

To simplify the code, the default target is also interpreted
relative to the launch dir even though it was explicitly
handled as relative to the m5 dir before... I doubt anyone
really uses this anyway so it didn't seem worth the complexity.
(Maybe we should get rid of it?)

   
Posted (March 24, 2011, 4:15 a.m.)



  
SConstruct (Diff revision 1)
 
 
Why did you get rid of the validators?  My recollection is that a typo in EXTRAS can be baffling.
  1. I didn't get rid of the check, just moved it (see the added code at the bottom, line 794 in the new file).
    
    I stopped using the scons converter/validator hooks because I wanted to reuse the converter code for the targets, and scons didn't seem to like passing lists around instead of strings.  Plus it's poorly documented and we don't use those hooks for any other vars so it seemed cleaner just to abandon it entirely.
    
Ship it!
Posted (March 25, 2011, 3:15 a.m.)
I didn't try it, but i think I understand the implications and I think it looks alright.  I say go for it.  I'm sure you can fix it quickly if it goes sour.
SConstruct (Diff revision 1)
 
 
Ok.  I didn't notice that.