Run shfmt as part of the reformat target.
[tinc] / meson.build
index 1458015..488230e 100644 (file)
@@ -138,12 +138,7 @@ if os_name == 'linux' and not opt_systemd.disabled()
   subdir('systemd')
 endif
 
-prog_reformat = find_program('astyle', native: true, required: false)
-if prog_reformat.found()
-  run_target('reformat', command: [
-    prog_reformat,
-    '--options=@SOURCE_ROOT@/.astylerc', '--recursive',
-    '@SOURCE_ROOT@/*.c', '@SOURCE_ROOT@/*.h',
-  ])
-endif
-
+run_target('reformat', command: [
+  find_program('python3'),
+  '@SOURCE_ROOT@/reformat.py',
+])