Imported Upstream version 1.22.3
[platform/upstream/groff.git] / src / devices / gropdf / Makefile.sub
1 # Makefile.sub for `gropdf'
2 #
3 # File position: <groff-source>/src/devices/gropbf/Makefile.sub
4 #
5 # Copyright (C) 2011-2014  Free Software Foundation, Inc.
6 #      Written by Deri James <deri@chuzzlewit.demon.co.uk>
7 #
8 # This file is part of groff.
9 #
10 # groff is free software; you can redistribute it and/or modify it under
11 # the terms of the GNU General Public License as published by the Free
12 # Software Foundation, either version 3 of the License, or
13 # (at your option) any later version.
14 #
15 # groff is distributed in the hope that it will be useful, but WITHOUT ANY
16 # WARRANTY; without even the implied warranty of MERCHANTABILITY or
17 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
18 # for more details.
19 #
20 # You should have received a copy of the GNU General Public License
21 # along with this program. If not, see <http://www.gnu.org/licenses/>.
22 #
23 ########################################################################
24
25 MAN1=\
26   gropdf.n \
27   pdfmom.n
28
29 CMDFILES=\
30   gropdf \
31   pdfmom
32
33 MOSTLYCLEANADD=\
34   gropdf \
35   pdfmom \
36   $(MAN1)
37
38 RM=rm -f
39
40 all: gropdf pdfmom
41
42
43 gropdf: gropdf.pl $(SH_DEPS_SED_SCRIPT)
44         $(RM) $@
45         sed -f $(SH_DEPS_SED_SCRIPT) \
46             -e "s|@VERSION@|$(version)$(revision)|" \
47             -e "s|@PERL@|$(PERL)|" \
48             -e "s|@GROFF_FONT_DIR@|$(fontpath)|" \
49             -e "s|@RT_SEP@|$(RT_SEP)|" $(srcdir)/gropdf.pl >$@
50         chmod +x $@
51
52 pdfmom: pdfmom.pl $(SH_DEPS_SED_SCRIPT)
53         $(RM) $@
54         sed -f $(SH_DEPS_SED_SCRIPT) \
55             -e "s|@VERSION@|$(version)$(revision)|" \
56             -e "s|@PERL@|$(PERL)|" $(srcdir)/pdfmom.pl >$@
57         chmod +x $@
58
59 install_data:
60         -test -d $(DESTDIR)$(bindir) || $(mkinstalldirs) $(DESTDIR)$(bindir)
61         for f in $(CMDFILES); do \
62           $(RM) $(DESTDIR)$(bindir)/$$f; \
63           $(INSTALL_SCRIPT) $$f $(DESTDIR)$(bindir)/$$f; \
64         done
65
66 uninstall_sub:
67         -for f in $(CMDFILES); do $(RM) $(DESTDIR)$(bindir)/$$f; done
68
69 ########################################################################
70 # Emacs settings
71 ########################################################################
72 #
73 # Local Variables:
74 # mode: makefile
75 # End: