1 # Copyright (C) 2002-2018 Free Software Foundation, Inc.
2 # Written by Werner Lemberg (wl@gnu.org)
3 # Automake migration by Bertrand Garrigues
6 # This file is part of groff.
8 # groff is free software; you can redistribute it and/or modify it under
9 # the terms of the GNU General Public License as published by the Free
10 # Software Foundation, either version 3 of the License, or
11 # (at your option) any later version.
13 # groff is distributed in the hope that it will be useful, but WITHOUT ANY
14 # WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
18 # You should have received a copy of the GNU General Public License
19 # along with this program. If not, see <http://www.gnu.org/licenses/>.
21 mom_srcdir = $(top_srcdir)/contrib/mom
23 # pdfmom command used to generated .pdf
24 MOM_TFLAG = -M$(mom_srcdir)
25 MOM_KFLAG = -k -p -e -t
27 GROFF_COMMAND_PREFIX= \
28 GROFF_BIN_PATH="$(GROFF_BIN_PATH)" \
29 PDFMOM_BIN_PATH="$(top_builddir)" \
30 $(PDFMOMBIN) $(FFLAG) $(TFLAG) $(MOM_TFLAG) $(MOM_KFLAG)
32 man7_MANS += contrib/mom/groff_mom.7
34 # Files installed in $(tmacdir).
35 # MOMNORMALFILES are located in the source tree.
37 contrib/mom/mom.tmac \
39 momtmacdir = $(tmacdir)
40 dist_momtmac_DATA = $(MOMNORMALFILES)
42 # Files installed in htmldocdir/mom
43 if INSTALL_SHIPPED_HTML
45 contrib/mom/momdoc/stylesheet.css \
46 contrib/mom/momdoc/appendices.html \
47 contrib/mom/momdoc/color.html \
48 contrib/mom/momdoc/cover.html \
49 contrib/mom/momdoc/definitions.html \
50 contrib/mom/momdoc/docelement.html \
51 contrib/mom/momdoc/docprocessing.html \
52 contrib/mom/momdoc/goodies.html \
53 contrib/mom/momdoc/graphical.html \
54 contrib/mom/momdoc/headfootpage.html \
55 contrib/mom/momdoc/images.html \
56 contrib/mom/momdoc/inlines.html \
57 contrib/mom/momdoc/intro.html \
58 contrib/mom/momdoc/letters.html \
59 contrib/mom/momdoc/macrolist.html \
60 contrib/mom/momdoc/rectoverso.html \
61 contrib/mom/momdoc/refer.html \
62 contrib/mom/momdoc/reserved.html \
63 contrib/mom/momdoc/tables-of-contents.html \
64 contrib/mom/momdoc/toc.html \
65 contrib/mom/momdoc/typesetting.html \
66 contrib/mom/momdoc/using.html \
67 contrib/mom/momdoc/version-2.html
68 momhtmldir = $(htmldocdir)/mom
69 momhtml_DATA = $(MOMHTMLDOCFILES)
72 # Files installed in $(examplesdir)/mom. MOMEXAMPLEFILES are located
73 # in the source tree, while MOMPROCESSEDEXAMPLEFILES are generated in
76 contrib/mom/examples/letter.mom \
77 contrib/mom/examples/mom-pdf.mom \
78 contrib/mom/examples/mon_premier_doc.mom \
79 contrib/mom/examples/sample_docs.mom \
80 contrib/mom/examples/typesetting.mom \
81 contrib/mom/examples/README.txt \
82 contrib/mom/examples/README-fr.txt \
83 contrib/mom/examples/elvis_syntax \
84 contrib/mom/examples/elvis_syntax.new \
85 contrib/mom/examples/penguin.ps \
86 contrib/mom/examples/penguin.pdf \
87 contrib/mom/examples/mom.vim \
88 contrib/mom/examples/slide-demo.mom
90 momexampledir = $(exampledir)/mom
91 dist_momexample_DATA = $(MOMEXAMPLEFILES)
93 EXTRA_DIST += $(MOMEXAMPLEFILES)
97 MOMPROCESSEDEXAMPLEFILES = \
98 contrib/mom/examples/letter.pdf \
99 contrib/mom/examples/mom-pdf.pdf \
100 contrib/mom/examples/mon_premier_doc.pdf \
101 contrib/mom/examples/sample_docs.pdf \
102 contrib/mom/examples/typesetting.pdf \
103 contrib/mom/examples/slide-demo.pdf
104 momprocessedexampledir = $(exampledir)/mom
105 nodist_momprocessedexample_DATA = $(MOMPROCESSEDEXAMPLEFILES)
108 # Small test suite on mom examples
109 mom_TESTS = contrib/mom/examples/tests-mom.sh
110 TESTS += $(mom_TESTS)
111 contrib/mom/examples/tests-mom.sh: $(top_builddir)/config.status \
112 $(MOMPROCESSEDEXAMPLEFILES) $(top_srcdir)/contrib/mom/examples/test-mom.sh.in
113 sed -e "s|[@]abs_top_builddir[@]|$(abs_top_builddir)|g" \
114 -e "s|[@]groff_have_urw_fonts[@]|$(groff_have_urw_fonts)|g" \
115 $(top_srcdir)/contrib/mom/examples/test-mom.sh.in > $@
117 MOSTLYCLEANFILES += $(mom_TESTS)
120 EXTRA_DIST += contrib/mom/examples/test-mom.sh.in
122 # For this list of files we add a symlink from $(exampledir)/mom to $(pdfdocdir)
123 PDFDOCFILE = mom-pdf.pdf
125 EXTRA_DIST += $(MOMHTMLDOCFILES) $(MOMEXAMPLEFILES) \
127 contrib/mom/ChangeLog \
130 contrib/mom/copyright \
131 contrib/mom/groff_mom.7.man
133 MOSTLYCLEANFILES += \
134 $(MOMPROCESSEDEXAMPLEFILES) \
138 # Rule to generated .pdf files from .mom files
139 SUFFIXES += .mom .pdf
141 $(GROFF_V)$(MKDIR_P) `dirname $@` \
142 && LC_ALL=C $(MOMPDFMOM) $< >$@
144 $(MOMPROCESSEDEXAMPLEFILES): $(MOMNORMALFILES) \
145 groff troff gropdf pdfmom penguin.ps penguin.pdf \
146 gnu.eps font/devpdf/build_font_files
149 cp $(mom_srcdir)/examples/penguin.ps $@
151 cp $(mom_srcdir)/examples/penguin.pdf $@
153 install-data-hook: install_mom
156 for f in $(PDFDOCFILE); do \
157 $(RM) $(DESTDIR)$(pdfdocdir)/$$f; \
158 ln -s $(exampledir)/mom/$$f $(DESTDIR)$(pdfdocdir)/$$f; \
162 uninstall_groffdirs: uninstall_mom
164 for f in $(PDFDOCFILE); do \
165 $(RM) $(DESTDIR)$(pdfdocdir)/$$f; \
167 if test -d $(DESTDIR)$(exampledir)/mom; then \
168 rmdir $(DESTDIR)$(exampledir)/mom; \
170 if test -d $(DESTDIR)$(htmldocdir)/mom; then \
171 rmdir $(DESTDIR)$(htmldocdir)/mom; \
175 ########################################################################
178 # mode: makefile-automake
180 # vim: set filetype=automake: