]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Nest: Minor cleanup in buildsystem
authorOndrej Zajicek <santiago@crfreenet.org>
Wed, 1 Feb 2023 15:15:13 +0000 (16:15 +0100)
committerOndrej Zajicek <santiago@crfreenet.org>
Wed, 1 Feb 2023 16:31:18 +0000 (17:31 +0100)
There ware missing dependencies for proto-build.c generation, which
sometimes lead to failed builds, and ignores changes in the set of
built protocols. Fix that, and also improve formatting of proto-build.c

nest/Makefile

index a2e30ee2ca53138b525e5671ad89b3210b7f707b..05a2a9c005f45bd6dbabe6a334d981b484ea7cb8 100644 (file)
@@ -3,9 +3,11 @@ obj := $(src-o-files)
 $(all-daemon)
 $(cf-local)
 
-$(objdir)/nest/proto-build.c: $(lastword $(MAKEFILE_LIST))
+$(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)echo "\n $(patsubst %, void %_build(void);\n,$(PROTO_BUILD))\nvoid protos_build_gen(void) {\n $(patsubst %, %_build();\n,$(PROTO_BUILD))}" > $@
+
+prepare: $(o)proto-build.c
 
 tests_src := a-set_test.c a-path_test.c
 tests_targets := $(tests_targets) $(tests-target-files)