Imported Upstream version 1.22.4
[platform/upstream/groff.git] / src / roff / grog / grog.am
1 # grog.am for 'grog'
2 #
3 # File position: <groff-source>/src/roff/grog/grog.am
4 #
5 # Copyright (C) 1993-2018 Free Software Foundation, Inc.
6 #
7 # Latest update: 22 Aug 2015
8 #
9 # This file is part of 'grog' which is part of 'groff'.
10 #
11 # 'groff' is free software; you can redistribute it and/or modify it
12 # under the terms of the GNU General Public License as published by
13 # the Free Software Foundation, either version 3 of the License, or
14 # (at your option) any later version.
15 #
16 # 'groff' is distributed in the hope that it will be useful, but
17 # WITHOUT ANY WARRANTY; without even the implied warranty of
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19 # General Public License for more details.
20 #
21 # You should have received a copy of the GNU General Public License
22 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
23
24 grog_srcdir = $(top_srcdir)/src/roff/grog
25 bin_SCRIPTS += grog
26 GROG = src/roff/grog/subs.pl
27
28 # grog_dir is defined by a m4 macro
29 grogdir = $(grog_dir)
30 dist_grog_DATA = $(GROG)
31 man1_MANS += src/roff/grog/grog.1
32 EXTRA_DIST += \
33   src/roff/grog/grog.1.man \
34   src/roff/grog/grog.pl
35
36 # Perl version works for all parts of 'groff'.
37
38 grog: $(grog_srcdir)/grog.pl $(GROG) $(SH_DEPS_SED_SCRIPT)
39         $(AM_V_GEN)$(RM) $@ \
40         && sed -f "$(SH_DEPS_SED_SCRIPT)" \
41                -e "1s|^\(#! \).*perl|\\1$(PERL)|" \
42                -e "s|[@]g[@]|$(g)|g" \
43                -e "s|[@]BINDIR[@]|$(DESTDIR)$(bindir)|g" \
44                -e "s|[@]libdir[@]|$(DESTDIR)$(libdir)|g" \
45                -e "s|[@]EGREP[@]|$(EGREP)|g" \
46                -e "s|[@]VERSION[@]|$(VERSION)|" \
47                -e "s|[@]grog_dir[@]|$(grog_dir)|" \
48                -e "$(SH_SCRIPT_SED_CMD)" \
49                $(grog_srcdir)/grog.pl \
50                >$@ \
51         && chmod +x $@
52
53
54 ########################################################################
55 # Editor settings
56 ########################################################################
57 #
58 # Local Variables:
59 # mode: makefile-automake
60 # fill-column: 72
61 # End:
62 # vim: set filetype=automake textwidth=72: