Skip to contentSkip to conversation

tools/Rules.mk: fix distclean

PATCH In review Paul Durrant 4 participants 7 messages Jan 9, 2020 – Jan 14, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools/Rules.mk: fix distclean

Running 'make distclean' under tools will currently result in:

tools/Rules.mk:245: *** You have to run ./configure before building or installing the tools. Stop.

This patch adds 'distclean', 'subdir-distclean%' and 'subdir-clean%' to no-configure-targets, which allows 'make distclean' to run to completion.

---
Cc: Ian Jackson <[email protected]>
Cc: Wei Liu <[email protected]>

---
 tools/Rules.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/Rules.mk +1 -1
index 31cf419ef4..52f47be3f8 100644
@@ -239,7 +239,7 @@ subdir-all-% subdir-clean-% subdir-install-% subdir-uninstall-%: .phony
 subdir-distclean-%: .phony
 	$(MAKE) -C $* distclean
 
-no-configure-targets := clean subtree-force-update-all %-dir-force-update
+no-configure-targets := distclean subdir-distclean% clean subdir-clean% subtree-force-update-all %-dir-force-update
 ifeq (,$(filter $(no-configure-targets),$(MAKECMDGOALS)))
 $(XEN_ROOT)/config/Tools.mk:
 	$(error You have to run ./configure before building or installing the tools)
Signature · 7 lines
2.20.1


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#1 lore raw
Quoted 8 lines · Paul Durrant

Running 'make distclean' under tools will currently result in:

tools/Rules.mk:245: *** You have to run ./configure before building or installing the tools. Stop.

This patch adds 'distclean', 'subdir-distclean%' and 'subdir-clean%' to no-configure-targets, which allows 'make distclean' to run to completion.

Fixes 00691c6c90b

Sorry for not noticing the breakage while reviewing that patch.

Is there a way to pattern match all targets containing "clean"?

(Would have looked into it myself but -ETIME today)

Quoted 23 lines

---
Cc: Ian Jackson <[email protected]>
Cc: Wei Liu <[email protected]>

---
 tools/Rules.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/Rules.mk +1 -1
index 31cf419ef4..52f47be3f8 100644
@@ -239,7 +239,7 @@ subdir-all-% subdir-clean-% subdir-install-% subdir-uninstall-%: .phony
 subdir-distclean-%: .phony
 	$(MAKE) -C $* distclean
 
-no-configure-targets := clean subtree-force-update-all %-dir-force-update
+no-configure-targets := distclean subdir-distclean% clean subdir-clean% subtree-force-update-all %-dir-force-update
 ifeq (,$(filter $(no-configure-targets),$(MAKECMDGOALS)))
 $(XEN_ROOT)/config/Tools.mk:
 	$(error You have to run ./configure before building or installing the tools)
Signature · 1 line
2.20.1

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#2 lore raw
Quoted 17 lines

-----Original Message-----
From: Wei Liu <[email protected]>
Sent: 09 January 2020 13:52
To: Durrant, Paul <[email protected]>
Cc: [email protected]; Ian Jackson <[email protected]>; Wei Liu <[email protected]>; Anthony PERARD <[email protected]>
Subject: Re: [PATCH] tools/Rules.mk: fix distclean

Quoted 3 lines · Paul Durrant

Running 'make distclean' under tools will currently result in:

tools/Rules.mk:245: *** You have to run ./configure before building or

installing the tools. Stop.

Quoted 3 lines

This patch adds 'distclean', 'subdir-distclean%' and 'subdir-clean%' to no-configure-targets, which allows 'make distclean' to run to

Quoted 8 lines

completion.

Quoted 2 lines
Fixes 00691c6c90b

Sorry for not noticing the breakage while reviewing that patch.

Ok. I'm sure that could be added at commit if there are no other changes needed.

Quoted 3 lines

Is there a way to pattern match all targets containing "clean"?

(Would have looked into it myself but -ETIME today)

I couldn't persuade filter to match against patterns with multiple % so this was the best I could come up with.

Paul

Quoted 17 lines

tools/Rules.mk subdir-all-% subdir-clean-% subdir-install-% subdir-

Quoted 13 lines

---
Cc: Ian Jackson <[email protected]>
Cc: Wei Liu <[email protected]>

---
 tools/Rules.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/Rules.mk +0 -0
index 31cf419ef4..52f47be3f8 100644
@@ -239,7 +239,7 @@ subdir-all-% subdir-clean-% subdir-install-% subdir-

uninstall-%: .phony

Quoted 3 lines
tools/Rules.mk +0 -0
 subdir-distclean-%: .phony
 	$(MAKE) -C $* distclean
 
Quoted 11 lines

tools/Rules.mk subdir-all-% subdir-clean-% subdir-install-% subdir- · line 242

Quoted 1 line
tools/Rules.mk +0 -1
-no-configure-targets := clean subtree-force-update-all %-dir-force-

update

tools/Rules.mk subdir-all-% subdir-clean-% subdir-install-% subdir- · line 242

Quoted 1 line
tools/Rules.mk +1 -0
+no-configure-targets := distclean subdir-distclean% clean subdir-clean%

subtree-force-update-all %-dir-force-update

tools/Rules.mk subdir-all-% subdir-clean-% subdir-install-% subdir-uninstall-%: .phony

Quoted 3 lines
tools/Rules.mk +0 -0
 ifeq (,$(filter $(no-configure-targets),$(MAKECMDGOALS)))
 $(XEN_ROOT)/config/Tools.mk:
 	$(error You have to run ./configure before building or installing

the tools)

Quoted 3 lines

--
2.20.1

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#3 lore raw
Quoted 19 lines · Paul
Quoted 19 lines

-----Original Message-----
From: Wei Liu <[email protected]>
Sent: 09 January 2020 13:52
To: Durrant, Paul <[email protected]>
Cc: [email protected]; Ian Jackson <[email protected]>; Wei Liu <[email protected]>; Anthony PERARD <[email protected]>
Subject: Re: [PATCH] tools/Rules.mk: fix distclean

Quoted 3 lines · Paul Durrant

Running 'make distclean' under tools will currently result in:

tools/Rules.mk:245: *** You have to run ./configure before building or

installing the tools. Stop.

Quoted 3 lines

This patch adds 'distclean', 'subdir-distclean%' and 'subdir-clean%' to no-configure-targets, which allows 'make distclean' to run to

completion.

Quoted 1 line
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
Fixes 00691c6c90b

Sorry for not noticing the breakage while reviewing that patch.

Ok. I'm sure that could be added at commit if there are no other changes needed.

Yes. Sure.

Quoted 8 lines
Quoted 4 lines

Is there a way to pattern match all targets containing "clean"?

(Would have looked into it myself but -ETIME today)

I couldn't persuade filter to match against patterns with multiple % so this was the best I could come up with.

OK.

Wei.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#4 lore raw
Quoted 34 lines · Wei Liu
Quoted 19 lines · Paul
Quoted 19 lines

-----Original Message-----
From: Wei Liu <[email protected]>
Sent: 09 January 2020 13:52
To: Durrant, Paul <[email protected]>
Cc: [email protected]; Ian Jackson <[email protected]>; Wei Liu <[email protected]>; Anthony PERARD <[email protected]>
Subject: Re: [PATCH] tools/Rules.mk: fix distclean

Quoted 3 lines · Paul Durrant

Running 'make distclean' under tools will currently result in:

tools/Rules.mk:245: *** You have to run ./configure before building or

installing the tools. Stop.

Quoted 3 lines

This patch adds 'distclean', 'subdir-distclean%' and 'subdir-clean%' to no-configure-targets, which allows 'make distclean' to run to

completion.

Quoted 1 line
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
Fixes 00691c6c90b

Sorry for not noticing the breakage while reviewing that patch.

Ok. I'm sure that could be added at commit if there are no other changes needed.

Yes. Sure.

Quoted 3 lines
Quoted 3 lines

Is there a way to pattern match all targets containing "clean"?

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

(Would have looked into it myself but -ETIME today)

I couldn't persuade filter to match against patterns with multiple % so this was the best I could come up with.

OK.

If I hear no objection or suggestion for improvement today I will commit this patch.

Wei.

Quoted 2 lines

Wei.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

Acked-by on v1 1/1
#5 lore raw
In reply to Paul Durrant

Paul Durrant writes ("[PATCH] tools/Rules.mk: fix distclean"):

Quoted 6 lines

Running 'make distclean' under tools will currently result in:

tools/Rules.mk:245: *** You have to run ./configure before building or installing the tools. Stop.

This patch adds 'distclean', 'subdir-distclean%' and 'subdir-clean%' to no-configure-targets, which allows 'make distclean' to run to completion.

This seems sound to me, even though I think in the case where it makes a difference, `make distclean' will end up skipping most of the tools stuff since the makefiles aren't present.

Wei, do you agree with my analysis ?

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#6 lore raw
Quoted 8 lines · Ian Jackson

Paul Durrant writes ("[PATCH] tools/Rules.mk: fix distclean"):

Quoted 6 lines

Running 'make distclean' under tools will currently result in:

tools/Rules.mk:245: *** You have to run ./configure before building or installing the tools. Stop.

This patch adds 'distclean', 'subdir-distclean%' and 'subdir-clean%' to no-configure-targets, which allows 'make distclean' to run to completion.

Quoted 7 lines

This seems sound to me, even though I think in the case where it makes a difference, `make distclean' will end up skipping most of the tools stuff since the makefiles aren't present.

Wei, do you agree with my analysis ?

Yes.

Wei.

Quoted 2 lines

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel