ca6c91eeb1cb05bf111f22357f999d83f7a5961c
[platform/upstream/groff.git] / src / utils / afmtodit / Makefile.sub
1 # Makefile.sub for `src utils afmtodit'
2 #
3 # File position: <groff-source>/src/utils/afmtodit/Makefile.sub
4 #
5 # Copyright (C) 2013-2014  Free Software Foundation, Inc.
6 #
7 # This file is part of groff.
8 #
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.
13 #
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
17 # for more details.
18 #
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/>.
21 #
22 ########################################################################
23
24 MAN1=afmtodit.n
25 MOSTLYCLEANADD=afmtodit
26 RM=rm -f
27
28 all: afmtodit
29
30 afmtodit: afmtodit.pl afmtodit.tables
31         if test -n "$(PERL)"; then \
32           sed -e "s|/usr/bin/perl|$(PERL)|" \
33               -e "s|@VERSION@|$(version)$(revision)|" \
34               -e "s|@FONTDIR@|$(fontdir)|" \
35               -e "/@afmtodit.tables@/ r $(srcdir)/afmtodit.tables" \
36               -e "/@afmtodit.tables@/ d" \
37               $(srcdir)/afmtodit.pl >afmtodit; \
38         else \
39           sed -e "s|@VERSION@|$(version)$(revision)|" \
40               -e "s|@FONTDIR@|$(fontdir)|" \
41               -e "/@afmtodit.tables@/ r $(srcdir)/afmtodit.tables" \
42               -e "/@afmtodit.tables@/ d" \
43               $(srcdir)/afmtodit.pl >afmtodit; \
44         fi
45         chmod +x afmtodit
46
47 install_data: afmtodit
48         -test -d $(DESTDIR)$(bindir) || $(mkinstalldirs) $(DESTDIR)$(bindir)
49         $(RM) $(DESTDIR)$(bindir)/afmtodit
50         $(INSTALL_SCRIPT) afmtodit $(DESTDIR)$(bindir)/afmtodit
51
52 uninstall_sub:
53         $(RM) $(DESTDIR)$(bindir)/afmtodit
54
55 ########################################################################
56 # Emacs settings
57 ########################################################################
58 #
59 # Local Variables:
60 # mode: makefile
61 # End: