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 — Handle virtual / phony make targets consistently and more robustly · Issue #104490 · python/cpython

Handle virtual / phony make targets consistently and more robustly #104490

New issue
Copy link
New issue
Copy link
Closed
#104491
Closed
Handle virtual / phony make targets consistently and more robustly#104490
#104491
Copy link
Labels
type-featureA feature request or enhancementA feature request or enhancement

Description

@indygreg
indygreg
opened on May 15, 2023
Issue body actions

Feature or enhancement

I already typed a detailed commit message explaining this. Will be explained by forthcoming PR linking to this issue.

Linked PRs

  • gh-104490: Consistently define phony make targets #104491

Activity

  1. indygreg
    added
    type-featureA feature request or enhancementA feature request or enhancement
    on May 15, 2023
  2. indygreg
    added a commit that references this issue on May 15, 2023

    pythongh-104490: consistently define phony make targets

    aafd614
  3. erlend-aasland commented on May 15, 2023

    @erlend-aasland
    erlend-aasland
    on May 15, 2023
    Contributor
    More actions

    The reason and rationale for the change is given in the PR (gh-104491). I'm quoting it here:

    By convention make targets that don't refer to a file have a dependency on the fake .PHONY target/file. This ensures that these targets are always evaluated because there is no rule to create a .PHONY file and that will force make to think the rule is out of date and needs to be rebuilt.

    This commit consistently associates our virtual targets with .PHONY by declaring the .PHONY dependency immediately above the make rule.

    Before, some .PHONY associations were inline (as this patch establishes). Others were defined in common blocks. Even others were defined incorrectly, actually assigning a .PHONY variable instead of operating on the make target!

    Before, not all virtual targets had .PHONY associations. And there were some defined .PHONY associations in common blocks whose targets had long been deleted.

    Hopefully the unified convention will prevent things from getting out of sync going forward.

    Why do this?

    First, consistency is good. Now people don't have to know to look for a separate block of .PHONY attribution. Hopefully this prevents missing .PHONY annotations going forward.

    Second, there are some cases where virtual make targets are virtual / phony when they shouldn't be. These are creating race conditions and avoidable rebuilds across multiple make invocations. e.g. a make all

    • make install invocation will perform PGO+BOLT if BOLT is enabled because profile-opt and bolt-opt are phony and always invoked. I plan follow-ups to this cleanup to fix some bugs I've run into.
  4. erlend-aasland
    linked a pull request that will close this issuegh-104490: Consistently define phony make targets #104491on May 15, 2023
  5. erlend-aasland
    closed this as completedin #104491on May 15, 2023
  6. erlend-aasland
    added a commit that references this issue on May 15, 2023

    gh-104490: Consistently define phony make targets (#104491)

    a6bcc8f
  7. carljm
    added 2 commits that reference this issue on May 15, 2023

    Merge branch 'main' into supermon

    343867a

    Merge branch 'main' into cached_property_docs

    452d9f5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-featureA feature request or enhancementA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      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.