Skip to contentSkip to conversation

build: fix make distclean

PATCH In review Juergen Gross 4 participants 5 messages Jan 9, 2022 – Jan 11, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 build: fix make distclean

"make distclean" will complain that "-c" is no supported flag for make.

Fix that by using "-C".

The error has been present for a long time, but it was uncovered only recently.

Fixes 2400a9a365c5619 ("tools/debugger: Allow make to recurse into debugger/")
Fixes f9c9b127753e9ed ("tools: fix make distclean")
---
 tools/debugger/gdbsx/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/debugger/gdbsx/Makefile +1 -1
index 8d7cd94a31..5571450a89 100644
@@ -14,7 +14,7 @@ clean:
 
 .PHONY: distclean
 distclean: clean
-	set -e; for d in xg gx; do $(MAKE) -c $$d distclean; done
+	set -e; for d in xg gx; do $(MAKE) -C $$d distclean; done
 
 .PHONY: install
 install: all
Signature · 1 line
2.26.2
Reviewed-by Tested-by on v1 1/1
#1 lore raw
Quoted 11 lines · Juergen Gross

"make distclean" will complain that "-c" is no supported flag for make.

Fix that by using "-C".

The error has been present for a long time, but it was uncovered only recently.

Fixes 2400a9a365c5619 ("tools/debugger: Allow make to recurse into debugger/")
Fixes f9c9b127753e9ed ("tools: fix make distclean")

I just hit this. Thanks.

-Jason

Reviewed-by on v1 1/1
#2 lore raw
In reply to Juergen Gross
Quoted 6 lines · Juergen Gross

"make distclean" will complain that "-c" is no supported flag for make.

Fix that by using "-C".

The error has been present for a long time, but it was uncovered only recently.

And that's because the rule simply was unreachable before? Or it was reachable, but only via special (non-default) $(MAKE) invocations?

Quoted 2 lines
Fixes 2400a9a365c5619 ("tools/debugger: Allow make to recurse into debugger/")
Fixes f9c9b127753e9ed ("tools: fix make distclean")

To distinguish from this commit's title and to also identify the affected component, how about having "gdbsx" somewhere in the subject? (To be honest, with this title I wouldn't even have expected the issue is in the tool stack part of the tree.)

Quoted 1 line

Preferably with the above taken care of (which could be done while committing, provided suitable adjustment suggestions),

Jan

Quoted 11 lines
tools/debugger/gdbsx/Makefile +1 -1
@@ -14,7 +14,7 @@ clean:
 
 .PHONY: distclean
 distclean: clean
-	set -e; for d in xg gx; do $(MAKE) -c $$d distclean; done
+	set -e; for d in xg gx; do $(MAKE) -C $$d distclean; done
 
 .PHONY: install
 install: all
#3 lore raw
Quoted 10 lines · Jan Beulich
Quoted 6 lines · Juergen Gross

"make distclean" will complain that "-c" is no supported flag for make.

Fix that by using "-C".

The error has been present for a long time, but it was uncovered only recently.

And that's because the rule simply was unreachable before? Or it was reachable, but only via special (non-default) $(MAKE) invocations?

I just hit the bug during a top level "make distclean" and looked which commit introduced it. As it was really old, I looked for a more recent commit which could trigger the bug and found the rather recent one, making me believe that the wrong rule was never reached (other than by a "make" in the local directory of that rule).

I didn't spend more time on digging out whether the problem could have happened in other cases, too.

Quoted 7 lines
Quoted 2 lines
Fixes 2400a9a365c5619 ("tools/debugger: Allow make to recurse into debugger/")
Fixes f9c9b127753e9ed ("tools: fix make distclean")

To distinguish from this commit's title and to also identify the affected component, how about having "gdbsx" somewhere in the subject? (To be honest, with this title I wouldn't even have expected the issue is in the tool stack part of the tree.)

Hmm, yes, the prefix could be changed to "tools/debugger".

Quoted 6 lines
Quoted 2 lines

Preferably with the above taken care of (which could be done while committing, provided suitable adjustment suggestions),

Thanks,

Juergen

#4 lore raw
Quoted 24 lines · Juergen Gross
Quoted 10 lines · Jan Beulich
Quoted 6 lines · Juergen Gross

"make distclean" will complain that "-c" is no supported flag for make.

Fix that by using "-C".

The error has been present for a long time, but it was uncovered only recently.

And that's because the rule simply was unreachable before? Or it was reachable, but only via special (non-default) $(MAKE) invocations?

I just hit the bug during a top level "make distclean" and looked which commit introduced it. As it was really old, I looked for a more recent commit which could trigger the bug and found the rather recent one, making me believe that the wrong rule was never reached (other than by a "make" in the local directory of that rule).

I didn't spend more time on digging out whether the problem could have happened in other cases, too.

Quoted 3 lines
Quoted 2 lines
Fixes 2400a9a365c5619 ("tools/debugger: Allow make to recurse into debugger/")
Fixes f9c9b127753e9ed ("tools: fix make distclean")
Quoted 6 lines
Quoted 4 lines

To distinguish from this commit's title and to also identify the affected component, how about having "gdbsx" somewhere in the subject? (To be honest, with this title I wouldn't even have expected the issue is in the tool stack part of the tree.)

Hmm, yes, the prefix could be changed to "tools/debugger".

With that:

Thanks,

Signature · 1 line
Anthony PERARD