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 | |
a2a5a4fa | 18 | #the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
79a54a5b RP |
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. | |
79a54a5b | 25 | |
a2a5a4fa KR |
26 | srcdir = @srcdir@ |
27 | VPATH = @srcdir@ | |
79a54a5b | 28 | |
a2a5a4fa | 29 | prefix = @prefix@ |
79a54a5b | 30 | |
a2a5a4fa KR |
31 | program_transform_name = @program_transform_name@ |
32 | exec_prefix = @exec_prefix@ | |
03261889 ILT |
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 | ||
a2a5a4fa KR |
53 | INSTALL = @INSTALL@ |
54 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ | |
55 | INSTALL_DATA = @INSTALL_DATA@ | |
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 | 70 | |
79a54a5b RP |
71 | ## |
72 | ||
73 | all: | |
79a54a5b | 74 | install: |
59f10b34 | 75 | $(INSTALL_XFORM1) $(srcdir)/as.1 $(man1dir)/as.1 |
79a54a5b | 76 | |
59f10b34 KR |
77 | info: as.info gasp.info |
78 | dvi: as.dvi gasp.dvi | |
79a54a5b | 79 | |
dcdf81bb KR |
80 | asconfig.texi: $(CONFIG).texi |
81 | rm -f asconfig.texi | |
82 | ln -s $(srcdir)/$(CONFIG).texi ./asconfig.texi || \ | |
83 | ln $(srcdir)/$(CONFIG).texi ./asconfig.texi || \ | |
84 | cp $(srcdir)/$(CONFIG).texi ./asconfig.texi | |
730ad1a7 | 85 | |
dcdf81bb | 86 | as.info: $(srcdir)/as.texinfo asconfig.texi |
59f10b34 | 87 | $(MAKEINFO) -I$(TEXIDIR) -o as.info $(srcdir)/as.texinfo |
79a54a5b | 88 | |
59f10b34 KR |
89 | gasp.info: $(srcdir)/gasp.texi |
90 | $(MAKEINFO) -o gasp.info $(srcdir)/gasp.texi | |
91 | ||
92 | install-info: install-info-as install-info-gasp | |
93 | install-info-as: as.info | |
94 | if [ -r as.info ]; then \ | |
95 | dir=. ; \ | |
96 | else \ | |
97 | dir=$(srcdir) ; \ | |
98 | fi ; \ | |
dcdf81bb KR |
99 | for i in `cd $$dir ; echo as.info*` ; do \ |
100 | $(INSTALL_DATA) $$dir/$$i $(infodir)/$$i ; \ | |
59f10b34 KR |
101 | done |
102 | install-info-gasp: gasp.info | |
103 | if [ -r gasp.info ]; then \ | |
104 | dir=. ; \ | |
105 | else \ | |
106 | dir=$(srcdir) ; \ | |
107 | fi ; \ | |
dcdf81bb | 108 | for i in `cd $$dir ; echo gasp.info*` ; do \ |
f299d06d | 109 | $(INSTALL_DATA) $$dir/$$i $(infodir)/$$i ; \ |
79a54a5b RP |
110 | done |
111 | ||
dcdf81bb | 112 | as.dvi: $(srcdir)/as.texinfo asconfig.texi |
59f10b34 | 113 | $(TEXI2DVI) $(srcdir)/as.texinfo |
730ad1a7 | 114 | |
59f10b34 KR |
115 | gasp.dvi: $(srcdir)/gasp.texi |
116 | $(TEXI2DVI) $(srcdir)/gasp.texi | |
79a54a5b | 117 | |
a2a5a4fa KR |
118 | # This one isn't ready for prime time yet. Not even a little bit. |
119 | internals.dvi: $(srcdir)/internals.texi | |
120 | $(TEXI2DVI) $(srcdir)/internals.texi | |
121 | internals.ps: internals.dvi | |
122 | dvips internals.dvi -o internals.ps | |
123 | internals.ps4: internals.ps | |
124 | psnup -4 < internals.ps > internals.ps4 | |
125 | ||
79a54a5b RP |
126 | # ROFF doc targets as.ms, as.mm, as.me |
127 | # (we don't use a variable because we don't trust all makes to handle | |
128 | # a var in the target name right). | |
129 | # roff output (-ms) | |
8209a8c4 | 130 | # THESE ARE PROBABLY BROKEN until texi2roff extended for Texinfo conditionals |
dcdf81bb | 131 | as.ms: $(srcdir)/as.texinfo asconfig.texi |
79a54a5b RP |
132 | sed -e '/\\input texinfo/d' \ |
133 | -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \ | |
134 | -e 's/{.*,,/{/' \ | |
59f10b34 | 135 | $(srcdir)/as.texinfo | \ |
79a54a5b RP |
136 | texi2roff -ms >as.ms |
137 | ||
138 | # roff output (-mm) | |
dcdf81bb | 139 | as.mm: $(srcdir)/as.texinfo asconfig.texi |
79a54a5b RP |
140 | sed -e '/\\input texinfo/d' \ |
141 | -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \ | |
142 | -e 's/{.*,,/{/' \ | |
143 | -e '/@noindent/d' \ | |
59f10b34 | 144 | $(srcdir)/as.texinfo | \ |
79a54a5b RP |
145 | texi2roff -mm | \ |
146 | sed -e 's/---/\\(em/g' \ | |
147 | >as.mm | |
148 | ||
149 | # roff output (-me) | |
dcdf81bb | 150 | as.me: $(srcdir)/as.texinfo asconfig.texi |
79a54a5b RP |
151 | sed -e '/\\input texinfo/d' \ |
152 | -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \ | |
153 | -e 's/{.*,,/{/' \ | |
59f10b34 | 154 | $(srcdir)/as.texinfo | \ |
79a54a5b RP |
155 | texi2roff -me >as.me |
156 | ||
a2a5a4fa | 157 | clean mostlyclean: clean-dvi clean-info |
f299d06d | 158 | rm -f asconfig.texi |
8209a8c4 | 159 | |
a2a5a4fa | 160 | distclean realclean: |
f299d06d KR |
161 | rm -f Makefile config.status asconfig.texi \ |
162 | as.?? as.??s as.aux as.log as.toc \ | |
163 | gasp.?? gasp.??s gasp.aux gasp.log gasp.toc | |
59f10b34 | 164 | |
8209a8c4 | 165 | clean-dvi: |
f299d06d | 166 | rm -f as.?? as.??? gasp.?? gasp.??? |
8209a8c4 | 167 | |
79a54a5b | 168 | clean-info: |
f299d06d | 169 | rm -f as.info* gasp.info* |
79a54a5b RP |
170 | |
171 | force: | |
172 | ||
173 | Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag) | |
a2a5a4fa | 174 | (cd .. ; $(SHELL) ./config.status) |