generate single html manual page by default
[deliverable/binutils-gdb.git] / binutils / doc / Makefile.am
CommitLineData
c45021f2 1## Process this file with automake to generate Makefile.in
5bf135a7 2#
250d07de 3# Copyright (C) 2012-2021 Free Software Foundation, Inc.
5bf135a7
NC
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#
c45021f2 19
d388f643 20AUTOMAKE_OPTIONS = info-in-builddir no-texinfo.tex foreign
c45021f2
NC
21
22# What version of the manual you want; "all" includes everything
23CONFIG=all
24
25# Options to extract the man page from as.texinfo
26MANCONF = -Dman
27
38fc1cb1 28TEXI2POD = perl $(top_srcdir)/../etc/texi2pod.pl $(AM_MAKEINFOFLAGS)
c45021f2 29
c7c55b78
NC
30POD2MAN = pod2man --center="GNU Development Tools" \
31 --release="binutils-$(VERSION)" --section=1
c45021f2
NC
32
33# List of man pages generated from binutils.texi
34man_MANS = \
35 addr2line.1 \
36 ar.1 \
37 dlltool.1 \
c45021f2
NC
38 nm.1 \
39 objcopy.1 \
40 objdump.1 \
41 ranlib.1 \
42 readelf.1 \
43 size.1 \
44 strings.1 \
45 strip.1 \
30fd33bb 46 elfedit.1 \
c45021f2 47 windres.1 \
692ed3e7 48 windmc.1 \
c45021f2
NC
49 $(DEMANGLER_NAME).1
50
51info_TEXINFOS = binutils.texi
42ecbf5e 52binutils_TEXI = $(srcdir)/binutils.texi
c45021f2 53
c428fa83 54AM_MAKEINFOFLAGS = -I "$(srcdir)" -I "$(top_srcdir)/../libiberty" \
2faf902d
MF
55 -I "$(top_srcdir)/../bfd/doc" -I ../../bfd/doc \
56 --no-split
c428fa83 57TEXI2DVI = texi2dvi -I "$(srcdir)" -I "$(top_srcdir)/../libiberty" \
9975e4c4 58 -I "$(top_srcdir)/../bfd/doc" -I ../../bfd/doc
c45021f2 59
c45021f2 60# Man page generation from texinfo
89ae5e69 61addr2line.1: $(binutils_TEXI)
c45021f2 62 touch $@
75aa6618 63 -$(TEXI2POD) $(MANCONF) -Daddr2line < $(binutils_TEXI) > addr2line.pod
4258bf4d 64 -($(POD2MAN) addr2line.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
c45021f2 65 mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
4258bf4d 66 rm -f addr2line.pod
c45021f2 67
89ae5e69 68ar.1: $(binutils_TEXI)
c45021f2 69 touch $@
75aa6618 70 -$(TEXI2POD) $(MANCONF) -Dar < $(binutils_TEXI) > ar.pod
4258bf4d 71 -($(POD2MAN) ar.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
c45021f2 72 mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
4258bf4d 73 rm -f ar.pod
c45021f2 74
89ae5e69 75dlltool.1: $(binutils_TEXI)
c45021f2 76 touch $@
75aa6618 77 -$(TEXI2POD) $(MANCONF) -Ddlltool < $(binutils_TEXI) > dlltool.pod
4258bf4d 78 -($(POD2MAN) dlltool.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
c45021f2 79 mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
4258bf4d 80 rm -f dlltool.pod
c45021f2 81
89ae5e69 82nm.1: $(binutils_TEXI)
c45021f2 83 touch $@
75aa6618 84 -$(TEXI2POD) $(MANCONF) -Dnm < $(binutils_TEXI) > nm.pod
4258bf4d 85 -($(POD2MAN) nm.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
c45021f2 86 mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
4258bf4d 87 rm -f nm.pod
c45021f2 88
89ae5e69 89objcopy.1: $(binutils_TEXI)
c45021f2 90 touch $@
75aa6618 91 -$(TEXI2POD) $(MANCONF) -Dobjcopy < $(binutils_TEXI) > objcopy.pod
4258bf4d 92 -($(POD2MAN) objcopy.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
c45021f2 93 mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
4258bf4d 94 rm -f objcopy.pod
c45021f2 95
89ae5e69 96objdump.1: $(binutils_TEXI)
c45021f2 97 touch $@
75aa6618 98 -$(TEXI2POD) $(MANCONF) -Dobjdump < $(binutils_TEXI) > objdump.pod
4258bf4d 99 -($(POD2MAN) objdump.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
c45021f2 100 mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
4258bf4d 101 rm -f objdump.pod
c45021f2 102
89ae5e69 103ranlib.1: $(binutils_TEXI)
c45021f2 104 touch $@
75aa6618 105 -$(TEXI2POD) $(MANCONF) -Dranlib < $(binutils_TEXI) > ranlib.pod
4258bf4d 106 -($(POD2MAN) ranlib.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
c45021f2 107 mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
4258bf4d 108 rm -f ranlib.pod
c45021f2 109
89ae5e69 110readelf.1: $(binutils_TEXI)
c45021f2 111 touch $@
75aa6618 112 -$(TEXI2POD) $(MANCONF) -Dreadelf < $(binutils_TEXI) > readelf.pod
4258bf4d 113 -($(POD2MAN) readelf.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
c45021f2 114 mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
4258bf4d 115 rm -f readelf.pod
c45021f2 116
89ae5e69 117size.1: $(binutils_TEXI)
c45021f2 118 touch $@
75aa6618 119 -$(TEXI2POD) $(MANCONF) -Dsize < $(binutils_TEXI) > size.pod
4258bf4d 120 -($(POD2MAN) size.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
c45021f2 121 mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
4258bf4d 122 rm -f size.pod
c45021f2 123
89ae5e69 124strings.1: $(binutils_TEXI)
c45021f2 125 touch $@
75aa6618 126 -$(TEXI2POD) $(MANCONF) -Dstrings < $(binutils_TEXI) > strings.pod
4258bf4d 127 -($(POD2MAN) strings.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
c45021f2 128 mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
4258bf4d 129 rm -f strings.pod
c45021f2 130
89ae5e69 131strip.1: $(binutils_TEXI)
c45021f2 132 touch $@
75aa6618 133 -$(TEXI2POD) $(MANCONF) -Dstrip < $(binutils_TEXI) > strip.pod
4258bf4d 134 -($(POD2MAN) strip.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
c45021f2 135 mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
4258bf4d 136 rm -f strip.pod
c45021f2 137
89ae5e69 138elfedit.1: $(binutils_TEXI)
30fd33bb
L
139 touch $@
140 -$(TEXI2POD) $(MANCONF) -Delfedit < $(binutils_TEXI) > elfedit.pod
141 -($(POD2MAN) elfedit.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
142 mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
143 rm -f elfedit.pod
144
89ae5e69 145windres.1: $(binutils_TEXI)
c45021f2 146 touch $@
75aa6618 147 -$(TEXI2POD) $(MANCONF) -Dwindres < $(binutils_TEXI) > windres.pod
4258bf4d 148 -($(POD2MAN) windres.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
c45021f2 149 mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
4258bf4d 150 rm -f windres.pod
c45021f2 151
89ae5e69 152windmc.1: $(binutils_TEXI)
692ed3e7
NC
153 touch $@
154 -$(TEXI2POD) $(MANCONF) -Dwindmc < $(binutils_TEXI) > windmc.pod
155 -($(POD2MAN) windmc.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
156 mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
157 rm -f windmc.pod
158
89ae5e69 159cxxfilt.man: $(binutils_TEXI)
c45021f2 160 touch $@
75aa6618 161 -$(TEXI2POD) $(MANCONF) -Dcxxfilt < $(binutils_TEXI) > $(DEMANGLER_NAME).pod
4258bf4d 162 -($(POD2MAN) $(DEMANGLER_NAME).pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
c45021f2 163 mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
4258bf4d 164 rm -f $(DEMANGLER_NAME).pod
c45021f2 165
9979ab66 166MAINTAINERCLEANFILES = $(man_MANS) binutils.info cxxfilt.man
c45021f2
NC
167
168$(DEMANGLER_NAME).1: cxxfilt.man Makefile
38131e67
L
169 if test -f cxxfilt.man; then \
170 man=cxxfilt.man; \
171 else \
172 man=$(srcdir)/cxxfilt.man; \
173 fi; \
4258bf4d 174 sed -e 's/@PROGRAM@/$(DEMANGLER_NAME)/' \
38131e67 175 -e 's/cxxfilt/$(DEMANGLER_NAME)/' < $$man \
c45021f2
NC
176 > $(DEMANGLER_NAME).1
177
178# Maintenance
179
180# We need it for the taz target in ../../Makefile.in.
42ecbf5e 181info-local: $(MANS)
This page took 0.805189 seconds and 4 git commands to generate.