anakryiko / retsnoop

Investigate kernel error call stacks
BSD 2-Clause "Simplified" License
186 stars 32 forks source link

Makefile: Do not rebuild the sidecar if not the default path #59

Closed martinetd closed 7 months ago

martinetd commented 8 months ago

(This is a follow-up on #56 -- it contains #56 itself as that'd conflict so leaving it as draft fo now)

If the SIDECAR variable has been overriden then running cargo is not useful nor desired: define a DEFAULT_SIDECAR variable we can compare against and only add the $(SIDECAR):: rebuild rule if SIDECAR has the default value.


The last commit is complete garbage, but I couldn't come up with a way to flag that I don't want to rebuild the sidecar (the :: make target will always try to run cargo and that'll fail for me); I think I'll just patch it on the nixos side but bringing it up here if you have a better idea.

yeah, this is not good for "normal" build path. What we can do, perhaps, is to have DEFAULT_SIDECAR vs SIDECAR that can be overridden, and if they don't match, don't even trigger cargo (as it's pointless anyways). Let's do this as a separate PR still?

That makes a lot of sense, with the path changed it's not like cargo would be able to do anything useful anyway.

I've fiddled with it a bit and it appears to work with both default and non-default value in my environment.