Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Possible unintentional target invocation #5

Copy link
Copy link
@sio

Description

@sio
Issue body actions

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:

python-pip: ARGS := $(filter-out python-pip,$(MAKECMDGOALS))


Thanks for creating this project! I like the idea and I use somewhat similar Makefile in my projects :)

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.