Skip to contentSkip to conversation

Makefile: add rebuild

PATCH Superseded Xiang W 2 participants 3 messages Jan 17, 2024 Kbuild

lore
Share & tools
lore

Xiang W

author
#0 lore raw

PATCH v2 1/1 Makefile: add rebuild

Rebuild is useful when need a complete recompile.

---

v2 changes
- Add Sob remove wrong Reviewed-by

 Makefile | 4 ++++
 1 file changed, 4 insertions(+)
Makefile +4 -0
index de4e73a..17d0a22 100644
@@ -688,5 +688,9 @@ endif
 	$(if $(V), @echo " RM        $(src_dir)/cscope*")
 	$(CMD_PREFIX)rm -f $(src_dir)/cscope*
 
+# Rule for "make rebuild"
+.PHONY: rebuild
+rebuild: clean all
+
 .PHONY: FORCE
 FORCE:
Signature · 1 line
2.43.0
#1 lore raw

PATCH v2 1/1 Makefile: add rebuild

Makefile endif · line 693

Quoted 11 lines · Xiang W
Makefile +3 -0
index de4e73a..17d0a22 100644
@@ -688,5 +688,9 @@ endif
 	$(if $(V), @echo " RM        $(src_dir)/cscope*")
 	$(CMD_PREFIX)rm -f $(src_dir)/cscope*
 
+# Rule for "make rebuild"
+.PHONY: rebuild
+rebuild: clean all

This will not work in a parallel build, since clean and all will be run in parallel.

Signature · 3 lines
Andreas Schwab, SUSE Labs, schwab at suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
author
#2 lore raw

PATCH v2 1/1 Makefile: add rebuild

? 2024-01-17???? 12:36 +0100?Andreas Schwab???

Quoted 17 lines · Xiang W

Makefile endif · line 693

Quoted 12 lines
Makefile +0 -0
index de4e73a..17d0a22 100644
@@ -688,5 +688,9 @@ endif
 ?	$(if $(V), @echo " RM??????? $(src_dir)/cscope*")

? $(CMD_PREFIX)rm -f $(src_dir)/cscope*
?

Makefile +3 -0
+# Rule for "make rebuild"
+.PHONY: rebuild
+rebuild: clean all

This will not work in a parallel build, since clean and all will be run in parallel.

Thanks, let's drop this patch.

Regards,
Xiang W