On Tue, Jan 4, 2011 at 11:24 AM, nathan binkert <n...@binkert.org> wrote:
> > [ STRIP] ALPHA_SE/m5.fast <- .unstripped > Would it be for just this one, or all? I think that we generally want > to cut and paste the source, not the target, so either way, this > doesn't seem like a great option. > For all of these, I was thinking just for this case (or strictly, just for the ones where the common prefix is equal to the entire target, which leaves the RHS empty with the current code). If you always reverse the arrow, you'll end up having the same problem in the other direction (e.g., for the python embed step where foo.py -> foo.py.cc). > > Or I could trim back to the path separator: > > [ STRIP] ALPHA_SE/m5.fast.unstripped -> m5.fast > > > > Or trim to the nearest '.' or path sep: > > [ STRIP] ALPHA_SE/m5.fast.unstripped -> .fast > Again, would this apply to all? if so, I'd probably opt for the last > one since we don't need it in the majority of cases. > The current code works 99% of the time... always trimming back to the nearest anything can cause issues; for example, with the swig lines: bar/foo.i -> _wrap.cc, .py it looks nice as it is, but the common prefix is just bar/foo, so you don't want to unconditionally go back to look for a . or path sep. OTOH, I already back up a char when the common prefix ends in '.', otherwise you'd get foo.cc -> o instead of foo.cc -> .o so maybe I can find a way to generalize that which will take care of the .unstripped case. Steve
_______________________________________________ m5-dev mailing list m5-dev@m5sim.org http://m5sim.org/mailman/listinfo/m5-dev