Browse Source

meson: Respect `shutdown-prefix` in generated man-pages

Resolve "SHUTODWN_PREFIX" variables in source man-pages at compile time.


Reviewed-by: Davin McCall <EMAIL HIDDEN>
Signed-off-by: Mobin "Hojjat" Aydinfar <mobin@mobintestserver.ir>
Hojjat 1 year ago
parent
commit
bda50c359d
1 changed files with 16 additions and 2 deletions
  1. 16 2
      doc/manpages/meson.build

+ 16 - 2
doc/manpages/meson.build

@@ -8,7 +8,14 @@ foreach man: ['dinit-service.5', 'dinit.8', 'dinitcheck.8', 'dinitctl.8', 'dinit
         man,
         input: man + '.m4',
         output: man,
-        command: ['m4', '-DVERSION='+version, '-DMONTH='+month, '-DYEAR='+year, '@INPUT@'],
+        command: [
+            'm4',
+            '-DVERSION='+version,
+            '-DMONTH='+month,
+            '-DYEAR='+year,
+            '-DSHUTDOWN_PREFIX='+shutdown_prefix,
+            '@INPUT@'
+        ],
         capture: true,
         install: true,
         install_dir: join_paths(get_option('mandir'), section),
@@ -20,7 +27,14 @@ if shutdown_build
             shutdown_man,
             input: 'shutdown.8.m4',
             output: shutdown_prefix + shutdown_man,
-            command: ['m4', '-DVERSION='+version, '-DMONTH='+month, '-DYEAR='+year, '@INPUT@'],
+            command: [
+                'm4',
+                '-DVERSION='+version,
+                '-DMONTH='+month,
+                '-DYEAR='+year,
+                '-DSHUTDOWN_PREFIX='+shutdown_prefix,
+                '@INPUT@'
+            ],
             capture: true,
             install: true,
             install_dir: join_paths(get_option('mandir'), section),