/contrib/groff/contrib/pdfmark/Makefile.sub

https://bitbucket.org/freebsd/freebsd-head/ · Unknown · 114 lines · 97 code · 17 blank · 0 comment · 0 complexity · 59af109be7d93c1b39ee01592c5b54e1 MD5 · raw file

  1. # Copyright (C) 2005, Free Software Foundation, Inc.
  2. # Written by Keith Marshall (keith.d.marshall@ntlworld.com)
  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. MAN1=\
  20. pdfroff.n
  21. CMDFILES=\
  22. pdfroff
  23. TMACFILES=\
  24. pdfmark.tmac \
  25. spdf.tmac
  26. PDFDOCFILES=\
  27. pdfmark.pdf
  28. CLEANADD=\
  29. gnu.eps \
  30. $(PDFDOCFILES) \
  31. $(CMDFILES)
  32. # Some `makes' don't predefine RM...
  33. RM=rm -f
  34. GROFF_BIN_DIR=$(top_builddir)/src/roff/groff
  35. GROFF_OTHER_BIN_DIRS=\
  36. $(top_builddir)/src/roff/troff \
  37. $(top_builddir)/src/devices/grops
  38. GROFF_BIN_DIRS=$(GROFF_BIN_DIR) $(GROFF_OTHER_BIN_DIRS)
  39. GROFF_BIN_PATH=`echo $(GROFF_BIN_DIRS) | sed -e 's| *|$(SH_SEP)|g'`
  40. FFLAG=-F$(top_builddir)/font -F$(top_srcdir)/font
  41. MFLAG=-M$(srcdir) -M$(top_builddir)/tmac -M$(top_srcdir)/tmac
  42. PFLAG=-dpaper=$(PAGE) -P-p$(PAGE)
  43. PDFROFF=\
  44. export GROFF_COMMAND_PREFIX; GROFF_COMMAND_PREFIX=''; \
  45. export GROFF_BIN_DIR; GROFF_BIN_DIR=$(GROFF_BIN_DIR); \
  46. export GROFF_BIN_PATH; GROFF_BIN_PATH=$(GROFF_BIN_PATH); \
  47. ./pdfroff $(FFLAG) $(MFLAG) $(PFLAG)
  48. .SUFFIXES: .ms .pdf
  49. .ms.pdf:
  50. $(RM) $@
  51. $(PDFROFF) -mspdf --stylesheet=$(srcdir)/cover.ms $< >$@
  52. all: pdfroff $(make_pdfdoc)
  53. pdfdoc: gnu.eps $(PDFDOCFILES)
  54. gnu.eps:
  55. if test -f $(top_srcdir)/doc/gnu.eps; then \
  56. cp $(top_srcdir)/doc/gnu.eps . ; \
  57. elif test -f $(top_builddir)/doc/gnu.eps; then \
  58. cp $(top_builddir)/doc/gnu.eps . ; \
  59. else \
  60. xpmtoppm $(top_srcdir)/doc/gnu.xpm | pnmdepth 15 | \
  61. $(pnmtops_nosetpage) -noturn -rle >$@ ; \
  62. fi
  63. pdfroff: pdfroff.sh $(SH_DEPS_SED_SCRIPT)
  64. $(RM) $@
  65. sed -f $(SH_DEPS_SED_SCRIPT) \
  66. -e "s|@VERSION@|$(version)$(revision)|" \
  67. -e "s|@GROFF_AWK_INTERPRETERS@|$(ALT_AWK_PROGS)|" \
  68. -e "s|@GROFF_GHOSTSCRIPT_INTERPRETERS@|$(ALT_GHOSTSCRIPT_PROGS)|" \
  69. -e "s|@GROFF_BIN_DIR@|$(bindir)|" $(srcdir)/pdfroff.sh >$@
  70. chmod +x $@
  71. install_data: $(make_install_pdfdoc)
  72. -test -d $(bindir) || $(mkinstalldirs) $(bindir)
  73. for f in $(CMDFILES); do \
  74. $(RM) $(bindir)/$$f; \
  75. $(INSTALL_SCRIPT) $$f $(bindir)/$$f; \
  76. done
  77. -test -d $(tmacdir) || $(mkinstalldirs) $(tmacdir)
  78. for f in $(TMACFILES); do \
  79. $(RM) $(tmacdir)/$$f; \
  80. $(INSTALL_DATA) $(srcdir)/$$f $(tmacdir)/$$f; \
  81. done
  82. install_pdfdoc:
  83. -test -d $(pdfdocdir) || $(mkinstalldirs) $(pdfdocdir)
  84. for f in $(PDFDOCFILES); do \
  85. $(RM) $(pdfdocdir)/$$f; \
  86. $(INSTALL_DATA) $$f $(pdfdocdir)/$$f; \
  87. done
  88. uninstall_sub:
  89. for f in $(CMDFILES); do \
  90. $(RM) $(bindir)/$$f; \
  91. done
  92. for f in $(TMACFILES); do \
  93. $(RM) $(tmacdir)/$$f; \
  94. done
  95. for f in $(PDFDOCFILES); do \
  96. $(RM) $(pdfdocdir)/$$f; \
  97. done