0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2025-01-23 09:21:53 +00:00

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.
This commit is contained in:
Ondrej Zajicek 2024-12-10 14:58:05 +01:00
parent cfac0076fb
commit 38a422d489

View File

@ -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