]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Add make -C rust clean when generate.py is run. 13252/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 13 Sep 2023 13:47:50 +0000 (15:47 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 13 Sep 2023 13:47:50 +0000 (15:47 +0200)
See comment for motivation. While working on the settings project,
I had this line, but I thouhgt it was no longer needed so I removed
it. It turns out it *is* needed. Found out when adding the
recursor.tcp_threads field.

pdns/recursordist/settings/Makefile.am

index 6e5952c9581ae9cc98417721c7fc5b8c6554efc8..536dc712e706e60977262e0f3d2bdd86a8e5a942 100644 (file)
@@ -12,8 +12,12 @@ all: cxxsettings-generated.cc
 
 BUILT_SOURCES=cxxsettings-generated.cc
 
-# It's a bit dirty that this target also generated a file inside rust/src (lib.rs)
+# It's a bit dirty that this target also generates a file inside rust/src (lib.rs). Also, we need to
+# clean in the Rust dir, as in some cases the Serde/CXX derive/generate code does not get re-run by
+# cargo after rust/src/lib.rs changed because of a generate.py run. In that case we end up with an
+# rust/src/lib.rs.h that does not contain e.g. field name or field type changes.
 cxxsettings-generated.cc: table.py generate.py rust-preamble-in.rs rust-bridge-in.rs docs-old-preamble-in.rst docs-new-preamble-in.rst
+       $(MAKE) -C rust clean
        $(PYTHON) generate.py
 
 clean-local: