1## Process this file with automake to generate Makefile.in
2#
3#   Copyright (C) 2012-2024 Free Software Foundation, Inc.
4#
5# This file is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation; either version 3 of the License, or
8# (at your option) any later version.
9#
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13# GNU General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with this program; see the file COPYING3.  If not see
17# <http://www.gnu.org/licenses/>.
18#
19
20AUTOMAKE_OPTIONS = info-in-builddir foreign no-texinfo.tex
21
22PDFS  = gprofng.pdf
23HTMLS = gprofng.html
24
25# Options to extract the man page
26MANCONF = -Dman
27
28TEXI2POD = perl $(srcdir)/../../etc/texi2pod.pl $(AM_MAKEINFOFLAGS)
29POD2MAN = pod2man --center="User Commands" \
30	--release="binutils-$(VERSION)" --section=1
31
32info_TEXINFOS       = gprofng_ug.texi
33gprofng_ug_TEXINFOS = fdl.texi gp-macros.texi
34TEXINFO_TEX         = .
35MAKEINFOHTML        = $(MAKEINFO) --html --no-split
36
37man_MANS = gprofng.1 gp-archive.1 gp-collect-app.1 gp-display-html.1 gp-display-src.1 gp-display-text.1
38
39# Build the man page from the texinfo file
40# The sed command removes the no-adjust Nroff command so that
41# the man output looks standard.
42$(man_MANS): $(srcdir)/gp-macros.texi
43	$(AM_V_GEN)touch $@
44	$(AM_V_at)-$(TEXI2POD) $(MANCONF) < $(srcdir)/`basename $@ .1`.texi > $@.pod
45	$(AM_V_at)-($(POD2MAN) $@.pod | sed -e '/^.if n .na/d' > $@.tmp && \
46	  mv -f $@.tmp $@) || (rm -f $@.tmp && exit 1)
47	$(AM_V_at)rm -f $@.pod
48
49gprofng.1: $(srcdir)/gprofng.texi
50gp-archive.1: $(srcdir)/gp-archive.texi
51gp-collect-app.1: $(srcdir)/gp-collect-app.texi
52gp-display-html.1: $(srcdir)/gp-display-html.texi
53gp-display-src.1: $(srcdir)/gp-display-src.texi
54gp-display-text.1: $(srcdir)/gp-display-text.texi
55
56MAINTAINERCLEANFILES = gprofng.info $(man_MANS)
57EXTRA_DIST = $(man_MANS) version.texi
58
59info: $(man_MANS)
60