2
0

meson.build 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. # Included from top-level meson.build
  2. ## Generate man-pages
  3. # Dinit need 'm4' to gen man-pages
  4. foreach man: ['dinit-service.5', 'dinit.8', 'dinitcheck.8', 'dinitctl.8', 'dinit-monitor.8']
  5. section = 'man' + man.split('.')[1]
  6. custom_target(
  7. man,
  8. input: man + '.m4',
  9. output: man,
  10. command: [
  11. 'm4',
  12. '-DVERSION=' + version,
  13. '-DMONTH=' + month,
  14. '-DYEAR=' + year,
  15. '-DSHUTDOWN_PREFIX=' + shutdown_prefix,
  16. '-DDEFAULT_AUTO_RESTART=' + default_auto_restart,
  17. '-DDEFAULT_START_TIMEOUT=' + default_start_timeout,
  18. '-DDEFAULT_STOP_TIMEOUT=' + default_stop_timeout,
  19. '@INPUT@'
  20. ],
  21. capture: true,
  22. install: true,
  23. install_dir: join_paths(mandir, section),
  24. )
  25. endforeach
  26. if shutdown_built
  27. custom_target(
  28. 'shutdown.8',
  29. input: 'shutdown.8.m4',
  30. output: shutdown_prefix + 'shutdown.8',
  31. command: [
  32. 'm4',
  33. '-DVERSION=' + version,
  34. '-DMONTH=' + month,
  35. '-DYEAR=' + year,
  36. '-DSHUTDOWN_PREFIX=' + shutdown_prefix,
  37. '@INPUT@'
  38. ],
  39. capture: true,
  40. install: true,
  41. install_dir: join_paths(mandir, section)
  42. )
  43. foreach shutdown_man: ['reboot.8', 'soft-reboot.8', 'halt.8', 'poweroff.8']
  44. install_symlink(
  45. shutdown_prefix + shutdown_man,
  46. pointing_to: shutdown_prefix + 'shutdown.8',
  47. install_dir: join_paths(mandir, section)
  48. )
  49. endforeach
  50. endif