cc806ca3d80b7e9bab39e0113e4d2d83b717656b
[binutils-gdb.git] / gas / doc / Makefile.am
1 ## Process this file with automake to generate Makefile.in
2
3 AUTOMAKE_OPTIONS = 1.8 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 man_MANS = as.1
17
18 info_TEXINFOS = as.texinfo
19
20 asconfig.texi: $(CONFIG).texi
21 rm -f asconfig.texi
22 cp $(srcdir)/$(CONFIG).texi ./asconfig.texi
23 chmod u+w ./asconfig.texi
24 echo "@set top_srcdir $(top_srcdir)" >> ./asconfig.texi
25
26 CPU_DOCS = \
27 c-alpha.texi \
28 c-arc.texi \
29 c-arm.texi \
30 c-bfin.texi \
31 c-d10v.texi \
32 c-cris.texi \
33 c-h8300.texi \
34 c-hppa.texi \
35 c-i370.texi \
36 c-i386.texi \
37 c-i860.texi \
38 c-i960.texi \
39 c-ip2k.texi \
40 c-m32c.texi \
41 c-m32r.texi \
42 c-m68hc11.texi \
43 c-m68k.texi \
44 c-mips.texi \
45 c-mmix.texi \
46 c-mt.texi \
47 c-msp430.texi \
48 c-ns32k.texi \
49 c-pdp11.texi \
50 c-pj.texi \
51 c-ppc.texi \
52 c-sh.texi \
53 c-sh64.texi \
54 c-sparc.texi \
55 c-tic54x.texi \
56 c-vax.texi \
57 c-v850.texi \
58 c-xtensa.texi \
59 c-z80.texi \
60 c-z8k.texi
61
62 gasver.texi: $(srcdir)/../../bfd/configure
63 rm -f $@
64 eval `grep '^ *VERSION=' $(srcdir)/../../bfd/configure`; \
65 echo "@set VERSION $$VERSION" > $@
66
67 $(srcdir)/as.info as.dvi as.html: $(srcdir)/as.texinfo asconfig.texi gasver.texi $(CPU_DOCS)
68
69 # We want install to imply install-info as per GNU standards, despite the
70 # cygnus option.
71 install-data-local: install-info
72
73 html__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
74
75 install-html: install-html-am
76
77 install-html-am: $(HTMLS)
78 @$(NORMAL_INSTALL)
79 test -z "$(htmldir)" || $(mkdir_p) "$(DESTDIR)$(htmldir)"
80 @list='$(HTMLS)'; for p in $$list; do \
81 if test -f "$$p" || test -d "$$p"; then d=""; else d="$(srcdir)/"; fi; \
82 f=$(html__strip_dir) \
83 if test -d "$$d$$p"; then \
84 echo " $(mkdir_p) '$(DESTDIR)$(htmldir)/$$f'"; \
85 $(mkdir_p) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
86 echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \
87 $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f"; \
88 else \
89 echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(htmldir)/$$f'"; \
90 $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(htmldir)/$$f"; \
91 fi; \
92 done
93
94 # This one isn't ready for prime time yet. Not even a little bit.
95
96 noinst_TEXINFOS = internals.texi
97
98 MAINTAINERCLEANFILES = asconfig.texi gasver.texi
99
100 BASEDIR = $(srcdir)/../..
101 BFDDIR = $(BASEDIR)/bfd
102
103 CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/configure.in
104
105 # Maintenance
106
107 # We need it for the taz target in ../../Makefile.in.
108 info-local: $(MANS)
109
110 # Build the man page from the texinfo file
111 # The sed command removes the no-adjust Nroff command so that
112 # the man output looks standard.
113 as.1: $(srcdir)/as.texinfo asconfig.texi gasver.texi $(CPU_DOCS)
114 touch $@
115 -$(TEXI2POD) $(MANCONF) < $(srcdir)/as.texinfo > as.pod
116 -($(POD2MAN) as.pod | \
117 sed -e '/^.if n .na/d' > $@.T$$$$ && \
118 mv -f $@.T$$$$ $@) || \
119 (rm -f $@.T$$$$ && exit 1)
120 rm -f as.pod