Commit | Line | Data |
---|---|---|
79a54a5b | 1 | # Makefile for GNU Assembler documentation |
730ad1a7 | 2 | # Copyright (C) 1987-1993 Free Software Foundation, Inc. |
79a54a5b RP |
3 | |
4 | #This file is part of GNU GAS. | |
5 | ||
6 | #GNU GAS is free software; you can redistribute it and/or modify | |
7 | #it under the terms of the GNU General Public License as published by | |
8 | #the Free Software Foundation; either version 2, or (at your option) | |
9 | #any later version. | |
10 | ||
11 | #GNU GAS is distributed in the hope that it will be useful, | |
12 | #but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | #GNU General Public License for more details. | |
15 | ||
16 | #You should have received a copy of the GNU General Public License | |
17 | #along with GNU GAS; see the file COPYING. If not, write to | |
18 | #the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | |
19 | ||
20 | # The targets for external use include: | |
21 | # all, doc, proto, install, uninstall, includes, TAGS, | |
22 | # clean, cleanconfig, realclean, stage1, stage2, stage3, stage4. | |
23 | ||
24 | # Variables that exist for you to override. | |
25 | # See below for how to change them for certain systems. | |
26 | ||
27 | srcdir = . | |
28 | ||
29 | prefix = /usr/local | |
30 | ||
9da59956 | 31 | program_transform_name = |
03261889 ILT |
32 | exec_prefix = $(prefix) |
33 | bindir = $(exec_prefix)/bin | |
34 | libdir = $(exec_prefix)/lib | |
35 | ||
79a54a5b | 36 | datadir = $(prefix)/lib |
03261889 | 37 | mandir = $(prefix)/man |
79a54a5b RP |
38 | man1dir = $(mandir)/man1 |
39 | man2dir = $(mandir)/man2 | |
40 | man3dir = $(mandir)/man3 | |
41 | man4dir = $(mandir)/man4 | |
42 | man5dir = $(mandir)/man5 | |
43 | man6dir = $(mandir)/man6 | |
44 | man7dir = $(mandir)/man7 | |
45 | man8dir = $(mandir)/man8 | |
46 | man9dir = $(mandir)/man9 | |
03261889 | 47 | infodir = $(prefix)/info |
79a54a5b RP |
48 | includedir = $(prefix)/include |
49 | docdir = $(datadir)/doc | |
50 | ||
51 | SHELL = /bin/sh | |
52 | ||
53 | INSTALL = install -c | |
54 | INSTALL_PROGRAM = $(INSTALL) | |
55 | INSTALL_DATA = $(INSTALL) | |
59f10b34 | 56 | INSTALL_XFORM1 = $(INSTALL) -b $(program_transform_name) .1 |
79a54a5b RP |
57 | |
58 | AR = ar | |
59 | AR_FLAGS = qv | |
60 | BISON = bison | |
61 | MAKEINFO = makeinfo | |
59f10b34 | 62 | TEXI2DVI = TEXINPUTS=$(TEXIDIR):$$TEXINPUTS texi2dvi |
79a54a5b RP |
63 | RANLIB = ranlib |
64 | ||
730ad1a7 | 65 | # What version of the manual you want; "all" includes everything |
79a54a5b RP |
66 | CONFIG=all |
67 | ||
79a54a5b | 68 | # Where to find texinfo.tex to format docn with TeX |
9da59956 | 69 | TEXIDIR = $(srcdir)/../../texinfo |
79a54a5b RP |
70 | |
71 | #### host, target, and site specific Makefile frags come in here. | |
72 | ## | |
73 | ||
74 | all: | |
79a54a5b | 75 | install: |
59f10b34 | 76 | $(INSTALL_XFORM1) $(srcdir)/as.1 $(man1dir)/as.1 |
79a54a5b | 77 | |
59f10b34 KR |
78 | info: as.info gasp.info |
79 | dvi: as.dvi gasp.dvi | |
79a54a5b | 80 | |
730ad1a7 | 81 | asdoc-config.texi: $(CONFIG).texi |
59f10b34 | 82 | rm -f asdoc-config.texi |
730ad1a7 RP |
83 | ln -s $(srcdir)/$(CONFIG).texi ./asdoc-config.texi || \ |
84 | ln $(srcdir)/$(CONFIG).texi ./asdoc-config.texi || \ | |
85 | cp $(srcdir)/$(CONFIG).texi ./asdoc-config.texi | |
86 | ||
59f10b34 KR |
87 | as.info: $(srcdir)/as.texinfo asdoc-config.texi |
88 | $(MAKEINFO) -I$(TEXIDIR) -o as.info $(srcdir)/as.texinfo | |
79a54a5b | 89 | |
59f10b34 KR |
90 | gasp.info: $(srcdir)/gasp.texi |
91 | $(MAKEINFO) -o gasp.info $(srcdir)/gasp.texi | |
92 | ||
93 | install-info: install-info-as install-info-gasp | |
94 | install-info-as: as.info | |
95 | if [ -r as.info ]; then \ | |
96 | dir=. ; \ | |
97 | else \ | |
98 | dir=$(srcdir) ; \ | |
99 | fi ; \ | |
100 | for i in $$dir/as.info* ; do \ | |
101 | $(INSTALL_DATA) $$i $(infodir)/$$i ; \ | |
102 | done | |
103 | install-info-gasp: gasp.info | |
104 | if [ -r gasp.info ]; then \ | |
105 | dir=. ; \ | |
106 | else \ | |
107 | dir=$(srcdir) ; \ | |
108 | fi ; \ | |
109 | for i in $$dir/gasp.info* ; do \ | |
79a54a5b RP |
110 | $(INSTALL_DATA) $$i $(infodir)/$$i ; \ |
111 | done | |
112 | ||
59f10b34 KR |
113 | as.dvi: $(srcdir)/as.texinfo asdoc-config.texi |
114 | $(TEXI2DVI) $(srcdir)/as.texinfo | |
730ad1a7 | 115 | |
59f10b34 KR |
116 | gasp.dvi: $(srcdir)/gasp.texi |
117 | $(TEXI2DVI) $(srcdir)/gasp.texi | |
79a54a5b RP |
118 | |
119 | # ROFF doc targets as.ms, as.mm, as.me | |
120 | # (we don't use a variable because we don't trust all makes to handle | |
121 | # a var in the target name right). | |
122 | # roff output (-ms) | |
8209a8c4 | 123 | # THESE ARE PROBABLY BROKEN until texi2roff extended for Texinfo conditionals |
59f10b34 | 124 | as.ms: $(srcdir)/as.texinfo asdoc-config.texi |
79a54a5b RP |
125 | sed -e '/\\input texinfo/d' \ |
126 | -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \ | |
127 | -e 's/{.*,,/{/' \ | |
59f10b34 | 128 | $(srcdir)/as.texinfo | \ |
79a54a5b RP |
129 | texi2roff -ms >as.ms |
130 | ||
131 | # roff output (-mm) | |
59f10b34 | 132 | as.mm: $(srcdir)/as.texinfo asdoc-config.texi |
79a54a5b RP |
133 | sed -e '/\\input texinfo/d' \ |
134 | -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \ | |
135 | -e 's/{.*,,/{/' \ | |
136 | -e '/@noindent/d' \ | |
59f10b34 | 137 | $(srcdir)/as.texinfo | \ |
79a54a5b RP |
138 | texi2roff -mm | \ |
139 | sed -e 's/---/\\(em/g' \ | |
140 | >as.mm | |
141 | ||
142 | # roff output (-me) | |
59f10b34 | 143 | as.me: $(srcdir)/as.texinfo asdoc-config.texi |
79a54a5b RP |
144 | sed -e '/\\input texinfo/d' \ |
145 | -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \ | |
146 | -e 's/{.*,,/{/' \ | |
59f10b34 | 147 | $(srcdir)/as.texinfo | \ |
79a54a5b RP |
148 | texi2roff -me >as.me |
149 | ||
8209a8c4 RP |
150 | clean: clean-dvi clean-info |
151 | ||
59f10b34 KR |
152 | distclean: |
153 | rm -f Makefile config.status as.?? as.??s as.aux as.log as.toc | |
154 | ||
8209a8c4 RP |
155 | clean-dvi: |
156 | rm -f as.?? as.??? | |
157 | ||
79a54a5b | 158 | clean-info: |
8209a8c4 | 159 | rm -f as.info* |
79a54a5b RP |
160 | |
161 | force: | |
162 | ||
163 | Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag) | |
164 | $(SHELL) ./config.status |