You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think it should be noted somewhere in documentation that targets like "python-pip" may unintentionally trigger execution of other targets if their names match the command line arguments being used.
For example, let's add this rule to GNUmakefile:
ralc:
touch $@
Now make python-pip search ralc will trigger both pip invocation and this rule. Using -- doesn't help either, the behavior remains exactly the same. That is the price of the clever hack (linked below): while there is a way to read $(MAKECMDGOALS) there is no way (afaik) to forbid execution of those ARGS as separate targets:
Hi @sio , thanks for raising this concern. I have got the idea to mitigate it. The mitigation method is not perfect - it still has drawback but at least have no side effect.
I think it should be noted somewhere in documentation that targets like "python-pip" may unintentionally trigger execution of other targets if their names match the command line arguments being used.
For example, let's add this rule to
GNUmakefile
:Now
make python-pip search ralc
will trigger both pip invocation and this rule. Using--
doesn't help either, the behavior remains exactly the same. That is the price of the clever hack (linked below): while there is a way to read$(MAKECMDGOALS)
there is no way (afaik) to forbid execution of those ARGS as separate targets:python.make/python.make
Line 118 in 59c89c3
Thanks for creating this project! I like the idea and I use somewhat similar Makefile in my projects :)
The text was updated successfully, but these errors were encountered: