Skip to content

Commit

Permalink
tools: ynl: use ynl-gen -o instead of stdout in Makefile
Browse files Browse the repository at this point in the history
Jiri added more careful handling of output of the code generator
to avoid wiping out existing files in
commit f65f305 ("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.

Link: https://lore.kernel.org/r/20231010202714.4045168-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Jakub Kicinski committed Oct 11, 2023
1 parent 0f07415 commit cb7fb0a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/net/ynl/generated/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 $@"
Expand Down

0 comments on commit cb7fb0a

Please sign in to comment.