Skip to contentSkip to conversation

tools: ynl: use ynl-gen -o instead of stdout in Makefile

PATCH Applied Jakub Kicinski 2 participants 2 messages Oct 10, 2023 – Oct 11, 2023

Subsystems (3)
lore
Share & tools
lore

Jakub Kicinski

author maintainer
#0 lore raw

PATCH 1/1 tools: ynl: use ynl-gen -o instead of stdout in Makefile

Jiri added more careful handling of output of the code generator to avoid wiping out existing files in
commit f65f305ae008 ("tools: ynl-gen: use temporary file for rendering") Make use of the -o option in the Makefiles, it is already used by ynl-regen.sh.

---
 tools/net/ynl/generated/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/net/ynl/generated/Makefile +2 -2
index 0f359ee3c46a..2f47b9cac757 100644
@@ -27,11 +27,11 @@ protos.a: $(OBJS)
 
 %-user.h: ../../../../Documentation/netlink/specs/%.yaml $(TOOL)
 	@echo -e "\tGEN $@"
-	@$(TOOL) --mode user --header --spec $< $(YNL_GEN_ARG_$*) > $@
+	@$(TOOL) --mode user --header --spec $< -o $@ $(YNL_GEN_ARG_$*)
 
 %-user.c: ../../../../Documentation/netlink/specs/%.yaml $(TOOL)
 	@echo -e "\tGEN $@"
-	@$(TOOL) --mode user --source --spec $< $(YNL_GEN_ARG_$*) > $@
+	@$(TOOL) --mode user --source --spec $< -o $@ $(YNL_GEN_ARG_$*)
 
 %-user.o: %-user.c %-user.h
 	@echo -e "\tCC $@"
Signature · 1 line
2.41.0
#1 lore raw
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 9 lines · On Tue, 10 Oct 2023 13:27:14 -0700 you wrote:

Jiri added more careful handling of output of the code generator to avoid wiping out existing files in
commit f65f305ae008 ("tools: ynl-gen: use temporary file for rendering") Make use of the -o option in the Makefiles, it is already used by ynl-regen.sh.

[...]

Here is the summary with links:
- [net-next] tools: ynl: use ynl-gen -o instead of stdout in Makefile

    https://git.kernel.org/netdev/net-next/c/cb7fb0aa3cd8

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html