/contrib/groff/contrib/mom/Makefile.sub

https://bitbucket.org/freebsd/freebsd-head/ · Unknown · 138 lines · 119 code · 19 blank · 0 comment · 0 complexity · 3964b80605aa802207964fded3a6fc33 MD5 · raw file

  1. # Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
  2. # Written by Werner Lemberg (wl@gnu.org)
  3. #
  4. # This file is part of groff.
  5. #
  6. # groff is free software; you can redistribute it and/or modify it under
  7. # the terms of the GNU General Public License as published by the Free
  8. # Software Foundation; either version 2, or (at your option) any later
  9. # version.
  10. #
  11. # groff is distributed in the hope that it will be useful, but WITHOUT ANY
  12. # WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13. # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
  14. # for more details.
  15. #
  16. # You should have received a copy of the GNU General Public License along
  17. # with groff; see the file COPYING. If not, write to the Free Software
  18. # Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA.
  19. # These may be overridden if cross-compiling.
  20. GROFFBIN=$(top_builddir)/src/roff/groff/groff
  21. GROFF_BIN_PATH=`echo $(groff_bin_dirs) | sed -e 's| *|$(SH_SEP)|g'`
  22. groff_bin_dirs=\
  23. $(top_builddir)/src/roff/groff \
  24. $(top_builddir)/src/roff/troff \
  25. $(top_builddir)/src/devices/grops
  26. FFLAG=-F$(top_builddir)/font -F$(top_srcdir)/font
  27. TFLAG=-M$(top_builddir)/tmac -M$(top_srcdir)/tmac -M$(srcdir)
  28. GROFF=GROFF_COMMAND_PREFIX=''; \
  29. export GROFF_COMMAND_PREFIX; \
  30. GROFF_BIN_PATH=$(GROFF_BIN_PATH); \
  31. export GROFF_BIN_PATH; \
  32. $(GROFFBIN) $(FFLAG) $(TFLAG)
  33. MAN7=\
  34. groff_mom.n
  35. NORMALFILES=\
  36. mom.tmac \
  37. om.tmac
  38. HTMLDOCFILES=\
  39. momdoc/appendices.html \
  40. momdoc/color.html \
  41. momdoc/cover.html \
  42. momdoc/definitions.html \
  43. momdoc/docelement.html \
  44. momdoc/docprocessing.html \
  45. momdoc/goodies.html \
  46. momdoc/headfootpage.html \
  47. momdoc/inlines.html \
  48. momdoc/intro.html \
  49. momdoc/letters.html \
  50. momdoc/macrolist.html \
  51. momdoc/rectoverso.html \
  52. momdoc/refer.html \
  53. momdoc/reserved.html \
  54. momdoc/toc.html \
  55. momdoc/typemacdoc.html \
  56. momdoc/typesetting.html \
  57. momdoc/using.html
  58. EXAMPLEFILES=\
  59. examples/letter.mom \
  60. examples/sample_docs.mom \
  61. examples/typesetting.mom \
  62. examples/README.txt \
  63. examples/elvis_syntax \
  64. examples/elvis_syntax.new \
  65. examples/penguin.ps
  66. PROCESSEDEXAMPLEFILES=\
  67. examples/letter.ps \
  68. examples/sample_docs.ps \
  69. examples/typesetting.ps
  70. HTMLDOCFILES_=`echo $(HTMLDOCFILES) | sed 's|momdoc/||g'`
  71. EXAMPLEFILES_=`echo $(EXAMPLEFILES) | sed 's|examples/||g'`
  72. PROCESSEDEXAMPLEFILES_=`echo $(PROCESSEDEXAMPLEFILES) | sed 's|examples/||g'`
  73. CLEANADD=\
  74. penguin.ps \
  75. $(PROCESSEDEXAMPLEFILES) \
  76. examples/stamp
  77. .SUFFIXES: .mom .ps
  78. .mom.ps:
  79. $(GROFF) -Tps -mom $< >$@
  80. all: $(PROCESSEDEXAMPLEFILES)
  81. $(PROCESSEDEXAMPLEFILES): penguin.ps examples/stamp
  82. penguin.ps:
  83. cp $(srcdir)/examples/penguin.ps .
  84. examples/stamp:
  85. test -d examples || $(mkinstalldirs) examples
  86. touch $@
  87. install_data: $(NORMALFILES) $(HTMLDOCFILES) \
  88. $(EXAMPLEFILES) $(PROCESSEDEXAMPLEFILES)
  89. -test -d $(tmacdir) || $(mkinstalldirs) $(tmacdir)
  90. for f in $(NORMALFILES); do \
  91. rm -f $(tmacdir)/$$f; \
  92. $(INSTALL_DATA) $(srcdir)/$$f $(tmacdir)/$$f; \
  93. done
  94. -test -d $(htmldocdir)/mom || $(mkinstalldirs) $(htmldocdir)/mom
  95. for f in $(HTMLDOCFILES_); do \
  96. rm -f $(htmldocdir)/mom/$$f; \
  97. $(INSTALL_DATA) $(srcdir)/momdoc/$$f $(htmldocdir)/mom/$$f; \
  98. done
  99. -test -d $(exampledir)/mom || $(mkinstalldirs) $(exampledir)/mom
  100. for f in $(EXAMPLEFILES_); do \
  101. rm -f $(exampledir)/mom/$$f; \
  102. $(INSTALL_DATA) $(srcdir)/examples/$$f $(exampledir)/mom/$$f; \
  103. done
  104. for f in $(PROCESSEDEXAMPLEFILES_); do \
  105. rm -f $(exampledir)/mom/$$f; \
  106. $(INSTALL_DATA) examples/$$f $(exampledir)/mom/$$f; \
  107. done
  108. uninstall_sub:
  109. -for f in $(NORMALFILES); do \
  110. rm -f $(tmacdir)/$$f; \
  111. done
  112. -for f in $(HTMLDOCFILES_); do \
  113. rm -f $(htmldocdir)/mom/$$f; \
  114. done
  115. -rmdir $(htmldocdir)/mom
  116. -for f in $(EXAMPLEFILES_) $(PROCESSEDEXAMPLEFILES_); do \
  117. rm -f $(exampledir)/mom/$$f; \
  118. done
  119. -rmdir $(exampledir)/mom