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