As part of some work to integrate the DTrace test suite with Kyua, I've been using the bsd.dep.mk rules to run dtrace -G on some of the test programs. This exposed some buglets; the change in this review attempts to fix them.
There are three changes here:
- Use anchors when using make(1)'s :S modifier. Without this I run into problems if I have an object called tst.foo.o and a provider script called foo.d; we were removing tst.foo.o from the object list with ${OBJS:S/foo.o//}.
- (This one is a bit hacky.) Make the auto-generated object file depend on the provider script and the rest of the object files. Then use ${.ALLSRC} to place them on the dtrace(1) command line. I need to do this in order to use .d files from make(1)'s .PATH. Otherwise I have no way of getting a path to the .d file in the recipe.
- Remove the generated header from the dep list for the generated object file, since the object file doesn't directly depend on the header. We have beforebuild: ${DHDRS} anyway, which is sufficient.