Trepan-Debuggers / Trepan-Debuggers/remake

remake -xn isn't the same as remake -nx

Open
#40 9 comments 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

remake -nx does perform a dry run; remake -xn does not.

The problem might seat between the keyboard and the chair, as I didn't extensively read the documentation (thus it could be intended behaviour, just unexpected for me); but I would expect them to perform the same.


System configuration

OS: Arch Linux
make: GNU Make 4.2.1
remake: GNU Make 4.2.1+dbg-1.4

Steps to reproduce

Example Makefile:

a:
	echo this was executed

Correct output

$ remake -nx
Reading makefiles...
Updating makefiles...
Updating goal targets...
 File 'a' does not exist.
Must remake target 'a'.
Makefile:2: target 'a' does not exist
##>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
echo this was executed
##<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Successfully remade target file 'a'.
$ remake --trace -n
Reading makefiles...
Updating makefiles...
Updating goal targets...
 File 'a' does not exist.
Must remake target 'a'.
Makefile:2: target 'a' does not exist
##>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
echo this was executed
##<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Successfully remade target file 'a'.
$ remake -x
Reading makefiles...
Updating makefiles...
Updating goal targets...
 File 'a' does not exist.
Must remake target 'a'.
Makefile:2: target 'a' does not exist
##>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
echo this was executed
##<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
this was executed
Successfully remade target file 'a'.

Unexpected output

$ remake -xn
Makefile:2: target 'a' does not exist
##>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
echo this was executed
##<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
this was executed

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

Start by reproducing the discrepancy with the Makefile shown in the issue, comparing remake -nx, remake --trace -n, remake -x, and remake -xn. Then trace the command-line option handling and dry-run behavior in the C sources. Done means -xn has the same dry-run behavior as -nx without executing the recipe.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
build-system, cli
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.