summaryrefslogtreecommitdiff
path: root/src/roff/grog/grog.am
blob: a22038c8f8bd0b9b36a40310513b1b4bcc5178bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# grog.am for 'grog'
#
# Copyright (C) 1993-2020 Free Software Foundation, Inc.
#
# This file is part of 'grog' which is part of 'groff'.
#
# 'groff' is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# 'groff' is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

grog_srcdir = $(top_srcdir)/src/roff/grog
bin_SCRIPTS += grog
GROG = src/roff/grog/subs.pl

# grog_dir is defined by a m4 macro
grogdir = $(grog_dir)
dist_grog_DATA = $(GROG)
man1_MANS += src/roff/grog/grog.1
EXTRA_DIST += \
  src/roff/grog/grog.1.man \
  src/roff/grog/grog.pl

# Perl version works for all parts of 'groff'.

grog: $(grog_srcdir)/grog.pl $(GROG) $(SH_DEPS_SED_SCRIPT)
	$(AM_V_GEN)$(RM) $@ \
	&& sed -f "$(SH_DEPS_SED_SCRIPT)" \
	       -e "1s|^\(#! \).*perl|\\1$(PERL)|" \
	       -e "s|[@]g[@]|$(g)|g" \
	       -e "s|[@]BINDIR[@]|$(DESTDIR)$(bindir)|g" \
	       -e "s|[@]libdir[@]|$(DESTDIR)$(libdir)|g" \
	       -e "s|[@]EGREP[@]|$(EGREP)|g" \
	       -e "s|[@]VERSION[@]|$(VERSION)|" \
	       -e "s|[@]grog_dir[@]|$(grog_dir)|" \
	       -e "$(SH_SCRIPT_SED_CMD)" \
	       $(grog_srcdir)/grog.pl \
	       >$@ \
	&& chmod +x $@


# Local Variables:
# mode: makefile-automake
# fill-column: 72
# End:
# vim: set autoindent filetype=automake textwidth=72: