blob: b62cf0e9d9fd32d3a5a366c441dd41dc1fa71c65 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
|
# Automake rules for 'groffer'
# File position: <groff-source>/contrib/groffer/groffer.am
# Copyright (C) 2001-2015
# Free Software Foundation, Inc.
# Written by Werner Lemberg <wl@gnu.org> and
# Bernd Warken <groff-bernd.warken-72@web.de>.
# Automake migration by Bertrand Garrigues
# Last update: 22 Aug 2015
# This file is part of 'groffer' which is part of 'groff'.
# 'groff' is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
# 'groff' is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see
# <http://www.gnu.org/licenses/gpl-2.0.html>.
########################################################################
groffer_srcdir = $(top_srcdir)/contrib/groffer
# generated programs
ROFF2PROGS = \
roff2dvi \
roff2html \
roff2pdf \
roff2ps \
roff2text \
roff2x
# Generated man templates
ROFF2MAN = \
contrib/groffer/roff2dvi.1.man \
contrib/groffer/roff2html.1.man \
contrib/groffer/roff2pdf.1.man \
contrib/groffer/roff2ps.1.man \
contrib/groffer/roff2text.1.man \
contrib/groffer/roff2x.1.man
GROFFER_PERL = \
contrib/groffer/main_subs.pl \
contrib/groffer/man.pl \
contrib/groffer/split_env.sh \
contrib/groffer/subs.pl
GROFFER_REST = \
contrib/groffer/roff2.1.man \
contrib/groffer/version.sh \
contrib/groffer/groffer.1.man \
contrib/groffer/groffer.pl \
contrib/groffer/roff2.pl
EXTRA_DIST += $(GROFFER_PERL) $(GROFFER_REST) \
contrib/groffer/ChangeLog \
contrib/groffer/README \
contrib/groffer/README_PERL
# groffer_dir is set by a m4 macro
grofferdir = $(groffer_dir)
bin_SCRIPTS += groffer $(ROFF2PROGS)
groffer_DATA = $(GROFFER_PERL) contrib/groffer/version.sh
man1_MANS += \
contrib/groffer/groffer.1 \
contrib/groffer/roff2dvi.1 \
contrib/groffer/roff2html.1 \
contrib/groffer/roff2pdf.1 \
contrib/groffer/roff2ps.1 \
contrib/groffer/roff2text.1 \
contrib/groffer/roff2x.1
MOSTLYCLEANFILES += $(ROFF2MAN)
$(ROFF2PROGS): $(groffer_srcdir)/roff2.pl
cp $(groffer_srcdir)/roff2.pl $@;
# we take roff2.man and replace the @ROFF2MODE@ by the type of file
# (dvi, pdf, html etc ...)
$(ROFF2MAN): $(groffer_srcdir)/roff2.1.man
@$(MKDIR_P) contrib/groffer
FILEMODE=`echo $@ | sed 's|contrib/groffer/roff2\([a-z][a-z]*\)\.1\.man|\1|g'` \
&& sed -e 's/[@]ROFF2MODE[@]/'"$$FILEMODE"'/g' $(groffer_srcdir)/roff2.1.man > $@;
groffer: $(GROFFER_PERL) $(GROFFER_REST) $(SH_DEPS_SED_SCRIPT)
echo "Using perl version of groffer."; \
sed -f "$(SH_DEPS_SED_SCRIPT)" \
-e "s|[@]g[@]|$(g)|g" \
-e "s|[@]BINDIR[@]|$(DESTDIR)$(bindir)|g" \
-e "s|[@]libdir[@]|$(DESTDIR)$(libdir)|g" \
-e "s|[@]groffer_dir[@]|$(DESTDIR)$(groffer_dir)|g" \
-e "s|[@]VERSION[@]|$(VERSION)|g" \
-e "$(SH_SCRIPT_SED_CMD)" \
$(groffer_srcdir)/groffer.pl >$@; \
chmod +x $@;
uninstall_groffdirs: uninstall-groffer-hook
uninstall-groffer-hook:
if test -d $(DESTDIR)$(grofferdir); then \
rmdir $(DESTDIR)$(grofferdir); \
fi
########################################################################
# Editor settings
########################################################################
#
# Local Variables:
# mode: makefile-automake
# fill-column: 72
# End:
# vim: set filetype=automake textwidth=72:
|