]>
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) | |
56 | ||
57 | AR = ar | |
58 | AR_FLAGS = qv | |
59 | BISON = bison | |
60 | MAKEINFO = makeinfo | |
730ad1a7 | 61 | TEXI2DVI = TEXINPUTS=$$TEXINPUTS:$(TEXIDIR) texi2dvi |
79a54a5b RP |
62 | RANLIB = ranlib |
63 | ||
730ad1a7 | 64 | # What version of the manual you want; "all" includes everything |
79a54a5b RP |
65 | CONFIG=all |
66 | ||
79a54a5b | 67 | # Where to find texinfo.tex to format docn with TeX |
9da59956 | 68 | TEXIDIR = $(srcdir)/../../texinfo |
79a54a5b RP |
69 | |
70 | #### host, target, and site specific Makefile frags come in here. | |
71 | ## | |
72 | ||
73 | all: | |
79a54a5b | 74 | install: |
03261889 ILT |
75 | -parent=`echo $(man1dir)|sed -e 's@/[^/]*$$@@'`; \ |
76 | if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi | |
77 | -if [ -d $(man1dir) ] ; then true ; else mkdir $(man1dir) ; fi | |
9da59956 | 78 | $(INSTALL_DATA) $(srcdir)/as.1 $(man1dir)/`t='$(program_transform_name)'; echo as | sed -e "" $$t`.1 |
79a54a5b RP |
79 | |
80 | info: as.info | |
9da59956 | 81 | dvi: as.dvi |
79a54a5b | 82 | |
730ad1a7 RP |
83 | asdoc-config.texi: $(CONFIG).texi |
84 | ln -s $(srcdir)/$(CONFIG).texi ./asdoc-config.texi || \ | |
85 | ln $(srcdir)/$(CONFIG).texi ./asdoc-config.texi || \ | |
86 | cp $(srcdir)/$(CONFIG).texi ./asdoc-config.texi | |
87 | ||
88 | as.info: as.texinfo asdoc-config.texi | |
89 | $(MAKEINFO) -o as.info as.texinfo | |
79a54a5b RP |
90 | |
91 | install-info: as.info | |
03261889 ILT |
92 | -parent=`echo $(infodir)|sed -e 's@/[^/]*$$@@'`; \ |
93 | if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi | |
94 | -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; fi | |
79a54a5b RP |
95 | for i in as.info* ; do \ |
96 | $(INSTALL_DATA) $$i $(infodir)/$$i ; \ | |
97 | done | |
98 | ||
730ad1a7 RP |
99 | dvi: as.dvi |
100 | ||
8209a8c4 RP |
101 | as.dvi: as.texinfo asdoc-config.texi |
102 | $(TEXI2DVI) as.texinfo | |
79a54a5b RP |
103 | |
104 | # ROFF doc targets as.ms, as.mm, as.me | |
105 | # (we don't use a variable because we don't trust all makes to handle | |
106 | # a var in the target name right). | |
107 | # roff output (-ms) | |
8209a8c4 RP |
108 | # THESE ARE PROBABLY BROKEN until texi2roff extended for Texinfo conditionals |
109 | as.ms: as.texinfo asdoc-config.texi | |
79a54a5b RP |
110 | sed -e '/\\input texinfo/d' \ |
111 | -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \ | |
112 | -e 's/{.*,,/{/' \ | |
8209a8c4 | 113 | as.texinfo | \ |
79a54a5b RP |
114 | texi2roff -ms >as.ms |
115 | ||
116 | # roff output (-mm) | |
8209a8c4 | 117 | as.mm: as.texinfo asdoc-config.texi |
79a54a5b RP |
118 | sed -e '/\\input texinfo/d' \ |
119 | -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \ | |
120 | -e 's/{.*,,/{/' \ | |
121 | -e '/@noindent/d' \ | |
8209a8c4 | 122 | as.texinfo | \ |
79a54a5b RP |
123 | texi2roff -mm | \ |
124 | sed -e 's/---/\\(em/g' \ | |
125 | >as.mm | |
126 | ||
127 | # roff output (-me) | |
8209a8c4 | 128 | as.me: as.texinfo asdoc-config.texi |
79a54a5b RP |
129 | sed -e '/\\input texinfo/d' \ |
130 | -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \ | |
131 | -e 's/{.*,,/{/' \ | |
8209a8c4 | 132 | as.texinfo | \ |
79a54a5b RP |
133 | texi2roff -me >as.me |
134 | ||
8209a8c4 RP |
135 | clean: clean-dvi clean-info |
136 | ||
137 | clean-dvi: | |
138 | rm -f as.?? as.??? | |
139 | ||
79a54a5b | 140 | clean-info: |
8209a8c4 | 141 | rm -f as.info* |
79a54a5b RP |
142 | |
143 | force: | |
144 | ||
145 | Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag) | |
146 | $(SHELL) ./config.status |