]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Fix editing botch in comment, plus bit of cleanup in printed stuiff and comments
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Fri, 12 Jul 2024 08:33:06 +0000 (10:33 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Fri, 12 Jul 2024 08:33:06 +0000 (10:33 +0200)
pdns/recursordist/settings/generate.py

index dd7aec3615502d5c752b2917867f08342db34b51..94c8015b2af26bb31b7c58a7d4ae5789bac23404 100644 (file)
@@ -3,7 +3,7 @@
 # For C++ it generates cxxsettings-generated.cc containing support for old style
 # settings plus conversion from old style to new style.
 #
-# For Ruopenst it generates rust/src/lib.rs, containing the structs with
+# For Rust it generates rust/src/lib.rs, containing the structs with
 # CXX and Serde annotations and associated code. rust-preamble-in.rs is
 # included before the generated code and rus-bridge-in.rs inside the
 # bridge module in the generated lib.rs. Header files generated by CXX
@@ -768,13 +768,13 @@ def generate():
     gendir = '.'
     print(len(sys.argv))
     if len(sys.argv) == 3:
-        print("using ARGS!")
+        print("Using srcdir and gendir from argumens")
         srcdir = sys.argv[1]
         gendir = sys.argv[2]
 
-    print("cwd: " + os.getcwd())
-    print("srcdir: " + srcdir + " = " + os.path.realpath(srcdir))
-    print("gendir: " + gendir + " = " + os.path.realpath(gendir))
+    print("Generate cwd: " + os.getcwd())
+    print("Generate srcdir: " + srcdir + " = " + os.path.realpath(srcdir))
+    print("Generate gendir: " + gendir + " = " + os.path.realpath(gendir))
 
     #os.makedirs(gendir + '/rust/src', exist_ok=True)
     # read table
@@ -802,7 +802,10 @@ def generate():
         dupcheck1[entry['oldname']] = True
         dupcheck2[entry['section'] + '.' + entry['name']] = True
     # And generate C++, Rust and docs code based on table
+    # C++ code goes int build dir
     gen_cxx(gendir, entries)
+    # Generate Rust code into src dir, as I did not manage to figure out the Cargo stuff
+    # with mixed sources both in build and src dir
     gen_rust(srcdir, entries)
     # Avoid generating doc files in a sdist based build
     if os.path.isdir('../docs'):