diff mbox series

[v2] Makefile: add rebuild

Message ID 20240117105843.1058338-1-wxjstz@126.com
State Rejected
Headers show
Series [v2] Makefile: add rebuild | expand

Commit Message

Xiang W Jan. 17, 2024, 10:57 a.m. UTC
Rebuild is useful when need a complete recompile.

Signed-off-by: Xiang W <wxjstz@126.com>
---

v2 changes
- Add Sob remove wrong Reviewed-by

 Makefile | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Andreas Schwab Jan. 17, 2024, 11:36 a.m. UTC | #1
On Jan 17 2024, Xiang W wrote:

> diff --git a/Makefile b/Makefile
> index de4e73a..17d0a22 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -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.
Xiang W Jan. 17, 2024, 12:18 p.m. UTC | #2
在 2024-01-17星期三的 12:36 +0100,Andreas Schwab写道:
> On Jan 17 2024, Xiang W wrote:
> 
> > diff --git a/Makefile b/Makefile
> > index de4e73a..17d0a22 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -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.
> 
Thanks, let's drop this patch.

Regards,
Xiang W
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index de4e73a..17d0a22 100644
--- a/Makefile
+++ b/Makefile
@@ -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: