Skip to content
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

makefile: streamline variable checks #582

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

doshitan
Copy link
Contributor

Changes

Reduce boilerplate for commonly used environment variables. And generally rather than more imperatively checking variables, having a target to do the check and moving them to the prerequisite list feels "cleaner".

TODO:

  • Don't love require- prefix, was thinking maybe just var-%? Or more verbose check-defined-%/assert-set-%
  • Moving to a target instead of inline function call does lose the context in the "error" message of which target it's coming from (though generally should be obvious).

Testing

Run some make commands.

TODO: screenshots

This does make the "required by target <name>" part of the error message
kinda useless for anything using the `require-<foo>` target.
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.

None yet

1 participant