Commit | Line | Data |
---|---|---|
5fd51993 SS |
1 | |
2 | s = "{srcdir}" | |
3 | ||
4 | o = : | |
5 | ||
6 | # File in object dir can come from either the current dir or srcdir. | |
7 | ||
8 | "{o}" \Option-f : "{s}" | |
9 | ||
10 | # Default rule that puts each file into separate segment. | |
11 | ||
12 | .c.o \Option-f .c | |
13 | {CC} {DepDir}{Default}.c {ALL_CFLAGS} {SymOptions} -s {Default} -o {TargDir}{Default}.c.o | |
14 | ||
15 | # Makefile for GNU binary-file utilities | |
16 | # Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. | |
17 | ||
18 | # This file is part of GNU binutils. | |
19 | ||
20 | # This program is free software; you can redistribute it and:or modify | |
21 | # it under the terms of the GNU General Public License as published by | |
22 | # the Free Software Foundation; either version 2 of the License, or | |
23 | # (at your option) any later version. | |
24 | # | |
25 | # This program is distributed in the hope that it will be useful, | |
26 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
27 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
28 | # GNU General Public License for more details. | |
29 | # | |
30 | # You should have received a copy of the GNU General Public License | |
31 | # along with this program; if not, write to the Free Software | |
32 | # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | |
33 | ||
34 | # srcdir = : | |
35 | ||
36 | prefix = :usr:local | |
37 | ||
38 | program_transform_name = | |
39 | exec_prefix = {prefix} | |
6cc30a11 | 40 | bindir = {exec_prefix}bin: |
5fd51993 SS |
41 | libdir = {exec_prefix}:lib |
42 | tooldir = {exec_prefix}:{target_alias} | |
43 | ||
44 | datadir = {prefix}:lib | |
45 | mandir = {prefix}:man | |
46 | man1dir = {mandir}:man1 | |
47 | man2dir = {mandir}:man2 | |
48 | man3dir = {mandir}:man3 | |
49 | man4dir = {mandir}:man4 | |
50 | man5dir = {mandir}:man5 | |
51 | man6dir = {mandir}:man6 | |
52 | man7dir = {mandir}:man7 | |
53 | man8dir = {mandir}:man8 | |
54 | man9dir = {mandir}:man9 | |
55 | infodir = {prefix}:info | |
56 | includedir = {prefix}:include | |
57 | docdir = {datadir}:doc | |
58 | ||
59 | SHELL = :bin:sh | |
60 | ||
61 | INSTALL = Duplicate -y | |
62 | INSTALL_PROGRAM = {INSTALL} | |
63 | INSTALL_DATA = {INSTALL} | |
64 | INSTALL_XFORM = {INSTALL} -t='{program_transform_name}' | |
65 | INSTALL_XFORM1 = {INSTALL_XFORM} -b=.1 | |
66 | ||
67 | AR = ar | |
68 | AR_FLAGS = qv | |
69 | #CFLAGS = -g | |
70 | MAKEINFO = makeinfo | |
71 | TEXI2DVI = texi2dvi | |
72 | RANLIB = ranlib | |
73 | BISONFLAGS = -d | |
74 | TEXI2ROFF=texi2roff | |
75 | MAKEOVERRIDES= | |
76 | ||
77 | NM_FOR_TARGET = nm | |
78 | NM = {NM_FOR_TARGET} | |
79 | SYMLINK = ln -s | |
80 | ||
81 | BISON = byacc | |
82 | # Comment these out if using lex. | |
83 | LEX_OPTIONS = -i -Cem | |
84 | LEX = flex | |
85 | ||
86 | # Distribution version | |
87 | VERSION=cygnus-2.3.1 | |
88 | # Distribution name | |
89 | DIST_NAME=binutils-{VERSION} | |
90 | ||
91 | # version=`:::gcc:gcc -dumpversion` | |
92 | ||
93 | # Where to find texinfo.tex to format docn with TeX | |
94 | TEXIDIR = "{srcdir}":texinfo | |
95 | ||
74557dc6 | 96 | MANPAGES= ar nm objdump ranlib size strings strip cplusfilt objcopy nlmconv |
5fd51993 SS |
97 | |
98 | #CC=gcc -Wall | |
99 | # these two are almost the same program | |
100 | AR_PROG=ar | |
101 | RANLIB_PROG=ranlib | |
102 | ||
103 | # objcopy and strip should be the same program | |
104 | OBJCOPY_PROG=objcopy | |
105 | STRIP_PROG=strip | |
106 | ||
107 | STRINGS_PROG=strings | |
108 | ||
109 | # These should all be the same program too. | |
110 | SIZE_PROG=size | |
111 | NM_PROG=nm | |
112 | OBJDUMP_PROG=objdump | |
113 | ||
114 | # This is the demangler, as a standalone program. | |
74557dc6 | 115 | DEMANGLER_PROG=cplusfilt |
5fd51993 SS |
116 | |
117 | NLMCONV_PROG=nlmconv | |
118 | ||
119 | PROGS = {SIZE_PROG} {OBJDUMP_PROG} {NM_PROG} {AR_PROG} {STRINGS_PROG} {STRIP_PROG} {RANLIB_PROG} {DEMANGLER_PROG} {OBJCOPY_PROG} | |
120 | STAGESTUFF = {PROGS} "{o}"\Option-x.c.o | |
121 | # Files that can be generated, but should be in the distribution. | |
122 | DISTSTUFF=arparse.c :arlex.c "{s}"nlmheader.c info | |
123 | ||
124 | BASEDIR = "{srcroot}" | |
125 | BFDDIR = {BASEDIR}bfd | |
126 | INCDIR = {BASEDIR}include | |
74557dc6 | 127 | INCLUDES = -i "{INCDIR}":mpw: -i ::extra-include: -i : -i {srcdir} -i ::bfd: -i {BFDDIR} -i {INCDIR} |
5fd51993 SS |
128 | |
129 | #### host and target dependant Makefile fragments come in here. | |
130 | ### | |
131 | ||
132 | ALL_CFLAGS = {INCLUDES} {HDEFINES} {TDEFINES} {CFLAGS} | |
133 | ||
134 | "{o}".c.c.o \Option-f | |
135 | {CC} -c {ALL_CFLAGS} $< | |
136 | ||
137 | #\f | |
138 | ## Random definitions | |
139 | # Hopefully all these may be flushed once we get configuration down pat. | |
140 | ||
141 | # alloca only needed for systems which don't have it and when cc != gcc. | |
142 | # ALLOCA = "{o}"alloca.c.o | |
143 | ||
144 | # nm tries to malloc enough space for the string table. The old GNU malloc | |
145 | # rounds this up to a power of two (e.g. 5M becomes 8M), and so it might | |
146 | # fail unnecessarily. I've also seen some Unix malloc's fail, even when | |
147 | # there is enough memory. So use the new GNU malloc. | |
148 | # MALLOC = "{o}"gmalloc.c.o | |
149 | # Use this if the system malloc is good enough. | |
150 | MALLOC = | |
151 | ||
152 | # Use the GNU getopt unless you have problems with it. | |
153 | # The IRIS version could probably benefit from being assembled with | |
154 | # libmalloc rather than the ordinary malloc. | |
155 | LIBIBERTY = ::libiberty:libiberty.o | |
156 | ||
157 | # Code shared by all the binutils. | |
158 | BULIBS = "{o}"bucomm.c.o "{o}"version.c.o "{o}"filemode.c.o | |
159 | ||
160 | ADDL_LIBS = {MALLOC} {BULIBS} {BFD} {LIBIBERTY} | |
161 | ||
162 | BFD = ::bfd:libbfd.o | |
163 | OPCODES = ::opcodes:libopcodes.o | |
164 | ||
165 | RUNTEST = runtest | |
166 | RUNTEST_FLAGS = | |
167 | FLAGS_TO_PASS = \Option-d | |
168 | "CC={CC}" \Option-d | |
169 | "CFLAGS={CFLAGS}" \Option-d | |
170 | "RUNTEST={RUNTEST}" \Option-d | |
171 | "RUNTEST_FLAGS={RUNTEST_FLAGS} \Option-d | |
172 | SIZE=`if [ -f $$rootme:{SIZE_PROG} ] ; then echo $$rootme:{SIZE_PROG} ; else echo {SIZE_PROG}; fi` \Option-d | |
173 | OBJCOPY=`if [ -f $$rootme:{OBJCOPY_PROG} ] ; then echo $$rootme:{OBJCOPY_PROG} ; else echo {OBJCOPY_PROG}; fi` \Option-d | |
174 | NM=`if [ -f $$rootme:{NM_PROG} ] ; then echo $$rootme:{NM_PROG} ; else echo {NM_PROG}; fi` \Option-d | |
175 | AR=`if [ -f $$rootme:{AR_PROG} ] ; then echo $$rootme:{AR_PROG} ; else echo {AR_PROG}; fi` \Option-d | |
176 | OBJDUMP=`if [ -f $$rootme:{OBJDUMP_PROG} ] ; then echo $$rootme:{OBJDUMP_PROG} ; else echo {OBJDUMP_PROG}; fi` \Option-d | |
177 | STRINGS=`if [ -f $$rootme:{STRINGS_PROG} ] ; then echo $$rootme:{STRINGS_PROG} ; else echo {STRINGS_PROG}; fi` \Option-d | |
178 | STRIP=`if [ -f $$rootme:{STRIP_PROG} ] ; then echo $$rootme:{STRIP_PROG} ; else echo {STRIP_PROG}; fi` \Option-d | |
179 | RANLIB=`if [ -f $$rootme:{RANLIB_PROG} ] ; then echo $$rootme:{RANLIB_PROG} ; else echo {RANLIB_PROG}; fi` \Option-d | |
180 | DEMANGLE=`if [ -f $$rootme:{DEMANGLER_PROG} ] ; then echo $$rootme:{DEMANGLER_PROG} ; else echo {DEMANGLER_PROG}; fi`" | |
181 | ||
182 | #\f | |
183 | ## The rules | |
184 | ||
185 | all \Option-f {ADDL_LIBS} {PROGS} | |
186 | ||
187 | testsuite \Option-f | |
188 | if [ -f testsuite:Makefile.in ]; then \Option-d | |
189 | (rootme=`pwd`: ; export rootme ; \Option-d | |
190 | rootsrc=`cd {srcdir}; pwd`: ; export rootsrc ; \Option-d | |
191 | cd testsuite; {MAKE} FLAGS_TO_PASS={FLAGS_TO_PASS}); \Option-d | |
192 | else true ; fi | |
193 | ||
194 | check \Option-f force | |
195 | rootme=`pwd`; export rootme; cd testsuite ; \Option-d | |
196 | {MAKE} check {FLAGS_TO_PASS} | |
197 | # :bin:sh "{srcdir}"sanity.sh . | |
198 | ||
199 | installcheck \Option-f | |
200 | :bin:sh "{srcdir}"sanity.sh {bindir} | |
201 | ||
202 | info \Option-f binutils.info | |
203 | ||
204 | dvi \Option-f binutils.dvi | |
205 | ||
206 | {SIZE_PROG} \Option-f {ADDL_LIBS} "{o}"size.c.o {BFD} | |
207 | Link {LDFLAGS} -o {SIZE_PROG} "{o}"size.c.o {ADDL_LIBS} {EXTRALIBS} | |
208 | ||
209 | {OBJCOPY_PROG} \Option-f {ADDL_LIBS} "{o}"objcopy.c.o "{o}"not-strip.c.o {BFD} | |
210 | Link {LDFLAGS} -o {OBJCOPY_PROG} "{o}"objcopy.c.o "{o}"not-strip.c.o {ADDL_LIBS} {EXTRALIBS} | |
211 | ||
212 | {STRINGS_PROG} \Option-f {ADDL_LIBS} "{o}"strings.c.o {BFD} | |
213 | Link {LDFLAGS} -o {STRINGS_PROG} "{o}"strings.c.o {ADDL_LIBS} {EXTRALIBS} | |
214 | ||
215 | {STRIP_PROG} \Option-f {ADDL_LIBS} "{o}"objcopy.c.o "{o}"is-strip.c.o {BFD} | |
216 | Link {LDFLAGS} -o {STRIP_PROG} "{o}"objcopy.c.o "{o}"is-strip.c.o {ADDL_LIBS} {EXTRALIBS} | |
217 | ||
71fa3485 SS |
218 | {NM_PROG} \Option-f {ADDL_LIBS} "{o}"nm.c.o {BFD} |
219 | Link {LDFLAGS} -o {NM_PROG} "{o}"nm.c.o {ADDL_LIBS} {EXTRALIBS} | |
5fd51993 SS |
220 | |
221 | {OBJDUMP_PROG} \Option-f {ADDL_LIBS} "{o}"objdump.c.o {BFD} {OPCODES} | |
222 | Link {LDFLAGS} -o {OBJDUMP_PROG} "{o}"objdump.c.o {OPCODES} {ADDL_LIBS} {EXTRALIBS} | |
223 | ||
224 | "{o}"objdump.c.o \Option-f "{s}"objdump.c config.status | |
225 | {CC} {INCLUDES} {HDEFINES} {TDEFINES} {ARCHDEFS} {CFLAGS} "{srcdir}"objdump.c -o "{o}"objdump.c.o | |
226 | ||
227 | :underscore.c \Option-f | |
228 | echo "int prepends_underscore = 0;" >underscore.c | |
229 | ||
230 | "{o}"version.c.o \Option-f "{s}"version.c | |
231 | {CC} {INCLUDES} {HDEFINES} {TDEFINES} -d VERSION='"{VERSION}"' {CFLAGS} "{srcdir}"version.c -o "{o}"version.c.o | |
232 | ||
71fa3485 SS |
233 | "{o}"cplus-dem.c.o \Option-f "{BASEDIR}"libiberty:cplus-dem.c |
234 | {CC} -d MAIN -d VERSION='"{VERSION}"' {INCLUDES} {HDEFINES} {TDEFINES} {CFLAGS} "{BASEDIR}"libiberty:cplus-dem.c -o "{o}"cplus-dem.c.o | |
5fd51993 SS |
235 | |
236 | {DEMANGLER_PROG} \Option-f "{o}"cplus-dem.c.o {LIBIBERTY} "{o}"underscore.c.o "{o}"version.c.o | |
71fa3485 | 237 | Link {LDFLAGS} -o {DEMANGLER_PROG} "{o}"cplus-dem.c.o {LIBIBERTY} {EXTRALIBS} "{o}"underscore.c.o |
5fd51993 | 238 | |
71fa3485 | 239 | "{o}"arparse.c \Option-f "{s}"arparse.y |
5fd51993 | 240 | {BISON} {BISONFLAGS} "{srcdir}"arparse.y |
71fa3485 SS |
241 | Rename -y y.tab.c "{o}"arparse.c |
242 | Rename -y y.tab.h "{o}"arparse.h | |
243 | ||
244 | "{o}"arparse.h \Option-f "{o}"arparse.c | |
5fd51993 | 245 | |
71fa3485 | 246 | "{o}"arlex.c \Option-f "{s}"arlex.l |
5fd51993 | 247 | {LEX} {LEX_OPTIONS} "{srcdir}"arlex.l |
71fa3485 | 248 | Rename -y :lex.yy.c "{o}"arlex.c |
5fd51993 SS |
249 | |
250 | {AR_PROG} \Option-f {ADDL_LIBS} "{o}"ar.c.o "{o}"arparse.c.o "{o}"arlex.c.o "{o}"not-ranlib.c.o {BFD} "{o}"arsup.c.o | |
251 | Link {LDFLAGS} -o {AR_PROG} "{o}"ar.c.o "{o}"arparse.c.o "{o}"arlex.c.o "{o}"arsup.c.o "{o}"not-ranlib.c.o {ADDL_LIBS} {EXTRALIBS} | |
252 | ||
253 | {RANLIB_PROG} \Option-f {ADDL_LIBS} "{o}"ar.c.o "{o}"is-ranlib.c.o "{o}"arparse.c.o "{o}"arlex.c.o "{o}"arsup.c.o {BFD} | |
254 | Link {LDFLAGS} -o {RANLIB_PROG} "{o}"ar.c.o "{o}"arparse.c.o "{o}"arlex.c.o "{o}"arsup.c.o "{o}"is-ranlib.c.o {ADDL_LIBS} {EXTRALIBS} | |
255 | ||
256 | # This rule creates a single binary that switches between ar and ranlib | |
257 | # by looking at argv[0]. Use this kludge to save some disk space. | |
258 | # However, you have to install things by hand. | |
259 | # (That is after 'make install', replace the installed ranlib by a link to ar.) | |
260 | ||
261 | # Alternatively, you can install ranlib.sh as ranlib. | |
262 | ||
263 | ar_with_ranlib \Option-f {ADDL_LIBS} "{o}"ar.c.o "{o}"maybe-ranlib.c.o {BFD} | |
264 | Link {LDFLAGS} -o {AR_PROG} "{o}"ar.c.o "{o}"maybe-ranlib.c.o {ADDL_LIBS} {EXTRALIBS} | |
265 | Delete -y {RANLIB_PROG} | |
266 | # ln {AR_PROG} {RANLIB_PROG} | |
267 | ||
268 | # objcopy and strip in one binary that uses argv[0] to decide its action. | |
269 | ||
270 | objcopy_with_strip \Option-f {ADDL_LIBS} "{o}"objcopy.c.o "{o}"maybe-strip.c.o {BFD} | |
271 | Link {LDFLAGS} -o {OBJCOPY_PROG} "{o}"objcopy.c.o "{o}"maybe-strip.c.o {ADDL_LIBS} {EXTRALIBS} | |
272 | Delete -y {STRIP_PROG} | |
273 | # ln {OBJCOPY_PROG} {STRIP_PROG} | |
274 | ||
275 | nlmheader.c \Option-f "{s}"nlmheader.y | |
276 | {BISON} "{srcdir}"nlmheader.y | |
277 | Delete -y "{s}"nlmheader.c | |
278 | Rename -y y.tab.c "{s}"nlmheader.c | |
279 | ||
280 | "{o}"nlmconv.c.o \Option-f "{s}"nlmconv.c | |
281 | ldname=`t='{program_transform_name}'; echo ld | sed -e "" $$t`; \Option-d | |
282 | {CC} -d LD_NAME="\"${ldname}\"" {INCLUDES} {HDEFINES} {TDEFINES} {CFLAGS} "{srcdir}"nlmconv.c -o "{o}"nlmconv.c.o | |
283 | ||
284 | {NLMCONV_PROG} \Option-f "{o}"nlmconv.c.o "{o}"nlmheader.c.o {ADDL_LIBS} {BFD} | |
285 | Link {LDFLAGS} -o $@ "{o}"nlmconv.c.o "{o}"nlmheader.c.o {ADDL_LIBS} {EXTRALIBS} | |
286 | ||
287 | # This list of dependencies was generated by doing a make with gcc -MM | |
288 | # saving the output in a file and removing the gcc commands | |
289 | # changing "::::devo:binutils:::bfd" to "{BFDDIR}" | |
290 | # removing "::::devo:binutils:" | |
291 | # changing "::include" to "{INCDIR}" | |
292 | ||
293 | "{o}"bucomm.c.o \Option-f "{s}"bucomm.c ::bfd:bfd.h "{INCDIR}":ansidecl.h \Option-d | |
294 | "{INCDIR}":obstack.h ::bfd:sysdep.h "{BFDDIR}":hosts:std-host.h \Option-d | |
295 | "{INCDIR}":fopen-same.h "{s}"bucomm.h | |
296 | "{o}"filemode.c.o \Option-f "{s}"filemode.c ::bfd:bfd.h "{INCDIR}":ansidecl.h \Option-d | |
297 | "{INCDIR}":obstack.h ::bfd:sysdep.h "{BFDDIR}":hosts:std-host.h \Option-d | |
298 | "{INCDIR}":fopen-same.h | |
299 | "{o}"size.c.o \Option-f "{s}"size.c ::bfd:bfd.h "{INCDIR}":ansidecl.h \Option-d | |
300 | "{INCDIR}":obstack.h ::bfd:sysdep.h "{BFDDIR}":hosts:std-host.h \Option-d | |
301 | "{INCDIR}":fopen-same.h "{INCDIR}":getopt.h | |
302 | "{o}"objdump.c.o \Option-f "{s}"objdump.c ::bfd:bfd.h "{INCDIR}":ansidecl.h \Option-d | |
303 | "{INCDIR}":obstack.h ::bfd:sysdep.h "{BFDDIR}":hosts:std-host.h \Option-d | |
304 | "{INCDIR}":fopen-same.h "{INCDIR}":getopt.h \Option-d | |
305 | "{INCDIR}":dis-asm.h "{INCDIR}":aout:aout64.h \Option-d | |
306 | "{INCDIR}":elf:internal.h {INCDIR}:aout:stab.def | |
307 | "{o}"nm.c.o \Option-f "{s}"nm.c ::bfd:bfd.h "{INCDIR}":ansidecl.h \Option-d | |
308 | "{INCDIR}":obstack.h ::bfd:sysdep.h "{BFDDIR}":hosts:std-host.h \Option-d | |
309 | "{INCDIR}":fopen-same.h "{s}"bucomm.h "{INCDIR}":getopt.h \Option-d | |
310 | "{INCDIR}":aout:stab_gnu.h {INCDIR}:aout:stab.def \Option-d | |
311 | "{INCDIR}":aout:ranlib.h "{INCDIR}":demangle.h | |
312 | "{o}"ar.c.o \Option-f "{s}"ar.c ::bfd:bfd.h "{INCDIR}":ansidecl.h \Option-d | |
313 | "{INCDIR}":obstack.h ::bfd:sysdep.h "{BFDDIR}":hosts:std-host.h \Option-d | |
314 | "{INCDIR}":fopen-same.h "{s}"bucomm.h "{INCDIR}":aout:ar.h \Option-d | |
315 | "{BFDDIR}":libbfd.h "{s}"arsup.h | |
71fa3485 | 316 | "{o}"arparse.c.o \Option-f "{o}"arparse.c ::bfd:bfd.h "{INCDIR}":ansidecl.h \Option-d |
5fd51993 | 317 | "{INCDIR}":obstack.h "{s}"arsup.h |
71fa3485 | 318 | "{o}"arlex.c.o \Option-f :arlex.c "{o}"arparse.h |
5fd51993 SS |
319 | "{o}"not-ranlib.c.o \Option-f "{s}"not-ranlib.c |
320 | "{o}"arsup.c.o \Option-f "{s}"arsup.c ::bfd:bfd.h "{INCDIR}":ansidecl.h \Option-d | |
321 | "{INCDIR}":obstack.h "{s}"arsup.h "{s}"bucomm.h | |
322 | "{o}"strings.c.o \Option-f "{s}"strings.c ::bfd:bfd.h "{INCDIR}":ansidecl.h \Option-d | |
323 | "{INCDIR}":obstack.h "{s}"bucomm.h | |
324 | "{o}"objcopy.c.o \Option-f "{s}"objcopy.c ::bfd:bfd.h "{INCDIR}":ansidecl.h \Option-d | |
325 | "{INCDIR}":obstack.h ::bfd:sysdep.h "{BFDDIR}":hosts:std-host.h \Option-d | |
326 | "{INCDIR}":fopen-same.h "{s}"bucomm.h | |
327 | "{o}"is-strip.c.o \Option-f "{s}"is-strip.c | |
328 | "{o}"is-ranlib.c.o \Option-f "{s}"is-ranlib.c | |
329 | "{o}"underscore.c.o \Option-f :underscore.c | |
330 | "{o}"not-strip.c.o \Option-f "{s}"not-strip.c | |
331 | "{o}"nlmheader.c.o \Option-f "{s}"nlmheader.c "{s}"nlmconv.h "{INCDIR}":nlm:common.h \Option-d | |
332 | "{INCDIR}":nlm:internal.h | |
333 | "{o}"nlmconv.c.o \Option-f "{INCDIR}":nlm:common.h "{INCDIR}":nlm:internal.h \Option-d | |
334 | "{BFDDIR}":libnlm.h "{s}"bucomm.h | |
335 | ||
336 | stage1 \Option-f force | |
337 | mkdir stage1 | |
338 | Rename -y {STAGESTUFF} stage1 | |
339 | ||
340 | stage2 \Option-f force | |
341 | mkdir stage2 | |
342 | Rename -y {STAGESTUFF} stage2 | |
343 | ||
344 | stage3 \Option-f force | |
345 | mkdir stage3 | |
346 | Rename -y {STAGESTUFF} stage3 | |
347 | ||
348 | against=stage2 | |
349 | ||
350 | comparison \Option-f force | |
351 | for i in {STAGESTUFF} ; do cmp $$i {against}:$$i ; done | |
352 | ||
353 | de-stage1 \Option-f force | |
354 | (cd stage1 ; mv -f \Option-x ..) | |
355 | rmdir stage1 | |
356 | ||
357 | de-stage2 \Option-f force | |
358 | (cd stage2 ; mv -f \Option-x ..) | |
359 | rmdir stage2 | |
360 | ||
361 | de-stage3 \Option-f force | |
362 | (cd stage3 ; mv -f \Option-x ..) | |
363 | rmdir stage3 | |
364 | ||
365 | ###################################################################### | |
366 | # DOCUMENTATION TARGETS | |
367 | # TeX output | |
368 | binutils.dvi \Option-f "{srcdir}"binutils.texi | |
369 | TEXINPUTS={TEXIDIR} \Option-f $$TEXINPUTS {TEXI2DVI} "{srcdir}"binutils.texi | |
370 | ||
371 | # info file for online browsing | |
372 | binutils.info \Option-f "{srcdir}"binutils.texi | |
373 | {MAKEINFO} -o binutils.info "{srcdir}"binutils.texi | |
374 | ||
375 | # different targets for -ms, -mm, -me | |
376 | # Try to use a recent texi2roff. v2 was put on prep in jan91. | |
377 | # If you want an index, see texi2roff doc for postprocessing | |
378 | # and add -i to texi2roff invocations below. | |
379 | # Workarounds for texi2roff-2 (probably fixed in later texi2roff's, delete | |
380 | # corresponding -e lines when later texi2roff's are current) | |
381 | # + @ifinfo's deleted explicitly due to texi2roff-2 bug w nested constructs. | |
382 | # + @c's deleted explicitly because texi2roff sees texinfo commands in them | |
383 | # + @ (that's at-BLANK) not recognized by texi2roff, turned into blank | |
384 | # + @alphaenumerate is ridiculously new, turned into @enumerate | |
385 | ||
386 | # roff output (-ms) | |
387 | binutils.ms \Option-f "{srcdir}"binutils.texi | |
388 | sed -e ':\\input texinfo:d' \Option-d | |
389 | e ':@c TEXI2ROFF-KILL:,:@c END TEXI2ROFF-KILL:d' \Option-d | |
390 | e ':^end ifinfo:d' \Option-d | |
391 | e ':^@c:d' \Option-d | |
392 | e 's:{.\Option-x,,:{:' \Option-d | |
393 | e 's:@ : :g' \Option-d | |
394 | e 's:^enumerate:g' \Option-d | |
395 | e 's:^@end alphaenumerate:@end enumerate:g' \Option-d | |
396 | "{srcdir}"binutils.texi | \Option-d | |
397 | {TEXI2ROFF} -ms | \Option-d | |
398 | sed -e 's:---:\\(em:g' \Option-d | |
399 | >binutils.ms | |
400 | ||
401 | # roff output (-mm) | |
402 | # '@noindent's removed due to texi2roff-2 mm bug; if yours is newer, | |
403 | # try leaving them in | |
404 | binutils.mm \Option-f "{srcdir}"binutils.texi | |
405 | sed -e ':\\input texinfo:d' \Option-d | |
406 | e ':@c TEXI2ROFF-KILL:,:@c END TEXI2ROFF-KILL:d' \Option-d | |
407 | e ':^end ifinfo:d' \Option-d | |
408 | e ':^@c:d' \Option-d | |
409 | e 's:{.\Option-x,,:{:' \Option-d | |
410 | e ':@noindent:d' \Option-d | |
411 | e 's:@ : :g' \Option-d | |
412 | e 's:^enumerate:g' \Option-d | |
413 | e 's:^@end alphaenumerate:@end enumerate:g' \Option-d | |
414 | "{srcdir}"binutils.texi | \Option-d | |
415 | {TEXI2ROFF} -mm | \Option-d | |
416 | sed -e 's:---:\\(em:g' \Option-d | |
417 | >binutils.mm | |
418 | ||
419 | # roff output (-me) | |
420 | binutils.me \Option-f "{srcdir}"binutils.texi | |
421 | sed -e ':\\input texinfo:d' \Option-d | |
422 | e ':@c TEXI2ROFF-KILL:,:@c END TEXI2ROFF-KILL:d' \Option-d | |
423 | e ':^end ifinfo:d' \Option-d | |
424 | e ':^@c:d' \Option-d | |
425 | e 's:{.\Option-x,,:{:' \Option-d | |
426 | e 's:@ : :g' \Option-d | |
427 | e 's:^enumerate:g' \Option-d | |
428 | e 's:^@end alphaenumerate:@end enumerate:g' \Option-d | |
429 | "{srcdir}"binutils.texi | \Option-d | |
430 | {TEXI2ROFF} -me | \Option-d | |
431 | sed -e 's:---:\\(em:g' \Option-d | |
432 | >binutils.me | |
433 | ||
434 | ||
435 | ###################################################################### | |
436 | ||
437 | mostlyclean \Option-f | |
438 | Delete -y "{o}"\Option-x.c.o \Option-x~ \#\Option-x core binutils.?? binutils.??? | |
439 | clean \Option-f mostlyclean | |
440 | @if [ -d testsuite ] ; then \Option-d | |
441 | cd testsuite ; {MAKE} {FLAGS_TO_PASS} clean ; \Option-d | |
442 | else true; fi | |
443 | Delete -y {PROGS} :underscore.c | |
444 | distclean \Option-f | |
445 | @if [ -d testsuite ] ; then \Option-d | |
446 | cd testsuite ; {MAKE} {FLAGS_TO_PASS} distclean ; \Option-d | |
447 | else true; fi | |
448 | Delete -y Makefile config.status "{s}"sysdep.h "{o}"\Option-x.c.o \Option-x~ \#\Option-x core \Option-d | |
449 | binutils.?? binutils.??s binutils.aux "{s}"binutils.log binutils.toc | |
450 | realclean \Option-f clean distclean | |
451 | Delete -y {DISTSTUFF} TAGS | |
452 | ||
453 | etags tags \Option-f TAGS | |
454 | ||
455 | TAGS \Option-f force | |
456 | etags {INCDIR}:\Option-x.h "{srcdir}"\Option-x.[hc] | |
457 | ||
6153f5bb SS |
458 | install \Option-f all install-only |
459 | ||
460 | install-only \Option-f | |
6cc30a11 SS |
461 | If "`Exists "{prefix}"`" == "" |
462 | Echo "{prefix}" does not exist, cannot install anything | |
463 | Exit 1 | |
464 | End If | |
465 | If "`Exists "{bindir}"`" == "" | |
466 | NewFolder "{bindir}" | |
467 | End If | |
468 | # Need to copy all the tools | |
469 | For prog in {PROGS} | |
470 | Duplicate -y :{prog} "{bindir}"{prog} | |
471 | End For | |
5fd51993 SS |
472 | |
473 | # Use binutils.info as the target so that VPATH will DTRT. | |
474 | # (Use "$<\Option-x" in case the output is multiple files, though.) | |
475 | install-info \Option-f binutils.info | |
476 | for i in $<\Option-x ; do \Option-d | |
477 | {INSTALL_DATA} $$i {infodir}:$$i ; \Option-d | |
478 | done | |
479 | ||
480 | clean-info \Option-f | |
481 | Delete -y -rf \Option-x.info\Option-x | |
482 | ||
483 | # Making a dist \Option-f | |
484 | # cvs rtag binutils-x-yy ld+utils | |
485 | # cvs co -r binutils-x-yy ld+utils | |
486 | # Sanitize | |
487 | # cd {HERE}; make dist [-f Makefile.in] | |
488 | ||
489 | dist \Option-f {DIST_NAME}.tar.z | |
490 | ||
491 | diststuff \Option-f {DISTSTUFF} | |
492 | ||
493 | {DIST_NAME}.tar.z \Option-f | |
494 | cd ::..; rm -f {DIST_NAME}; ln -s devo {DIST_NAME} | |
495 | make diststuff -f Makefile.in | |
496 | cd ::ld; make diststuff -f Makefile.in | |
497 | cd ::gprof; make diststuff -f Makefile.in | |
498 | cd ::texinfo; mv texinfo.tex ..; rm -rf \Option-x; mv ::texinfo.tex . | |
499 | # Take out texinfo from configurable dirs | |
500 | Rename -y ::configure.in tmp; \Option-d | |
501 | sed -e ':^host_tools=:s:texinfo ::' <tmp >::configure.in; rm tmp | |
502 | cd ..; chmod og=u `find . -print` | |
503 | cd ::..; tar chf - {DIST_NAME} | gzip >{DIST_NAME}.tar.z | |
504 | Delete -y -rf ::::{DIST_NAME} | |
505 | ||
506 | #----------------------------------------------------------------------------- | |
507 | # 'STANDARD' GNU:960 TARGETS BELOW THIS POINT | |
508 | # | |
509 | # 'VERSION' file must be present and contain a string of the form "{s}""x.y" | |
510 | #----------------------------------------------------------------------------- | |
511 | ||
512 | ver960.c \Option-f FORCE | |
513 | Delete -y "{s}"ver960.c | |
514 | echo "char {TARG}_ver[]= \"{TARG} `cat VERSION`, `date`\";" > "{s}"ver960.c | |
515 | ||
516 | ||
517 | # Dummy target to force execution of dependent targets. | |
518 | # | |
519 | force \Option-f | |
520 | ||
521 | # Target to uncomment host-specific lines in this makefile. Such lines must | |
522 | # have the following string beginning in column 1 \Option-f #__<hostname>__# | |
523 | # Original Makefile is backed up as "{o}"'Makefile.c.old'. | |
524 | # | |
525 | # Invoke with \Option-f make make HOST=xxx | |
526 | # | |
527 | make \Option-f | |
528 | @if test {HOST}x = x ; then \Option-d | |
529 | echo '\aSpecify "make make HOST=???"'; \Option-d | |
530 | exit 1; \Option-d | |
531 | fi ; \Option-d | |
532 | grep -s "^#The next line was generated by 'make make'" Makefile; \Option-d | |
533 | if test $$? = 0 ; then \Option-d | |
534 | echo "\aMakefile has already been processed with 'make make'";\Option-d | |
535 | exit 1; \Option-d | |
536 | fi ; \Option-d | |
537 | Rename -y Makefile "{o}"Makefile.c.old; \Option-d | |
538 | echo "#The next line was generated by 'make make'" >Makefile ; \Option-d | |
539 | echo "HOST={HOST}" >>Makefile ; \Option-d | |
540 | echo >>Makefile ; \Option-d | |
541 | sed "s:^#__{HOST}__#::" < "{o}"Makefile.c.old >>Makefile | |
542 | ||
543 | Makefile \Option-f "{srcdir}"Makefile.in {host_makefile_frag} {target_makefile_frag} | |
544 | {SHELL} :config.status | |
545 | ||
546 | ### Local Variables \Option-f \Option-x\Option-x\Option-x | |
547 | ### mode \Option-f fundamental \Option-x\Option-x\Option-x | |
548 | ### page-delimiter \Option-f "^#\f" \Option-x\Option-x\Option-x | |
549 | ### End \Option-f \Option-x\Option-x\Option-x | |
550 | ### end of file |