Skip to content

Refactor Makefile to re-use targets via variables #1207

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 2 commits into from
Oct 30, 2023

Conversation

hugovk
Copy link
Member

@hugovk hugovk commented Oct 28, 2023

Reduce duplication by making many targets set a BUILDER variable and call the main html target.

This also makes it more similar to the CPython Docs and PEPs Makefiles, and makes things easier for us to maintain.


Also remove some redundant echoes. On main, make html ends like:

build succeeded.

The HTML pages are in _build/html.

Build finished. The HTML pages are in _build/html.

We don't need that extra final line. With this PR:

build succeeded.

The HTML pages are in _build/html.

Note: I left some echoes in there for some (unused?) targets like make man that don't finish building.


📚 Documentation preview 📚: https://cpython-devguide--1207.org.readthedocs.build/

Copy link
Collaborator

@willingc willingc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good @hugovk. Much cleaner.

@willingc willingc merged commit 42fb259 into python:main Oct 30, 2023
@hugovk hugovk deleted the refactor-makefile branch October 30, 2023 16:06
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.

3 participants