blob: ac1411b24cd0230f7bccb109c1fa7a8894903b6e (
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
|
# Makefile.sub for `groffer' (integration into the `groff' source tree)
# File position: <groff-source>/contrib/groffer/Makefile.sub
# Copyright (C) 2001,2002,2005,2006 Free Software Foundation, Inc.
# Written by Werner Lemberg <wl@gnu.org> and Bernd Warken.
# Last update: 11 Oct 2006
# 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, 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 `groff'; see the files COPYING and LICENSE in the top
# directory of the `groff' source. If not, write to the Free Software
# Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA.
########################################################################
MAN1=groffer.n
CLEANADD=groffer PERL SHELL groffer.man groffer.n
# not all make programs have $(RM) predefined.
RM=rm -f
all: groffer
GROFFER_TOP=perl_test.pl version.sh
GROFFER_PERL=perl/groffer.pl perl/split_env.sh perl/func.pl perl/man.pl \
perl/groffer.man
GROFFER_SHELL=shell/groffer.sh shell/groffer2.sh shell/groffer.man
groffer: $(GROFFER_TOP) $(GROFFER_PERL) $(GROFFER_SHELL) $(SH_DEPS_SED_SCRIPT)
-@$(RM) $@
-@$(RM) groffer.man groffer.n
-@$(RM) PERL SHELL
-@chmod a+x perl/groffer.pl shell/groffer.sh
if perl perl_test.pl 2>&1 >/dev/null; then \
: >PERL; \
echo "Use groffer Perl version."; \
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|@VERSION@|$(version)$(revision)|g" \
-e "$(SH_SCRIPT_SED_CMD)" \
$(srcdir)/perl/groffer.pl >$@; \
cp perl/groffer.man groffer.man; \
else \
: >SHELL; \
echo "Use groffer shell version."; \
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|@VERSION@|$(version)$(revision)|g" \
-e "$(SH_SCRIPT_SED_CMD)" \
$(srcdir)/shell/groffer.sh >$@; \
cp shell/groffer.man groffer.man; \
fi
chmod a+x $@
install_data: groffer
-@test -d $(DESTDIR)$(bindir) || $(mkinstalldirs) $(DESTDIR)$(bindir)
-@test -d $(DESTDIR)$(libdir)/groff/groffer || \
$(mkinstalldirs) $(DESTDIR)$(libdir)/groff/groffer
-@$(RM) $(DESTDIR)$(bindir)/groffer
-@$(RM) $(DESTDIR)$(libdir)/groff/groffer/func.sh
-@$(RM) $(DESTDIR)$(libdir)/groff/groffer/man.sh
-@$(RM) $(DESTDIR)$(libdir)/groff/groffer/split_env.sh
-@$(RM) $(DESTDIR)$(libdir)/groff/groffer/perl_test.pl
-@$(RM) $(DESTDIR)$(libdir)/groff/groffer/groffer2.sh
-@$(RM) $(DESTDIR)$(libdir)/groff/groffer/version.sh
$(INSTALL_SCRIPT) groffer $(DESTDIR)$(bindir)/groffer
$(INSTALL_DATA) $(srcdir)/version.sh \
$(DESTDIR)$(libdir)/groff/groffer/version.sh; \
if test -f PERL; then \
$(INSTALL_SCRIPT) $(srcdir)/perl_test.pl \
$(DESTDIR)$(libdir)/groff/groffer/perl_test.pl; \
$(INSTALL_SCRIPT) $(srcdir)/perl/split_env.sh \
$(DESTDIR)$(libdir)/groff/groffer/split_env.sh; \
$(INSTALL_SCRIPT) $(srcdir)/perl/func.pl \
$(DESTDIR)$(libdir)/groff/groffer/func.pl; \
$(INSTALL_SCRIPT) $(srcdir)/perl/man.pl \
$(DESTDIR)$(libdir)/groff/groffer/man.pl; \
elif test -f SHELL; then \
$(INSTALL_SCRIPT) $(srcdir)/shell/groffer2.sh \
$(DESTDIR)$(libdir)/groff/groffer/groffer2.sh; \
fi;
uninstall_sub:
-$(RM) $(DESTDIR)$(bindir)/groffer
-$(RM) $(DESTDIR)$(libdir)/groff/groffer/func.sh
-$(RM) $(DESTDIR)$(libdir)/groff/groffer/man.sh
-$(RM) $(DESTDIR)$(libdir)/groff/groffer/split_env.sh
-$(RM) $(DESTDIR)$(libdir)/groff/groffer/perl_test.pl
-$(RM) $(DESTDIR)$(libdir)/groff/groffer/groffer2.sh
-$(RM) $(DESTDIR)$(libdir)/groff/groffer/version.sh
-rmdir $(DESTDIR)$(libdir)/groff/groffer
########################################################################
# Emacs settings
########################################################################
#
# Local Variables:
# mode: makefile
# End:
|