meson.build 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. foreach shutdown_man: ['shutdown.8', 'reboot.8', 'halt.8']
  28. custom_target(
  29. shutdown_man,
  30. input: 'shutdown.8.m4',
  31. output: shutdown_prefix + shutdown_man,
  32. command: [
  33. 'm4',
  34. '-DVERSION=' + version,
  35. '-DMONTH=' + month,
  36. '-DYEAR=' + year,
  37. '-DSHUTDOWN_PREFIX=' + shutdown_prefix,
  38. '@INPUT@'
  39. ],
  40. capture: true,
  41. install: true,
  42. install_dir: join_paths(get_option('mandir'), section),
  43. )
  44. endforeach
  45. endif