manpage.m4
上传用户:xu_441
上传日期:2007-01-04
资源大小:1640k
文件大小:3k
源码类别:

Email客户端

开发平台:

Unix_Linux

  1. divert(-1)
  2. #
  3. # Copyright (c) 1999 Sendmail, Inc. and its suppliers.
  4. # All rights reserved.
  5. #
  6. # By using this file, you agree to the terms and conditions set
  7. # forth in the LICENSE file which can be found at the top level of
  8. # the sendmail distribution.
  9. #
  10. #
  11. #  Definitions for Makefile construction for sendmail
  12. #
  13. # $Id: manpage.m4,v 8.10 1999/10/27 05:17:55 gshapiro Exp $
  14. #
  15. divert(0)dnl
  16. define(`bldGET_MAN_SOURCE_NUM',
  17. `substr($1, eval(len($1) - 1))'dnl
  18. )dnl
  19. define(`bldGET_MAN_BASE_NAME',
  20. `substr($1, 0, eval(len($1) - 2))'dnl
  21. )dnl
  22. ifdef(`confNO_MAN_BUILD',, `
  23. bldPUSH_TARGET(`${MANPAGES}')
  24. bldPUSH_INSTALL_TARGET(`install-docs')')
  25. bldLIST_PUSH_ITEM(`bldMAN_PAGES', `bldSOURCES')dnl
  26. MANOWN= ifdef(`confMANOWN', `confMANOWN', `bin')
  27. MANGRP= ifdef(`confMANGRP', `confMANGRP', `bin')
  28. MANMODE=ifdef(`confMANMODE', `confMANMODE', `444')
  29. MANROOT=ifdef(`confMANROOT', `confMANROOT', `/usr/share/man/cat')
  30. MANROOTMAN=ifdef(`confMANROOTMAN', `confMANROOTMAN', `/usr/share/man/man')
  31. MAN1= ${MANROOT}ifdef(`confMAN1', `confMAN1', `1')
  32. MAN1MAN=${MANROOTMAN}ifdef(`confMAN1', `confMAN1', `1')
  33. MAN1EXT=ifdef(`confMAN1EXT', `confMAN1EXT', `1')
  34. MAN1SRC=ifdef(`confMAN1SRC', `confMAN1SRC', `0')
  35. MAN3= ${MANROOT}ifdef(`confMAN3', `confMAN3', `3')
  36. MAN3MAN=${MANROOTMAN}ifdef(`confMAN3', `confMAN3', `3')
  37. MAN3EXT=ifdef(`confMAN3EXT', `confMAN3EXT', `3')
  38. MAN3SRC=ifdef(`confMAN3SRC', `confMAN3SRC', `0')
  39. MAN4= ${MANROOT}ifdef(`confMAN4', `confMAN4', `4')
  40. MAN4MAN=${MANROOTMAN}ifdef(`confMAN4', `confMAN4', `4')
  41. MAN4EXT=ifdef(`confMAN4EXT', `confMAN4EXT', `4')
  42. MAN4SRC=ifdef(`confMAN4SRC', `confMAN4SRC', `0')
  43. MAN5= ${MANROOT}ifdef(`confMAN5', `confMAN5', `5')
  44. MAN5MAN=${MANROOTMAN}ifdef(`confMAN5', `confMAN5', `5')
  45. MAN5EXT=ifdef(`confMAN5EXT', `confMAN5EXT', `5')
  46. MAN5SRC=ifdef(`confMAN5SRC', `confMAN5SRC', `0')
  47. MAN8= ${MANROOT}ifdef(`confMAN8', `confMAN8', `8')
  48. MAN8MAN=${MANROOTMAN}ifdef(`confMAN8', `confMAN8', `8')
  49. MAN8EXT=ifdef(`confMAN8EXT', `confMAN8EXT', `8')
  50. MAN8SRC=ifdef(`confMAN8SRC', `confMAN8SRC', `0')
  51. define(`bldMAN_TARGET_NAME', 
  52. `bldGET_MAN_BASE_NAME($1).${MAN`'bldGET_MAN_SOURCE_NUM($1)`SRC}' 'dnl
  53. )dnl
  54. MANPAGES= bldFOREACH(`bldMAN_TARGET_NAME(', `bldMAN_PAGES')
  55. divert(bldTARGETS_SECTION)
  56. define(`bldMAN_BUILD_CMD',
  57. `bldGET_MAN_BASE_NAME($1).${MAN`'bldGET_MAN_SOURCE_NUM($1)`SRC}': bldGET_MAN_BASE_NAME($1).bldGET_MAN_SOURCE_NUM($1)
  58. ${NROFF} ${MANDOC} bldGET_MAN_BASE_NAME($1).bldGET_MAN_SOURCE_NUM($1) > bldGET_MAN_BASE_NAME($1)`.${MAN'bldGET_MAN_SOURCE_NUM($1)`SRC}' || ${CP} bldGET_MAN_BASE_NAME($1)`.${MAN'bldGET_MAN_SOURCE_NUM($1)`SRC}'.dist bldGET_MAN_BASE_NAME($1)`.${MAN'bldGET_MAN_SOURCE_NUM($1)`SRC}''
  59. )dnl
  60. bldFOREACH(`bldMAN_BUILD_CMD(', `bldMAN_PAGES')
  61. install-docs: ${MANPAGES}
  62. ifdef(`confNO_MAN_INSTALL', `divert(-1)', `dnl')
  63. define(`bldMAN_INSTALL_CMD', 
  64. ` ${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} bldGET_MAN_BASE_NAME($1).`${MAN'bldGET_MAN_SOURCE_NUM($1)`SRC}' `${DESTDIR}${MAN'bldGET_MAN_SOURCE_NUM($1)}/bldGET_MAN_BASE_NAME($1)`.${MAN'bldGET_MAN_SOURCE_NUM($1)`EXT}'
  65. ifdef(`confINSTALL_RAWMAN', 
  66. ` ${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} bldGET_MAN_BASE_NAME($1).`${MAN'bldGET_MAN_SOURCE_NUM($1)`EXT}' `${DESTDIR}${MAN'bldGET_MAN_SOURCE_NUM($1)`MAN}'/bldGET_MAN_BASE_NAME($1)`.${MAN'bldGET_MAN_SOURCE_NUM($1)`EXT}'', `dnl')'
  67. )dnl
  68. bldFOREACH(`bldMAN_INSTALL_CMD(', `bldMAN_PAGES')
  69. ifdef(`confNO_MAN_INSTALL', `divert(0)', `dnl')
  70. divert(0)