]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Meson: Conditionally generate bind-dnssec.schema.sqlite3.sql.h
authorFred Morcos <fred.morcos@open-xchange.com>
Mon, 28 Aug 2023 21:28:29 +0000 (23:28 +0200)
committerFred Morcos <fred.morcos@open-xchange.com>
Wed, 20 Mar 2024 12:28:48 +0000 (13:28 +0100)
pdns/meson.build

index 3e6ec3fd304d0cbd6d1d2ad9e77613cc1721c17f..1fcff743867d2cf857e2b07ebf85d1759ede8766 100644 (file)
@@ -330,20 +330,23 @@ libpdns_auth = declare_dependency(
   )
 )
 
-libpdns_bind_dnssec_schema = custom_target(
-  'libpdns-bind-dnssec-schema',
-  command: [
-    python_prog,
-    '@INPUT0@',
-    '@INPUT1@',
-  ],
-  input: [
-    'generate-bind-dnssec-schema.py',
-    'bind-dnssec.schema.sqlite3.sql',
-  ],
-  output: 'bind-dnssec.schema.sqlite3.sql.h',
-  capture: true,
-)
+libpdns_bind_dnssec_schema = 'bind-dnssec.schema.sqlite3.sql.h'
+if not fs.is_file('bind-dnssec.schema.sqlite3.sql.h')
+  libpdns_bind_dnssec_schema = custom_target(
+    'libpdns-bind-dnssec-schema',
+    command: [
+      python_prog,
+      '@INPUT0@',
+      '@INPUT1@',
+    ],
+    input: [
+      'generate-bind-dnssec-schema.py',
+      'bind-dnssec.schema.sqlite3.sql',
+    ],
+    output: 'bind-dnssec.schema.sqlite3.sql.h',
+    capture: true,
+  )
+endif
 libpdns_bind_dnssec_schema = declare_dependency(
   sources: [libpdns_bind_dnssec_schema],
 )