1 # Makefile.sub for `gpinyin' (preprocessor for added Perl parts)
3 # File position: <groff-source>/contrib/gpinyin/Makefile.sub
5 # Copyright (C) 2014 Free Software Foundation, Inc.
6 # Written by Bernd Warken <groff-bernd.warken-72@web.de>.
8 # This file is part of `gpinyin' which is part of `groff'.
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.
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.
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>.
24 ########################################################################
28 MOSTLYCLEANADD=gpinyin $(MAN1)
30 # not all make programs have $(RM) predefined.
36 sed -f "$(SH_DEPS_SED_SCRIPT)" \
38 -e "s|@BINDIR@|$(DESTDIR)$(bindir)|g" \
39 -e "s|@gpinyin_dir@|$(DESTIR)$(gpinyin_dir)|" \
40 -e "s|@VERSION@|$(version)$(revision)|g" \
41 -e "$(SH_SCRIPT_SED_CMD)" \
42 $(srcdir)/gpinyin.pl >$@; \
46 install_data: gpinyin subs.pl
47 test -d $(DESTDIR)$(bindir) || \
48 $(mkinstalldirs) $(DESTDIR)$(bindir); \
49 $(RM) $(DESTDIR)$(bindir)/gpinyin; \
50 $(INSTALL_SCRIPT) gpinyin $(DESTDIR)$(bindir)/gpinyin; \
51 test -d $(DESTDIR)$(gpinyin_dir) || \
52 $(mkinstalldirs) $(DESTDIR)$(gpinyin_dir); \
53 $(RM) $(DESTDIR)$(gpinyin_dir)/subs.pl; \
54 $(INSTALL_SCRIPT) $(srcdir)/subs.pl \
55 $(DESTDIR)$(gpinyin_dir)/subs.pl
59 $(RM) $(DESTDIR)$(bindir)/gpinyin; \
60 $(RM) $(DESTDIR)$(gpinyin_dir)/subs.pl;
61 -test -d $(DESTDIR)$(gpinyin_dir) && \
62 rmdir $(DESTDIR)$(gpinyin_dir)
65 ########################################################################
67 ########################################################################