Imported Upstream version 1.22.4
[platform/upstream/groff.git] / contrib / gpinyin / gpinyin.am
1 # Automake rules for 'gpinyin' (preprocessor for added Perl parts)
2
3 # File position: <groff-source>/contrib/gpinyin/gpinyin.am
4
5 # Copyright (C) 2014-2018 Free Software Foundation, Inc.
6 # Written by Bernd Warken <groff-bernd.warken-72@web.de>.
7 # Moved to automake by Bertrand Garrigues
8
9 # Last update: 22 Aug 2015
10
11 # This file is part of 'gpinyin' which is part of 'groff'.
12
13 # 'groff' is free software; you can redistribute it and/or modify it
14 # under the terms of the GNU General Public License as published by
15 # the Free Software Foundation, either version 2 of the License, or
16 # (at your option) any later version.
17
18 # 'groff' is distributed in the hope that it will be useful, but
19 # WITHOUT ANY WARRANTY; without even the implied warranty of
20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
21 # General Public License for more details.
22
23 # You should have received a copy of the GNU General Public License
24 # along with this program.  If not, see
25 # <http://www.gnu.org/licenses/gpl-2.0.html>.
26
27 ########################################################################
28
29 gpinyin_srcdir = $(top_srcdir)/contrib/gpinyin
30 bin_SCRIPTS += gpinyin
31 gpinyindir = $(gpinyin_dir)
32 dist_gpinyin_DATA = contrib/gpinyin/subs.pl
33 man1_MANS += contrib/gpinyin/gpinyin.1
34 EXTRA_DIST += \
35   contrib/gpinyin/ChangeLog \
36   contrib/gpinyin/gpinyin.1.man \
37   contrib/gpinyin/gpinyin.pl
38
39 gpinyin: contrib/gpinyin/gpinyin.pl
40         $(AM_V_GEN)sed -f "$(SH_DEPS_SED_SCRIPT)" \
41             -e "s|[@]g[@]|$(g)|g" \
42             -e "s|[@]BINDIR[@]|$(DESTDIR)$(bindir)|g" \
43             -e "s|[@]gpinyin_dir[@]|$(DESTIR)$(gpinyin_dir)|" \
44             -e "s|[@]VERSION[@]|$(VERSION)|g" \
45             -e "$(SH_SCRIPT_SED_CMD)" \
46             $(gpinyin_srcdir)/gpinyin.pl \
47             >$@ \
48         && chmod +x $@
49
50 uninstall_groffdirs: uninstall-gpinyin-hook
51 uninstall-gpinyin-hook:
52         if test -d $(DESTDIR)$(gpinyindir); then \
53           rmdir $(DESTDIR)$(gpinyindir); \
54         fi
55
56
57 ########################################################################
58 # Editor settings
59 ########################################################################
60 #
61 # Local Variables:
62 # mode: makefile-automake
63 # fill-column: 72
64 # End:
65 # vim: set filetype=automake textwidth=72: