Skip to content

chore: implement phony targets correctly #235

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 21, 2020
Merged

chore: implement phony targets correctly #235

merged 1 commit into from
Dec 21, 2020

Conversation

Nr18
Copy link

@Nr18 Nr18 commented Dec 7, 2020

Issue #, if available:

Description of changes:

From the manual of make

A phony target is one that is not really the name of a file; rather it is just a name for a recipe to be executed when you make an explicit request. There are two reasons to use a phony target: to avoid a conflict with a file of the same name, and to improve performance.

See: https://www.gnu.org/software/make/manual/html_node/Phony-Targets.html

Checklist

Breaking change checklist

RFC issue #:

  • Migration process documented
  • Implement warnings (if it can live side by side)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@heitorlessa
Copy link
Contributor

I need to have a read on the Phony targets more carefully, then merge this as it seems like a no brainier - But first I need to make sure I understand how this improves performance OR if this is to avoid filename conflicts (do we have any?)

@Nr18
Copy link
Author

Nr18 commented Dec 11, 2020

The main reason why I always use it because I had conflicts where I accidentally created a file that had the same name as a target and then you get a "Nothing to do" message from Make as the file is already there. .PHONY will prevent that by always executing the target.

So after hitting that one and a good amount of troubleshooting I am always adding those phony definitions to prevent it from happening again.

@to-mc to-mc self-requested a review December 16, 2020 15:47
@heitorlessa heitorlessa added the internal Maintenance changes label Dec 21, 2020
@heitorlessa
Copy link
Contributor

Understood, thanks a lot @Nr18 !!

@heitorlessa heitorlessa merged commit 835789e into aws-powertools:develop Dec 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal Maintenance changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants