1 # Copyright (C) 2005-2018 Free Software Foundation, Inc.
2 # Written by Keith Marshall (keith.d.marshall@ntlworld.com)
3 # Automake migration by Bertrand Garrigues
5 # Last update: 22 Aug 2015
7 # This file is part of groff.
9 # groff is free software; you can redistribute it and/or modify it under
10 # the terms of the GNU General Public License as published by the Free
11 # Software Foundation, either version 3 of the License, or
12 # (at your option) any later version.
14 # groff is distributed in the hope that it will be useful, but WITHOUT ANY
15 # WARRANTY; without even the implied warranty of MERCHANTABILITY or
16 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19 # You should have received a copy of the GNU General Public License
20 # along with this program. If not, see <http://www.gnu.org/licenses/>.
22 pdfmark_srcdir = $(top_srcdir)/contrib/pdfmark
23 pdfmark_builddir = $(top_builddir)/contrib/pdfmark
25 man1_MANS += contrib/pdfmark/pdfroff.1
27 bin_SCRIPTS += pdfroff
29 # Files installed in $(tmacdir)
31 contrib/pdfmark/pdfmark.tmac \
32 contrib/pdfmark/spdf.tmac
33 pdfmarktmacdir = $(tmacdir)
34 dist_pdfmarktmac_DATA = $(TMACFILES)
36 # Files installed in $(pdfdocdir)
38 contrib/pdfmark/pdfmark.pdf
40 pdfmarkpdfdocdir = $(pdfdocdir)
41 nodist_pdfmarkpdfdoc_DATA = $(PDFDOCFILES)
42 MOSTLYCLEANFILES += $(PDFDOCFILES)
44 EXTRA_DIST += $(PDFDOCFILES)
48 contrib/pdfmark/cover.ms \
49 contrib/pdfmark/pdfmark.ms \
50 contrib/pdfmark/ChangeLog \
51 contrib/pdfmark/README \
52 contrib/pdfmark/PROBLEMS \
53 contrib/pdfmark/TODO \
54 contrib/pdfmark/pdfroff.1.man \
55 contrib/pdfmark/pdfroff.sh
57 PDFMARK_PFLAG =-dpaper=$(PAGE) -P-p$(PAGE)
58 PDFMARK_TFLAG = -M$(pdfmark_srcdir)
61 GROFF_COMMAND_PREFIX= \
62 GROFF_BIN_DIR="$(GROFF_BIN_DIR)" \
63 GROFF_BIN_PATH="$(GROFF_BIN_PATH)" \
64 ./pdfroff --keep-temporary-files \
65 $(FFLAG) $(TFLAG) $(PDFMARK_TFLAG) $(PDFMARK_PFLAG)
67 contrib/pdfmark/pdfmark.pdf: contrib/pdfmark/pdfmark.ms
68 $(GROFF_V)$(MKDIR_P) `dirname $@` \
69 && $(PDFROFF) -mspdf --stylesheet=$(pdfmark_srcdir)/cover.ms \
70 $(top_srcdir)/contrib/pdfmark/pdfmark.ms >$@
72 # The pdf files use the local script to generate.
73 $(PDFDOCFILES): pdfroff groff troff gropdf
74 $(PDFDOCFILES): $(dist_devpsfont_DATA) $(nodist_devpsfont_DATA) gnu.eps
76 pdfroff: contrib/pdfmark/pdfroff.sh $(SH_DEPS_SED_SCRIPT)
77 $(AM_V_GEN)sed -f $(SH_DEPS_SED_SCRIPT) \
78 -e "s|[@]VERSION[@]|$(VERSION)|" \
79 -e "s|[@]GROFF_AWK_INTERPRETERS[@]|$(ALT_AWK_PROGS)|" \
80 -e "s|[@]GROFF_GHOSTSCRIPT_INTERPRETERS[@]|$(ALT_GHOSTSCRIPT_PROGS)|" \
81 -e "s|[@]GROFF_BIN_DIR[@]|$(bindir)|" $(pdfmark_srcdir)/pdfroff.sh \
85 mostlyclean-local: mostlyclean_pdfmark
87 rm -rf $(top_builddir)/pdfroff-*
89 uninstall_groffdirs: uninstall-pdfmark-hook
90 uninstall-pdfmark-hook:
92 if test -d $(DESTDIR)$(pdfmarkpdfdocdir); then \
93 rmdir $(DESTDIR)$(pdfmarkpdfdocdir); \
98 ########################################################################
100 ########################################################################
103 # mode: makefile-automake
106 # vim: set filetype=automake textwidth=72: