2001-07-05 Ben Elliston <bje@redhat.com>
[binutils-gdb.git] / gas / doc / Makefile.in
index f328d71af1cf98e69a8a5201256f5184d70c2293..98a513829352ea34148a09b1e385a7406b5fbdb5 100644 (file)
@@ -121,6 +121,13 @@ AUTOMAKE_OPTIONS = cygnus
 # What version of the manual you want; "all" includes everything
 CONFIG = all
 
+# Options to extract the man page from as.texinfo
+MANCONF = -Dman
+
+TEXI2POD = perl $(top_srcdir)/../etc/texi2pod.pl
+
+POD2MAN = pod2man --center="GNU" --release="binutils-$(VERSION)" --section=1
+
 man_MANS = as.1
 
 info_TEXINFOS = as.texinfo gasp.texi
@@ -140,6 +147,7 @@ CPU_DOCS = \
        c-m32r.texi \
        c-m68hc11.texi \
        c-m68k.texi \
+       c-m88k.texi \
        c-mips.texi \
        c-ns32k.texi \
        c-pdp11.texi \
@@ -448,6 +456,23 @@ gasver.texi: Makefile
 as.info: $(srcdir)/as.texinfo asconfig.texi gasver.texi $(CPU_DOCS)
 as.dvi: $(srcdir)/as.texinfo asconfig.texi gasver.texi $(CPU_DOCS)
 
+# Maintenance
+
+# We need it for the taz target in ../../Makefile.in.
+info: $(MANS)
+
+# Build the man page from the texinfo file
+# The sed command removes the no-adjust Nroff command so that
+# the man output looks standard.
+as.1: $(srcdir)/as.texinfo
+       touch $@
+       -$(TEXI2POD) $(MANCONF) < $(srcdir)/as.texinfo > as.pod
+       -($(POD2MAN) as.pod | \
+               sed -e '/^.if n .na/d' > $@.T$$$$ && \
+               mv -f $@.T$$$$ $@) || \
+               (rm -f $@.T$$$$ && exit 1)
+       rm -f as.pod
+
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT: