makefile-executor.el icon indicating copy to clipboard operation
makefile-executor.el copied to clipboard

Target detection fails when the Makefile is using include directive

Open rbarzic opened this issue 3 years ago • 2 comments

This is mentioned in http://stackoverflow.com/a/26339924/983746 entry used to defined makefile-executor-list-target-code. Unfortunately, the workaround described in the StackOverflow entry can't be applied without changing the code in makefile-executor.el

rbarzic avatar Feb 18 '22 10:02 rbarzic

Apparently, the suggestion from user artu-hnrq about using -f $(firstword $(MAKEFILE_LIST)) instead of -f $(lastword $(MAKEFILE_LIST)) may solve the issue

rbarzic avatar Feb 18 '22 10:02 rbarzic

I ran into the same issue recently. I used include directives as well as recursive calls of make to call makefiles in subdirectories. But I only got a subset of my targets displayed when executing makefile-executor-execute-project-target, for example. As suggested by @rbarzic, I replaced lastword with firstword and now everything works as expected.

fxble avatar Jul 14 '23 13:07 fxble