On Wed, Jul 04, 2018 at 11:29:26AM +0100, Emil Velikov wrote: > Hi Peter, > > On 28 June 2018 at 00:51, Peter Hutterer <[email protected]> wrote: > > When running libinput tools from the builddir, look up the subtools in the > > builddir as well. Otherwise, add the install prefix to the list of lookup > > locations. > > > > This ensures that a) we're running builddir stuff against builddir stuff, > > but > > also b) that we're not running builddir stuff against installed stuff > > because > > that may give us false positives. > > > > Signed-off-by: Peter Hutterer <[email protected]> > > --- > > Similar-ish to the git approach Emil suggested in [1] but git is a lot more > > involved here. Since we only need this for debugging tools, we can pick the > > simpler approach here and simply ignore most of the corner cases. > > > I think that git does thing in that particular way is to ensure a > consistent lookup approach.
yeah, git cares a lot more about different platforms and features and it works around a relocatable (relative) execdir. And comparing to the prefix is 'safer' because you're not leaking the builddir into the binary. But for this particular use-case ... meh :) > Personally tools_execdir_is_builddir reads like it should return a > bool, sadly no better name comes to mind. indeed. I'll see if I come up with something more telling but given the limited impact I'm happy enough with the current name. Thanks for the review. Cheers, Peter _______________________________________________ wayland-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/wayland-devel
