From: Ondrej Zajicek Date: Tue, 10 Dec 2024 13:58:05 +0000 (+0100) Subject: Build: Fix newlines in build of proto-build.c X-Git-Tag: v2.17~69 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=38a422d489121bd318b7df7d59d3792d5b6bd76b;p=thirdparty%2Fbird.git 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. --- diff --git a/nest/Makefile b/nest/Makefile index ef0fdf676..c6e172654 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