Olivia5k / makefile-executor.el

Emacs helpers to run things from makefiles

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Target detection fails when the Makefile is using include directive

rbarzic opened this issue · 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

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

commented

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.