From 38a422d489121bd318b7df7d59d3792d5b6bd76b Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Tue, 10 Dec 2024 14:58:05 +0100 Subject: [PATCH] Build: Fix newlines in build of proto-build.c Add newlines to the body of proto-build.c . Use printf instead of echo for portable handling of backslash sequences. Thanks to CCX for the change. --- nest/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nest/Makefile b/nest/Makefile index ef0fdf67..c6e17265 100644 --- a/nest/Makefile +++ b/nest/Makefile @@ -6,7 +6,7 @@ $(conf-y-targets): $(s)mpls.Y $(o)proto-build.c: Makefile $(lastword $(MAKEFILE_LIST)) $(objdir)/.dir-stamp $(E)echo GEN $@ - $(Q)echo "$(patsubst %,void %_build(void); ,$(PROTO_BUILD)) void protos_build_gen(void) { $(patsubst %, %_build(); ,$(PROTO_BUILD))}" > $@ + $(Q)( P='$(PROTO_BUILD)' && printf "void %s_build(void);\n" $$P && printf "\nvoid\nprotos_build_gen(void)\n{\n" && printf " %s_build();\n" $$P && printf "}\n" ) > $@ prepare: $(o)proto-build.c