1 # Copyright (C) 2006-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 hdtbl_srcdir = $(top_srcdir)/contrib/hdtbl
22 hdtbl_builddir = $(top_builddir)/contrib/hdtbl
24 man7_MANS += contrib/hdtbl/groff_hdtbl.7
26 # Groff command used to generate .ps files
27 HDTBL_TFLAG = -M$(hdtbl_srcdir) -M$(hdtbl_builddir)
28 HDTBL_PFLAG=-t -p -e -U
30 GROFF_COMMAND_PREFIX= \
31 GROFF_BIN_PATH="$(GROFF_BIN_PATH)" \
32 $(GROFFBIN) $(FFLAG) $(TFLAG) $(HDTBL_TFLAG) $(HDTBL_PFLAG)
34 # Files installed in $(tmacdir).
35 # These files are generated with 'strip.sed' from their unstripped source file
36 # equivalent (e.g. hdtbl.tmac is generated from hdtbl.tmac-u)
38 contrib/hdtbl/hdtbl.tmac \
39 contrib/hdtbl/hdmisc.tmac
40 hdtbltmacdir = $(tmacdir)
41 hdtbltmac_DATA = $(HDTBLSTRIPFILES)
43 # Files installed in $(exampledir)/hdtbl. HDTBLEXAMPLEFILES are
44 # located in the source tree, while HDTBLPROCESSEDEXAMPLEFILES are
45 # generated in the build tree.
47 # These files are handled by the '.in.roff' rule.
49 contrib/hdtbl/examples/fonts_n.roff \
50 contrib/hdtbl/examples/fonts_x.roff
52 contrib/hdtbl/examples/fonts_n.in \
53 contrib/hdtbl/examples/fonts_x.in \
54 contrib/hdtbl/examples/test-hdtbl.sh.in
57 contrib/hdtbl/examples/common.roff \
58 contrib/hdtbl/examples/chess_board.roff \
59 contrib/hdtbl/examples/color_boxes.roff \
60 contrib/hdtbl/examples/color_nested_tables.roff \
61 contrib/hdtbl/examples/color_table_cells.roff \
62 contrib/hdtbl/examples/color_transitions.roff \
63 contrib/hdtbl/examples/col_rowspan_colors.roff \
64 contrib/hdtbl/examples/mixed_pickles.roff \
65 contrib/hdtbl/examples/rainbow.roff \
66 contrib/hdtbl/examples/short_reference.roff
68 HDTBLPROCESSEDEXAMPLEFILES = \
69 contrib/hdtbl/examples/chess_board.ps \
70 contrib/hdtbl/examples/color_boxes.ps \
71 contrib/hdtbl/examples/color_nested_tables.ps \
72 contrib/hdtbl/examples/color_table_cells.ps \
73 contrib/hdtbl/examples/color_transitions.ps \
74 contrib/hdtbl/examples/col_rowspan_colors.ps \
75 contrib/hdtbl/examples/fonts_n.ps \
76 contrib/hdtbl/examples/fonts_x.ps \
77 contrib/hdtbl/examples/mixed_pickles.ps \
78 contrib/hdtbl/examples/rainbow.ps \
79 contrib/hdtbl/examples/short_reference.ps
81 hdtblexampledir = $(exampledir)/hdtbl
84 dist_hdtblexample_DATA = $(HDTBLEXAMPLEFILES)
85 nodist_hdtblexample_DATA = \
87 $(HDTBLPROCESSEDEXAMPLEFILES) \
90 EXTRA_DIST += $(HDTBLEXAMPLEFILES)
92 $(hdtblexample_DATA): $(HDTBLSTRIPFILES)
94 MOSTLYCLEANFILES += $(HDTBLGENFILES) $(HDTBLPROCESSEDEXAMPLEFILES) \
98 contrib/hdtbl/ChangeLog \
100 contrib/hdtbl/groff_hdtbl.7.man \
101 contrib/hdtbl/hdtbl.tmac-u \
102 contrib/hdtbl/hdmisc.tmac-u
105 hdtbl_TESTS = contrib/hdtbl/examples/test-hdtbl.sh
106 TESTS += $(hdtbl_TESTS)
107 contrib/hdtbl/examples/test-hdtbl.sh: $(top_builddir)/config.status \
108 $(HDTBLPROCESSEDEXAMPLEFILES) $(top_srcdir)/contrib/hdtbl/examples/test-hdtbl.sh.in
109 sed -e "s|[@]abs_top_builddir[@]|$(abs_top_builddir)|g" \
110 -e "s|[@]GHOSTSCRIPT[@]|$(GHOSTSCRIPT)|g" \
111 $(top_srcdir)/contrib/hdtbl/examples/test-hdtbl.sh.in > $@
113 MOSTLYCLEANFILES += $(hdtbl_TESTS)
116 # Rule to generate ps and roff files
117 SUFFIXES += .roff .in .ps
120 $(GROFF_V)$(MKDIR_P) `dirname $@` \
121 && $(HDTBLGROFF) -Tps \
122 -dfontpath=$(top_srcdir)/font \
123 -dsopath=$(hdtbl_srcdir)/ \
126 $(AM_V_GEN)$(MKDIR_P) `dirname $@` \
127 && sed -e "s|[@]fontdir[@]|$(fontdir)|" \
128 -e "s|[@]EGREP[@]|$(EGREP)|" $< >$@
131 $(HDTBLPROCESSEDEXAMPLEFILES): gnu.eps groff troff pic tbl \
132 contrib/hdtbl/examples/common.roff
134 $(HDTBLSTRIPFILES): $(top_srcdir)/tmac/strip.sed
135 @$(MKDIR_P) `dirname $@`
136 sed -f $(top_srcdir)/tmac/strip.sed $(hdtbl_srcdir)/`basename $@`-u > $@;
138 uninstall_groffdirs: uninstall-hdtbl-hook
139 uninstall-hdtbl-hook:
140 if test -d $(DESTDIR)$(hdtblexampledir); then \
141 rmdir $(DESTDIR)$(hdtblexampledir); \
145 ########################################################################
147 ########################################################################
150 # mode: makefile-automake
153 # vim: set filetype=automake textwidth=72: