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

Make the Makefile 'all' target phony and default #586

Merged
merged 3 commits into from
Oct 11, 2022

Conversation

mathisto
Copy link
Contributor

make it so

I noticed in the README, we are encouraging users to include the docs by default.

I also noticed the makefile had an empty all target. GNU make, when invoked without an explicit target, will snag the first one it finds.

This PR simply adds the default install and doc targets the default. I updated the README to reflect this as well.

@Euro20179
Copy link
Collaborator

Someone else said it was a bad idea to do this exact thing, I think they were just saying it's non-standard to do this, but I'm not sure.

@mathisto
Copy link
Contributor Author

Ahh, I see.

Gee willikers! Boy do I not like make.

So, I dug in a bit on this, and I think this is referencing 'standard targets for users'. It should be noted that this is not a POSIX requirement. The all target has no special meaning to make whatsoever. That being said, GNU manual does recommend that programs use it, and additionally admonishes it NOT include the docs.

So as to keep the all directive intact, useless as it is, I added the .DEFAULT_GOAL directive which does have special significance to make. This directive was added in v3.80. Version 3.80 just had its 20th birthday on the 3rd, so we should be good for portability, methinks.

Let me know what you think.

@Euro20179
Copy link
Collaborator

Euro20179 commented Oct 11, 2022

Version 3.80 just had its 20th birthday on the 3rd, so we should be good for portability, methinks.

Honestly you would think it would be portable, but I tried with the arch package bmake (bsd make) and it does nothing.

However, it also doesn't break bmake so I think it's fine, you would just have to do it the old way (bmake install doc), so you should probably keep the readme the same.

Thanks for doing the research on make btw.

@mathisto
Copy link
Contributor Author

OOOF. You know, I've never even used BSD and it makes feel downright silly sometimes.
Ok, I'll pull the readme changes. Thanks for working with me on this. ✋

@mathisto
Copy link
Contributor Author

@Euro20179 Euro20179 merged commit 582ecff into pystardust:development Oct 11, 2022
@mathisto mathisto deleted the makefile-all-target branch October 11, 2022 01:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants