Skip to content

Add .PHONY declaration to Makefile #138

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mgrl39
Copy link

@mgrl39 mgrl39 commented Apr 5, 2025

Add .PHONY to Makefile targets

Changes:

  • Explicitly declares all, fmt, test, build, and other non-file targets as .PHONY in the Makefile.

Why?

  • Ensures these targets always execute (even if a file/directory with the same name exists, e.g., ./clean).
  • Follows GNU Make conventions (Phony Targets docs).
  • Improves reliability and avoids potential edge cases in builds.

Impact:

  • No functional changes—just better Makefile hygiene.

Avoid potential conflicts with files/directories of the same name.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant