Trepan-Debuggers / Trepan-Debuggers/remake

`#:` task description doesn't work if target is prefixed with `.PHONY` declaration

Open
#144 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
850
Forks
80
PR merge metrics
No merged PRs in 30d

Description

The best practice is to:

add each phony target as a prerequisite of .PHONY immediately before the target declaration, rather than listing all the phony targets in a single place.

However, if I put a remake task description in front of it, remake --tasks won't show it because .PHONY is a target of its own.

Example:

#: This is the main target
.PHONY: all
all:
    echo "Executing all ..."

Workarounds:

  1. Leave out the .PHONY declaration as in your example and risk hard to debug behavior when a file with the name of the target exists.
  2. Put the .PHONY declaration below the target or elsewhere and risk name mismatches or forgetting to declare phony targets. I've seen that happening even with .PHONY directly above the target.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the example with remake --tasks, keeping the #: description immediately before the .PHONY declaration. Compare that output with the workaround where .PHONY is placed elsewhere. Done means the task description for all is shown while retaining the adjacent .PHONY: all declaration.

Written by the indexing model from the issue text.

Assessment

Domain
build-system, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.