GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Mark all targets in `Doc/Makefile` as `PHONY` by sobolevn · Pull Request #98189 · python/cpython

Conversation

@sobolevn

@sobolevn sobolevn commented Oct 11, 2022

Copy link
Copy Markdown
Member

Some of them were missing fro PHONY list. Some of them were in correct order.
Now order of PHONY and order of definitions match.

Docs on PHONY: https://www.gnu.org/software/make/manual/html_node/Phony-Targets.html

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@sobolevn
Mark all targets in Doc/Makefile as PHONY
d426477
@bedevere-bot bedevere-bot added the awaiting review label Oct 11, 2022
@sobolevn
sobolevn requested a review from JulienPalard October 11, 2022 19:33
@sobolevn sobolevn added skip issue skip news labels Oct 11, 2022
@JulienPalard
JulienPalard merged commit 4414586 into python:main Oct 12, 2022
@bedevere-bot bedevere-bot removed the awaiting review label Oct 12, 2022
@JulienPalard

JulienPalard commented Oct 12, 2022

Copy link
Copy Markdown
Member

Thanks! We should keep a better eye on this one ☺

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@zware

zware commented Oct 12, 2022

Copy link
Copy Markdown
Member

I've found it easier to keep track of .PHONY targets by doing something like:

.PHONY: help
help:
	@echo ...

.PHONY: build
build:
	...

.PHONY: html
html: BUILDER = html
html: build
	@echo ...

It's more verbose, and I am not certain that all makes will handle it correctly, but I've found this style much easier to keep up to date. Perhaps a consideration for the future?

hugovk reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@JulienPalard

JulienPalard commented Oct 12, 2022

Copy link
Copy Markdown
Member

Perhaps, yes.

Having the .PHONY near the rule is what I'm acustomed to do too, but I've seen many makefiles with all PHONY's on the same line like here.

I never heard about compatibility issues (but I'm only using GNU make so ... I'm not a reference).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sobolevn

sobolevn commented Oct 12, 2022

Copy link
Copy Markdown
Member Author

I am also using .PHONY on target level, example: https://github.com/sobolevn/git-secret/blob/master/Makefile#L12

I never got any complaints :)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sobolevn

sobolevn commented Oct 12, 2022

Copy link
Copy Markdown
Member Author

Thanks for the quick merge! 👍

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@hugovk hugovk mentioned this pull request Oct 14, 2022
Docs: Create venv if missing #98266
Closed
@hugovk

hugovk commented Oct 14, 2022

Copy link
Copy Markdown
Member

I've found it easier to keep track of .PHONY targets by doing something like:

.PHONY: help
help:
	@echo ...

.PHONY: build
build:
	...

.PHONY: html
html: BUILDER = html
html: build
	@echo ...

It's more verbose, and I am not certain that all makes will handle it correctly, but I've found this style much easier to keep up to date. Perhaps a consideration for the future?

Agreed, I expect it will happen again because it's normal to copy/paste a target and forget (or not know) to update the .PHONY line right at the top.

I was making some other fixes to the Makefile, so included this too: #98266

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

carljm added a commit to carljm/cpython that referenced this pull request Oct 14, 2022
@carljm
Merge branch 'main' into typewatch
6e53514
* main: (38 commits)
  pythongh-98251: Allow venv to pass along PYTHON* variables to pip and ensurepip when they do not impact path resolution (pythonGH-98259)
  Bpo-41246: IOCP Proactor avoid callback code duplication (python#21399)
  bpo-46364: Use sockets for stdin of asyncio only on AIX (python#30596)
  pythongh-98178: syslog() is not thread-safe on macOS (python#98213)
  Mark all targets in `Doc/Makefile` as `PHONY` (pythonGH-98189)
  pythongh-97982: Factorize PyUnicode_Count() and unicode_count() code (python#98025)
  pythongh-96265: Formatting changes for faq/general (python#98129)
  tutorial: remove "with single quotes" (python#98204)
  pythongh-97669: Remove Tools/scripts/startuptime.py (python#98214)
  signalmodule.c uses _PyErr_WriteUnraisableMsg() (python#98217)
  pythongh-97669: Fix test_tools reference leak (python#98216)
  pythongh-97669: Create Tools/patchcheck/ directory (python#98186)
  pythongh-65046: Link to logging cookbook from asyncio docs (python#98207)
  Formatting fixes in contextlib docs (python#98111)
  pythongh-95276: Add callable entry to the glossary (python#95738)
  pythongh-96130: Rephrase use of "typecheck" verb for clarity (python#98144)
  Fix some incorrect indentation around the main switch (python#98177)
  pythongh-98172: Fix formatting in `except*` docs (python#98173)
  pythongh-97982: Remove asciilib_count() (python#98164)
  pythongh-95756: Free and NULL-out code caches when needed (pythonGH-98181)
  ...
carljm added a commit to carljm/cpython that referenced this pull request Oct 14, 2022
@carljm
Merge branch 'main' into cached_property
0bb0c69
* main: (37 commits)
  pythongh-98251: Allow venv to pass along PYTHON* variables to pip and ensurepip when they do not impact path resolution (pythonGH-98259)
  Bpo-41246: IOCP Proactor avoid callback code duplication (python#21399)
  bpo-46364: Use sockets for stdin of asyncio only on AIX (python#30596)
  pythongh-98178: syslog() is not thread-safe on macOS (python#98213)
  Mark all targets in `Doc/Makefile` as `PHONY` (pythonGH-98189)
  pythongh-97982: Factorize PyUnicode_Count() and unicode_count() code (python#98025)
  pythongh-96265: Formatting changes for faq/general (python#98129)
  tutorial: remove "with single quotes" (python#98204)
  pythongh-97669: Remove Tools/scripts/startuptime.py (python#98214)
  signalmodule.c uses _PyErr_WriteUnraisableMsg() (python#98217)
  pythongh-97669: Fix test_tools reference leak (python#98216)
  pythongh-97669: Create Tools/patchcheck/ directory (python#98186)
  pythongh-65046: Link to logging cookbook from asyncio docs (python#98207)
  Formatting fixes in contextlib docs (python#98111)
  pythongh-95276: Add callable entry to the glossary (python#95738)
  pythongh-96130: Rephrase use of "typecheck" verb for clarity (python#98144)
  Fix some incorrect indentation around the main switch (python#98177)
  pythongh-98172: Fix formatting in `except*` docs (python#98173)
  pythongh-97982: Remove asciilib_count() (python#98164)
  pythongh-95756: Free and NULL-out code caches when needed (pythonGH-98181)
  ...
@hugovk hugovk mentioned this pull request Oct 21, 2022
Move .PHONY to each section to avoid copy/paste omissions python/devguide#972
Merged
@hugovk hugovk mentioned this pull request Nov 11, 2022
Docs: Move .PHONY to each section to avoid copy/paste omissions #99396
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@JulienPalard JulienPalard Awaiting requested review from JulienPalard

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

skip issue skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@sobolevn @JulienPalard @zware @hugovk @bedevere-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.