]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - binutils/doc/Makefile.am
* doc/Makefile.am (config.texi): Set top_srcdir.
[thirdparty/binutils-gdb.git] / binutils / doc / Makefile.am
1 ## Process this file with automake to generate Makefile.in
2
3 AUTOMAKE_OPTIONS = cygnus
4
5 # What version of the manual you want; "all" includes everything
6 CONFIG=all
7
8 # Options to extract the man page from as.texinfo
9 MANCONF = -Dman
10
11 TEXI2POD = perl $(top_srcdir)/../etc/texi2pod.pl
12
13 POD2MAN = pod2man --center="GNU Development Tools" \
14 --release="binutils-$(VERSION)" --section=1
15
16 # List of man pages generated from binutils.texi
17 man_MANS = \
18 addr2line.1 \
19 ar.1 \
20 dlltool.1 \
21 nlmconv.1 \
22 nm.1 \
23 objcopy.1 \
24 objdump.1 \
25 ranlib.1 \
26 readelf.1 \
27 size.1 \
28 strings.1 \
29 strip.1 \
30 windres.1 \
31 $(DEMANGLER_NAME).1
32
33 info_TEXINFOS = binutils.texi
34 binutils_TEXINFOS = config.texi
35 binutils_TEXI = $(srcdir)/binutils.texi
36
37 config.texi: $(srcdir)/../../bfd/configure $(binutils_TEXI)
38 rm -f config.texi
39 eval `grep '^ *VERSION=' $(srcdir)/../../bfd/configure`; \
40 echo "@set VERSION $$VERSION" > $@
41 echo "@set UPDATED `date "+%B %Y"`" >> config.texi
42 echo "@set top_srcdir $(top_srcdir)" >> config.texi
43
44 # Man page generation from texinfo
45 addr2line.1: $(binutils_TEXI)
46 touch $@
47 -$(TEXI2POD) $(MANCONF) -Daddr2line < $(binutils_TEXI) > addr2line.pod
48 -($(POD2MAN) addr2line.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
49 mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
50 rm -f addr2line.pod
51
52 ar.1: $(binutils_TEXI)
53 touch $@
54 -$(TEXI2POD) $(MANCONF) -Dar < $(binutils_TEXI) > ar.pod
55 -($(POD2MAN) ar.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
56 mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
57 rm -f ar.pod
58
59 dlltool.1: $(binutils_TEXI)
60 touch $@
61 -$(TEXI2POD) $(MANCONF) -Ddlltool < $(binutils_TEXI) > dlltool.pod
62 -($(POD2MAN) dlltool.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
63 mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
64 rm -f dlltool.pod
65
66 nlmconv.1: $(binutils_TEXI)
67 touch $@
68 -$(TEXI2POD) $(MANCONF) -Dnlmconv < $(binutils_TEXI) > nlmconv.pod
69 -($(POD2MAN) nlmconv.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
70 mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
71 rm -f nlmconv.pod
72
73 nm.1: $(binutils_TEXI)
74 touch $@
75 -$(TEXI2POD) $(MANCONF) -Dnm < $(binutils_TEXI) > nm.pod
76 -($(POD2MAN) nm.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
77 mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
78 rm -f nm.pod
79
80 objcopy.1: $(binutils_TEXI)
81 touch $@
82 -$(TEXI2POD) $(MANCONF) -Dobjcopy < $(binutils_TEXI) > objcopy.pod
83 -($(POD2MAN) objcopy.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
84 mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
85 rm -f objcopy.pod
86
87 objdump.1: $(binutils_TEXI)
88 touch $@
89 -$(TEXI2POD) $(MANCONF) -Dobjdump < $(binutils_TEXI) > objdump.pod
90 -($(POD2MAN) objdump.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
91 mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
92 rm -f objdump.pod
93
94 ranlib.1: $(binutils_TEXI)
95 touch $@
96 -$(TEXI2POD) $(MANCONF) -Dranlib < $(binutils_TEXI) > ranlib.pod
97 -($(POD2MAN) ranlib.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
98 mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
99 rm -f ranlib.pod
100
101 readelf.1: $(binutils_TEXI)
102 touch $@
103 -$(TEXI2POD) $(MANCONF) -Dreadelf < $(binutils_TEXI) > readelf.pod
104 -($(POD2MAN) readelf.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
105 mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
106 rm -f readelf.pod
107
108 size.1: $(binutils_TEXI)
109 touch $@
110 -$(TEXI2POD) $(MANCONF) -Dsize < $(binutils_TEXI) > size.pod
111 -($(POD2MAN) size.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
112 mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
113 rm -f size.pod
114
115 strings.1: $(binutils_TEXI)
116 touch $@
117 -$(TEXI2POD) $(MANCONF) -Dstrings < $(binutils_TEXI) > strings.pod
118 -($(POD2MAN) strings.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
119 mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
120 rm -f strings.pod
121
122 strip.1: $(binutils_TEXI)
123 touch $@
124 -$(TEXI2POD) $(MANCONF) -Dstrip < $(binutils_TEXI) > strip.pod
125 -($(POD2MAN) strip.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
126 mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
127 rm -f strip.pod
128
129 windres.1: $(binutils_TEXI)
130 touch $@
131 -$(TEXI2POD) $(MANCONF) -Dwindres < $(binutils_TEXI) > windres.pod
132 -($(POD2MAN) windres.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
133 mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
134 rm -f windres.pod
135
136 cxxfilt.man: $(binutils_TEXI)
137 touch $@
138 -$(TEXI2POD) $(MANCONF) -Dcxxfilt < $(binutils_TEXI) > $(DEMANGLER_NAME).pod
139 -($(POD2MAN) $(DEMANGLER_NAME).pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
140 mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
141 rm -f $(DEMANGLER_NAME).pod
142
143 MAINTAINERCLEANFILES = config.texi
144 MOSTLYCLEANFILES = $(DEMANGLER_NAME).1
145
146 $(DEMANGLER_NAME).1: cxxfilt.man Makefile
147 if test -f cxxfilt.man; then \
148 man=cxxfilt.man; \
149 else \
150 man=$(srcdir)/cxxfilt.man; \
151 fi; \
152 sed -e 's/@PROGRAM@/$(DEMANGLER_NAME)/' \
153 -e 's/cxxfilt/$(DEMANGLER_NAME)/' < $$man \
154 > $(DEMANGLER_NAME).1
155
156 # We want install to imply install-info as per GNU standards, despite the
157 # cygnus option.
158 install-data-local: install-info
159
160 # Maintenance
161
162 # We need it for the taz target in ../../Makefile.in.
163 info-local: $(MANS)