tools: ynl: clean up make clean
Subsystems (3)
Jakub Kicinski
maintainerv2 cover tools: ynl: clean up make clean
First change renames the clean target which removes build results, to a more common name. Second one add missing .PHONY targets. Third one ensures that clean deletes __pycache__.
v2: add patch 2
v1: https://lore.kernel.org/all/[email protected]/
Jakub Kicinski (3):
tools: ynl: rename make hardclean -> distclean
tools: ynl: add distclean to .PHONY in all makefiles
tools: ynl: remove __pycache__ during clean
tools/net/ynl/Makefile | 4 ++-- tools/net/ynl/generated/Makefile | 4 ++-- tools/net/ynl/lib/Makefile | 5 +++-- tools/net/ynl/samples/Makefile | 4 ++-- 4 files changed, 9 insertions(+), 8 deletions(-)
Signature · 1 line
2.44.0
Jakub Kicinski
maintainerPATCH v2 1/3 tools: ynl: rename make hardclean -> distclean
The make target to remove all generated files used to be called "hardclean" because it deleted files which were tracked by git. We no longer track generated user space files, so use the more common "distclean" name.
--- tools/net/ynl/Makefile | 2 +- tools/net/ynl/generated/Makefile | 4 ++-- tools/net/ynl/lib/Makefile | 2 +- tools/net/ynl/samples/Makefile | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-)
tools/net/ynl/Makefile +1 -1
@@ -11,7 +11,7 @@ samples: | lib generated $(MAKE) -C $@ ; \ fi -clean hardclean: +clean distclean: @for dir in $(SUBDIRS) ; do \ if [ -f "$$dir/Makefile" ] ; then \ $(MAKE) -C $$dir $@; \
tools/net/ynl/generated/Makefile +2 -2
@@ -43,11 +43,11 @@ protos.a: $(OBJS) clean: rm -f *.o -hardclean: clean +distclean: clean rm -f *.c *.h *.a regen: @../ynl-regen.sh -.PHONY: all clean hardclean regen +.PHONY: all clean distclean regen .DEFAULT_GOAL: all
tools/net/ynl/lib/Makefile +1 -1
@@ -18,7 +18,7 @@ ynl.a: $(OBJS) clean: rm -f *.o *.d *~ -hardclean: clean +distclean: clean rm -f *.a %.o: %.c
tools/net/ynl/samples/Makefile +1 -1
@@ -28,7 +28,7 @@ $(BINS): ../lib/ynl.a ../generated/protos.a $(SRCS) clean: rm -f *.o *.d *~ -hardclean: clean +distclean: clean rm -f $(BINS) .PHONY: all clean
Signature · 1 line
2.44.0
Re: [PATCH net-next v2 1/3] tools: ynl: rename make hardclean -> distclean
Quoted 6 lines · Jakub Kicinski
The make target to remove all generated files used to be called "hardclean" because it deleted files which were tracked by git. We no longer track generated user space files, so use the more common "distclean" name.
Signed-off-by Jakub Kicinski <[email protected]>
Jakub Kicinski
maintainerPATCH v2 2/3 tools: ynl: add distclean to .PHONY in all makefiles
In reply to Jakub KicinskiDonald points out most YNL makefiles are missing distclean in .PHONY, even tho generated/Makefile does list it.
---
v2: new patch
--- tools/net/ynl/Makefile | 2 +- tools/net/ynl/lib/Makefile | 2 +- tools/net/ynl/samples/Makefile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
tools/net/ynl/Makefile +1 -1
@@ -18,4 +18,4 @@ samples: | lib generated fi \ done -.PHONY: clean all $(SUBDIRS) +.PHONY: all clean distclean $(SUBDIRS)
tools/net/ynl/lib/Makefile +1 -1
@@ -24,5 +24,5 @@ distclean: clean %.o: %.c $(COMPILE.c) -MMD -c -o $@ $< -.PHONY: all clean +.PHONY: all clean distclean .DEFAULT_GOAL=all
tools/net/ynl/samples/Makefile +1 -1
@@ -31,5 +31,5 @@ $(BINS): ../lib/ynl.a ../generated/protos.a $(SRCS) distclean: clean rm -f $(BINS) -.PHONY: all clean +.PHONY: all clean distclean .DEFAULT_GOAL=all
Signature · 1 line
2.44.0
Re: [PATCH net-next v2 2/3] tools: ynl: add distclean to .PHONY in all makefiles
Quoted 5 lines · Jakub Kicinski
Donald points out most YNL makefiles are missing distclean in .PHONY, even tho generated/Makefile does list it.
Suggested-by Donald Hunter <[email protected]>Signed-off-by Jakub Kicinski <[email protected]>
Jakub Kicinski
maintainerPATCH v2 3/3 tools: ynl: remove __pycache__ during clean
In reply to Jakub KicinskiBuild process uses python to generate the user space code. Remove __pycache__ on make clean.
--- tools/net/ynl/lib/Makefile | 1 + 1 file changed, 1 insertion(+)
tools/net/ynl/lib/Makefile +1 -0
@@ -17,6 +17,7 @@ ynl.a: $(OBJS) ar rcs $@ $(OBJS) clean: rm -f *.o *.d *~ + rm -rf __pycache__ distclean: clean rm -f *.a
Signature · 1 line
2.44.0
Re: [PATCH net-next v2 3/3] tools: ynl: remove __pycache__ during clean
Quoted 4 lines · Jakub Kicinski
Build process uses python to generate the user space code. Remove
__pycache__on make clean.Signed-off-by Jakub Kicinski <[email protected]>
This series was applied to netdev/net-next.git (main) by David S. Miller <[email protected]>:
Hello:
This series was applied to netdev/net-next.git (main) by David S. Miller <[email protected]>:
Quoted 8 lines · On Mon, 4 Mar 2024 21:13:25 -0800 you wrote:
First change renames the clean target which removes build results, to a more common name. Second one add missing .PHONY targets. Third one ensures that clean deletes
__pycache__.v2: add patch 2
v1: https://lore.kernel.org/all/[email protected]/[...]
Here is the summary with links:
- [net-next,v2,1/3] tools: ynl: rename make hardclean -> distclean
https://git.kernel.org/netdev/net-next/c/4e887471e8e3 - [net-next,v2,2/3] tools: ynl: add distclean to .PHONY in all makefiles https://git.kernel.org/netdev/net-next/c/1d8617b2a610 - [net-next,v2,3/3] tools: ynl: remove __pycache__ during clean https://git.kernel.org/netdev/net-next/c/72fa191bfdf6
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html