1 # Copyright (C) 2002-2020 Free Software Foundation, Inc.
2 # Written by Werner Lemberg <wl@gnu.org>
3 # Automake migration by Bertrand Garrigues
4 # <bertrand.garrigues@laposte.net>
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 (at your
11 # option) any later version.
13 # groff is distributed in the hope that it will be useful, but WITHOUT
14 # ANY 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 generate .pdf
25 # Use '-K utf8', not '-k', in case 'configure' didn't find uchardet.
27 GROFF_COMMAND_PREFIX= \
28 GROFF_BIN_PATH="$(GROFF_BIN_PATH)" \
29 PDFMOM_BIN_PATH="$(top_builddir)" \
30 $(PDFMOMBIN) $(FFLAG) $(MFLAG) -M$(mom_srcdir) -K utf8 -p -e -t
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
44 contrib/mom/momdoc/stylesheet.css \
45 contrib/mom/momdoc/appendices.html \
46 contrib/mom/momdoc/color.html \
47 contrib/mom/momdoc/cover.html \
48 contrib/mom/momdoc/definitions.html \
49 contrib/mom/momdoc/docelement.html \
50 contrib/mom/momdoc/docprocessing.html \
51 contrib/mom/momdoc/goodies.html \
52 contrib/mom/momdoc/graphical.html \
53 contrib/mom/momdoc/headfootpage.html \
54 contrib/mom/momdoc/images.html \
55 contrib/mom/momdoc/inlines.html \
56 contrib/mom/momdoc/intro.html \
57 contrib/mom/momdoc/letters.html \
58 contrib/mom/momdoc/macrolist.html \
59 contrib/mom/momdoc/rectoverso.html \
60 contrib/mom/momdoc/refer.html \
61 contrib/mom/momdoc/reserved.html \
62 contrib/mom/momdoc/tables-of-contents.html \
63 contrib/mom/momdoc/toc.html \
64 contrib/mom/momdoc/typesetting.html \
65 contrib/mom/momdoc/using.html \
66 contrib/mom/momdoc/version-2.html
67 momhtmldir = $(htmldocdir)/mom
68 momhtml_DATA = $(MOMHTMLDOCFILES)
70 # Files installed in $(examplesdir)/mom. MOMEXAMPLEFILES are located
71 # in the source tree, while MOMPROCESSEDEXAMPLEFILES are generated in
74 contrib/mom/examples/letter.mom \
75 contrib/mom/examples/mom-pdf.mom \
76 contrib/mom/examples/mon_premier_doc.mom \
77 contrib/mom/examples/sample_docs.mom \
78 contrib/mom/examples/typesetting.mom \
79 contrib/mom/examples/README.txt \
80 contrib/mom/examples/README-fr.txt \
81 contrib/mom/examples/elvis_syntax \
82 contrib/mom/examples/elvis_syntax.new \
83 contrib/mom/examples/penguin.ps \
84 contrib/mom/examples/penguin.pdf \
85 contrib/mom/examples/mom.vim \
86 contrib/mom/examples/slide-demo.mom \
87 contrib/mom/examples/copyright-default.mom \
88 contrib/mom/examples/copyright-chapter.mom
89 momexampledir = $(exampledir)/mom
90 dist_momexample_DATA = $(MOMEXAMPLEFILES)
93 MOMPROCESSEDEXAMPLEFILES = \
94 contrib/mom/examples/letter.pdf \
95 contrib/mom/examples/mom-pdf.pdf \
96 contrib/mom/examples/mon_premier_doc.pdf \
97 contrib/mom/examples/sample_docs.pdf \
98 contrib/mom/examples/slide-demo.pdf \
99 contrib/mom/examples/copyright-default.pdf \
100 contrib/mom/examples/copyright-chapter.pdf
102 MOMPROCESSEDEXAMPLEFILES += contrib/mom/examples/typesetting.pdf
104 momprocessedexampledir = $(exampledir)/mom
105 nodist_momprocessedexample_DATA = $(MOMPROCESSEDEXAMPLEFILES)
108 mom_test_template = contrib/mom/examples/test-mom.sh.in
110 # Small test suite on mom examples
111 mom_TESTS = contrib/mom/examples/tests-mom.sh
112 TESTS += $(mom_TESTS)
113 contrib/mom/examples/tests-mom.sh: \
114 $(top_builddir)/config.status \
115 $(MOMPROCESSEDEXAMPLEFILES) \
116 $(top_srcdir)/$(mom_test_template)
118 -e "s|[@]abs_top_builddir[@]|$(abs_top_builddir)|g" \
119 -e "s|[@]groff_have_urw_fonts[@]|$(groff_have_urw_fonts)|g" \
120 $(top_srcdir)/$(mom_test_template) > $@ \
122 MOSTLYCLEANFILES += $(mom_TESTS)
123 EXTRA_DIST += $(mom_test_template)
125 # For this list of files we add a symlink from $(exampledir)/mom to $(pdfdocdir)
126 PDFDOCFILE = mom-pdf.pdf
128 EXTRA_DIST += $(MOMHTMLDOCFILES) $(MOMEXAMPLEFILES) \
130 contrib/mom/ChangeLog \
133 contrib/mom/copyright \
134 contrib/mom/groff_mom.7.man
136 MOSTLYCLEANFILES += \
137 $(MOMPROCESSEDEXAMPLEFILES) \
141 # rule to generate .pdf files from .mom files
142 SUFFIXES += .mom .pdf
144 $(GROFF_V)$(MKDIR_P) `dirname $@` \
145 && LC_ALL=C $(MOMPDFMOM) $< >$@
147 $(MOMPROCESSEDEXAMPLEFILES): $(MOMNORMALFILES) \
148 groff troff gropdf pdfmom penguin.ps penguin.pdf font/devpdf/stamp
151 $(AM_V_at)cp $(mom_srcdir)/examples/penguin.ps $@
153 $(AM_V_at)cp $(mom_srcdir)/examples/penguin.pdf $@
155 install-data-hook: install_mom
158 for f in $(PDFDOCFILE); do \
159 $(RM) $(DESTDIR)$(pdfdocdir)/$$f; \
160 ln -s $(exampledir)/mom/$$f $(DESTDIR)$(pdfdocdir)/$$f; \
164 uninstall_groffdirs: uninstall_mom
166 for f in $(PDFDOCFILE); do \
167 $(RM) $(DESTDIR)$(pdfdocdir)/$$f; \
169 -rmdir $(DESTDIR)$(pdfdocdir)
170 if test -d $(DESTDIR)$(exampledir)/mom; then \
171 rmdir $(DESTDIR)$(exampledir)/mom; \
173 if test -d $(DESTDIR)$(htmldocdir)/mom; then \
174 rmdir $(DESTDIR)$(htmldocdir)/mom; \
180 # mode: makefile-automake
182 # vim: set autoindent filetype=automake textwidth=72: