4e8fd07fa7fb6136b78456f35f64563cd9f05df9
[platform/upstream/groff.git] / contrib / gperl / Makefile.sub
1 # Makefile.sub for `gperl' (preprocessor for added Perl parts)
2
3 # File position: <groff-source>/contrib/gperl/Makefile.sub
4
5 # Copyright (C) 2014  Free Software Foundation, Inc.
6 # Written by Bernd Warken <groff-bernd.warken-72@web.de>.
7
8 # This file is part of `gperl' which is part of `groff'.
9
10 # `groff' is free software; you can redistribute it and/or modify it
11 # under the terms of the GNU General Public License as published by
12 # the Free Software Foundation, either version 2 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
16 # WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18 # General Public License 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
22 # <http://www.gnu.org/licenses/gpl-2.0.html>.
23
24 ########################################################################
25
26 MAN1=gperl.n
27
28 MOSTLYCLEANADD=gperl $(MAN1)
29
30 # not all make programs have $(RM) predefined.
31 RM=rm -f
32
33 all: gperl
34
35 gperl: gperl.pl
36         sed -f "$(SH_DEPS_SED_SCRIPT)" \
37             -e "s|@g@|$(g)|g" \
38             -e "s|@BINDIR@|$(DESTDIR)$(bindir)|g" \
39             -e "s|@VERSION@|$(version)$(revision)|g" \
40             -e "$(SH_SCRIPT_SED_CMD)" \
41             $(srcdir)/gperl.pl >$@; \
42         chmod +x $@
43
44 .PHONY: install_data
45 install_data: gperl
46         -test -d $(DESTDIR)$(bindir) || $(mkinstalldirs) $(DESTDIR)$(bindir)
47         $(RM) $(DESTDIR)$(bindir)/gperl
48         $(INSTALL_SCRIPT) gperl $(DESTDIR)$(bindir)/gperl
49
50 .PHONY: uninstall_sub
51 uninstall_sub:
52         $(RM) $(DESTDIR)$(bindir)/gperl
53
54
55 ########################################################################
56 # Emacs settings
57 ########################################################################
58 #
59 # Local Variables:
60 # mode: makefile
61 # End: