1 ## Process this file with automake to generate Makefile.in
3 # Copyright (C) 2012-2019 Free Software Foundation, Inc.
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.
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.
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/>.
20 AUTOMAKE_OPTIONS = info-in-builddir no-texinfo.tex foreign
22 # What version of the manual you want; "all" includes everything
25 # Options to extract the man page from as.texinfo
28 TEXI2POD = perl $(top_srcdir)/../etc/texi2pod.pl $(AM_MAKEINFOFLAGS)
30 POD2MAN = pod2man --center="GNU Development Tools" \
31 --release="binutils-$(VERSION)" --section=1
33 # List of man pages generated from binutils.texi
51 info_TEXINFOS = binutils.texi
52 binutils_TEXI = $(srcdir)/binutils.texi
54 AM_MAKEINFOFLAGS = -I "$(srcdir)" -I "$(top_srcdir)/../libiberty" \
55 -I "$(top_srcdir)/../bfd/doc" -I ../../bfd/doc
56 TEXI2DVI = texi2dvi -I "$(srcdir)" -I "$(top_srcdir)/../libiberty" \
57 -I "$(top_srcdir)/../bfd/doc" -I ../../bfd/doc
59 # Man page generation from texinfo
60 addr2line.1: $(binutils_TEXI) $(binutils_TEXINFOS)
62 -$(TEXI2POD) $(MANCONF) -Daddr2line < $(binutils_TEXI) > addr2line.pod
63 -($(POD2MAN) addr2line.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
64 mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
67 ar.1: $(binutils_TEXI) $(binutils_TEXINFOS)
69 -$(TEXI2POD) $(MANCONF) -Dar < $(binutils_TEXI) > ar.pod
70 -($(POD2MAN) ar.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
71 mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
74 dlltool.1: $(binutils_TEXI) $(binutils_TEXINFOS)
76 -$(TEXI2POD) $(MANCONF) -Ddlltool < $(binutils_TEXI) > dlltool.pod
77 -($(POD2MAN) dlltool.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
78 mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
81 nm.1: $(binutils_TEXI) $(binutils_TEXINFOS)
83 -$(TEXI2POD) $(MANCONF) -Dnm < $(binutils_TEXI) > nm.pod
84 -($(POD2MAN) nm.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
85 mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
88 objcopy.1: $(binutils_TEXI) $(binutils_TEXINFOS)
90 -$(TEXI2POD) $(MANCONF) -Dobjcopy < $(binutils_TEXI) > objcopy.pod
91 -($(POD2MAN) objcopy.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
92 mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
95 objdump.1: $(binutils_TEXI) $(binutils_TEXINFOS)
97 -$(TEXI2POD) $(MANCONF) -Dobjdump < $(binutils_TEXI) > objdump.pod
98 -($(POD2MAN) objdump.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
99 mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
102 ranlib.1: $(binutils_TEXI) $(binutils_TEXINFOS)
104 -$(TEXI2POD) $(MANCONF) -Dranlib < $(binutils_TEXI) > ranlib.pod
105 -($(POD2MAN) ranlib.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
106 mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
109 readelf.1: $(binutils_TEXI) $(binutils_TEXINFOS)
111 -$(TEXI2POD) $(MANCONF) -Dreadelf < $(binutils_TEXI) > readelf.pod
112 -($(POD2MAN) readelf.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
113 mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
116 size.1: $(binutils_TEXI) $(binutils_TEXINFOS)
118 -$(TEXI2POD) $(MANCONF) -Dsize < $(binutils_TEXI) > size.pod
119 -($(POD2MAN) size.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
120 mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
123 strings.1: $(binutils_TEXI) $(binutils_TEXINFOS)
125 -$(TEXI2POD) $(MANCONF) -Dstrings < $(binutils_TEXI) > strings.pod
126 -($(POD2MAN) strings.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
127 mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
130 strip.1: $(binutils_TEXI) $(binutils_TEXINFOS)
132 -$(TEXI2POD) $(MANCONF) -Dstrip < $(binutils_TEXI) > strip.pod
133 -($(POD2MAN) strip.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
134 mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
137 elfedit.1: $(binutils_TEXI) $(binutils_TEXINFOS)
139 -$(TEXI2POD) $(MANCONF) -Delfedit < $(binutils_TEXI) > elfedit.pod
140 -($(POD2MAN) elfedit.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
141 mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
144 windres.1: $(binutils_TEXI) $(binutils_TEXINFOS)
146 -$(TEXI2POD) $(MANCONF) -Dwindres < $(binutils_TEXI) > windres.pod
147 -($(POD2MAN) windres.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
148 mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
151 windmc.1: $(binutils_TEXI) $(binutils_TEXINFOS)
153 -$(TEXI2POD) $(MANCONF) -Dwindmc < $(binutils_TEXI) > windmc.pod
154 -($(POD2MAN) windmc.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
155 mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
158 cxxfilt.man: $(binutils_TEXI) $(binutils_TEXINFOS)
160 -$(TEXI2POD) $(MANCONF) -Dcxxfilt < $(binutils_TEXI) > $(DEMANGLER_NAME).pod
161 -($(POD2MAN) $(DEMANGLER_NAME).pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
162 mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
163 rm -f $(DEMANGLER_NAME).pod
165 MOSTLYCLEANFILES = $(DEMANGLER_NAME).1
167 $(DEMANGLER_NAME).1: cxxfilt.man Makefile
168 if test -f cxxfilt.man; then \
171 man=$(srcdir)/cxxfilt.man; \
173 sed -e 's/@PROGRAM@/$(DEMANGLER_NAME)/' \
174 -e 's/cxxfilt/$(DEMANGLER_NAME)/' < $$man \
175 > $(DEMANGLER_NAME).1
177 # We want install to imply install-info as per GNU standards, despite the
179 install-data-local: install-info
181 MAINTAINERCLEANFILES = binutils.info
183 # Automake 1.9 will only build info files in the objdir if they are
184 # mentioned in DISTCLEANFILES. It doesn't have to be unconditional,
185 # though, so we use a bogus condition.
187 DISTCLEANFILES = binutils.info
192 # We need it for the taz target in ../../Makefile.in.