961d7833c46868e1a834d4c093ff72a700d9bc9d
[deliverable/binutils-gdb.git] / binutils / Makefile.in
1 # Makefile for GNU binary-file utilities
2 # Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
3
4 # This file is part of GNU binutils.
5
6 # This program 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 of the License, or
9 # (at your option) any later version.
10 #
11 # This program 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 this program; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19
20 srcdir = .
21
22 prefix = /usr/local
23
24 program_transform_name =
25 exec_prefix = $(prefix)
26 bindir = $(exec_prefix)/bin
27 libdir = $(exec_prefix)/lib
28 tooldir = $(exec_prefix)/$(target_alias)
29
30 datadir = $(prefix)/lib
31 mandir = $(prefix)/man
32 man1dir = $(mandir)/man1
33 man2dir = $(mandir)/man2
34 man3dir = $(mandir)/man3
35 man4dir = $(mandir)/man4
36 man5dir = $(mandir)/man5
37 man6dir = $(mandir)/man6
38 man7dir = $(mandir)/man7
39 man8dir = $(mandir)/man8
40 man9dir = $(mandir)/man9
41 infodir = $(prefix)/info
42 includedir = $(prefix)/include
43 docdir = $(datadir)/doc
44
45 SHELL = /bin/sh
46
47 INSTALL = `cd $(srcdir)/..;pwd`/install.sh -c
48 INSTALL_PROGRAM = $(INSTALL)
49 INSTALL_DATA = $(INSTALL)
50 INSTALL_XFORM = $(INSTALL) -t='$(program_transform_name)'
51 INSTALL_XFORM1 = $(INSTALL_XFORM) -b=.1
52
53 AR = ar
54 AR_FLAGS = rc
55 CC = @CC@
56 CFLAGS = @CFLAGS@
57 LDFLAGS = @LDFLAGS@
58 MAKEINFO = makeinfo
59 TEXI2DVI = texi2dvi
60 RANLIB = ranlib
61 BISONFLAGS = -d
62 TEXI2ROFF=texi2roff
63 MAKEOVERRIDES=
64 CC_FOR_BUILD = $(CC)
65 NM_FOR_TARGET = nm
66 NM = $(NM_FOR_TARGET)
67 SYMLINK = ln -s
68
69 BISON = `if [ -f ../bison/bison ] ; then echo ../bison/bison -y -L../bison/bison ; else echo bison -y ; fi`
70 # Comment these out if using lex.
71 LEX_OPTIONS = -I -Cem
72 LEX = `if [ -f ../flex/flex ] ; then echo ../flex/flex ; else echo flex ; fi`
73
74 # Distribution version
75 VERSION=cygnus-2.5.3
76 # Distribution name
77 DIST_NAME=binutils-${VERSION}
78
79 version=`./../gcc/gcc -dumpversion`
80
81 # Where to find texinfo.tex to format docn with TeX
82 TEXIDIR = $(srcdir)/../texinfo
83
84 #CC=gcc -Wall
85 CC=cc
86 # these two are almost the same program
87 AR_PROG=ar
88 RANLIB_PROG=ranlib
89
90 # objcopy and strip should be the same program
91 OBJCOPY_PROG=objcopy
92 STRIP_PROG=strip.new
93
94 STRINGS_PROG=strings
95
96 # These should all be the same program too.
97 SIZE_PROG=size
98 NM_PROG=nm.new
99 OBJDUMP_PROG=objdump
100
101 # This is the demangler, as a standalone program.
102 # Note: This one is used as the installed name too, unlike the above.
103 DEMANGLER_PROG=c++filt
104
105 NLMCONV_PROG=nlmconv
106 DLLTOOL_PROG=dlltool
107
108 SRCONV_PROG=srconv sysdump coffdump
109
110
111
112 MANPAGES= ar nm objdump ranlib size strings strip objcopy nlmconv
113
114 PROGS = $(SIZE_PROG) $(OBJDUMP_PROG) $(NM_PROG) $(AR_PROG) $(STRINGS_PROG) $(STRIP_PROG) $(RANLIB_PROG) $(DEMANGLER_PROG) $(OBJCOPY_PROG) $(BUILD_NLMCONV) $(BUILD_SRCONV) $(SYSINFO_PROG) $(BUILD_DLLTOOL)
115 STAGESTUFF = $(PROGS) *.o
116 # Files that can be generated, but should be in the distribution.
117 # Don't build $(DEMANGLER_PROG).1, since its name may vary with the
118 # configuration.
119 DISTSTUFF=arparse.c arparse.h arlex.c nlmheader.c sysinfo.c sysinfo.h syslex.c
120
121 # Stuff that goes in tooldir/ if appropriate
122 TOOL_PROGS = nm.new strip.new ar ranlib $(DLLTOOL)
123
124 BASEDIR = $(srcdir)/..
125 BFDDIR = $(BASEDIR)/bfd
126 INCDIR = $(BASEDIR)/include
127 INCLUDES = -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR)
128
129 #### host and target dependant Makefile fragments come in here.
130 ###
131
132 ALL_CFLAGS = $(INCLUDES) @HDEFINES@ $(TDEFINES) $(CFLAGS)
133
134 .c.o:
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 = alloca.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 = gmalloc.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.a
156
157 # Code shared by all the binutils.
158 BULIBS = bucomm.o version.o filemode.o
159
160 ADDL_LIBS = $(MALLOC) $(BULIBS) $(BFD) $(LIBIBERTY)
161
162 BFD = ../bfd/libbfd.a
163 OPCODES = ../opcodes/libopcodes.a
164
165 EXPECT = `if [ -f $${rootme}/../expect/expect ] ; then \
166 echo $${rootme}/../expect/expect ; \
167 else echo expect ; fi`
168 RUNTEST = `if [ -f ${srcdir}/../dejagnu/runtest ] ; then \
169 echo ${srcdir}/../dejagnu/runtest ; \
170 else echo runtest ; fi`
171 RUNTESTFLAGS =
172
173 FLAGS_TO_PASS = \
174 "CC=$(CC)" \
175 "CFLAGS=$(CFLAGS)" \
176 "RUNTEST=$(RUNTEST)" \
177 "RUNTESTFLAGS=$(RUNTESTFLAGS)"
178 #\f
179 ## The rules
180
181 all: $(ADDL_LIBS) $(PROGS)
182
183 # These targets are for the dejagnu testsuites. The file site.exp
184 # contains global variables that all the testsuites will use.
185
186 site.exp: ./config.status Makefile
187 @echo "Making a new config file..."
188 @rm -f ./tmp?
189 @touch site.exp
190 @mv site.exp site.bak
191 @echo "## variables are automatically generated by make ##" > ./tmp0
192 @echo "# Do not edit here. If you wish to override these" >> ./tmp0
193 @echo "# values, add them to the last section" >> ./tmp0
194 @echo "# HOST AND TARGET INFO" >> ./tmp0
195 @echo "set host_os $(host_os)" >> ./tmp0
196 @echo "set host_alias $(host_alias)" >> ./tmp0
197 @echo "set host_cpu $(host_cpu)" >> ./tmp0
198 @echo "set host_vendor $(host_vendor)" >> ./tmp0
199 @echo "set target_os $(target_os)" >> ./tmp0
200 @echo "set target_alias $(target_alias)" >> ./tmp0
201 @echo "set target_cpu $(target_cpu)" >> ./tmp0
202 @echo "set target_vendor $(target_vendor)" >> ./tmp0
203 @echo "set host_triplet $(host_canonical)" >> ./tmp0
204 @echo "set target_triplet $(target_canonical)" >> ./tmp0
205 @echo "# DIRECTORY INFO" >> ./tmp0
206 @echo "set objdir `pwd`" >> ./tmp0
207 @echo "" >> ./tmp0
208 @echo "## Variables generated by configure. Do Not Edit ##" >> ./tmp0
209 @cat ./tmp0 > site.exp
210 @cat site.bak | sed \
211 -e '1,/^## Variables generated by.*##/ d' >> site.exp
212 -@rm -f ./tmp?
213
214 check: site.exp
215 rootme=`pwd`; export rootme ; \
216 srcroot=`cd ${srcdir}; pwd` ; export srcroot ; \
217 EXPECT=${EXPECT} ; export EXPECT ; \
218 if [ -f $$rootme/../expect/expect ] ; then \
219 TCL_LIBRARY=$${srcroot}/../tcl/library ; \
220 export TCL_LIBRARY ; else true; fi ; \
221 $(RUNTEST) --tool binutils --srcdir $(srcdir)/testsuite \
222 $(RUNTESTFLAGS)
223
224 installcheck:
225 /bin/sh $(srcdir)/sanity.sh $(bindir)
226
227 info: binutils.info
228
229 dvi: binutils.dvi
230
231 $(SIZE_PROG): $(ADDL_LIBS) size.o $(BFD)
232 $(CC) $(CFLAGS) $(LDFLAGS) -o $(SIZE_PROG) size.o $(ADDL_LIBS) $(EXTRALIBS)
233
234 $(OBJCOPY_PROG): $(ADDL_LIBS) objcopy.o not-strip.o $(BFD)
235 $(CC) $(CFLAGS) $(LDFLAGS) -o $(OBJCOPY_PROG) objcopy.o not-strip.o $(ADDL_LIBS) $(EXTRALIBS)
236
237 $(STRINGS_PROG): $(ADDL_LIBS) strings.o $(BFD)
238 $(CC) $(CFLAGS) $(LDFLAGS) -o $(STRINGS_PROG) strings.o $(ADDL_LIBS) $(EXTRALIBS)
239
240 $(STRIP_PROG): $(ADDL_LIBS) objcopy.o is-strip.o $(BFD)
241 $(CC) $(CFLAGS) $(LDFLAGS) -o $(STRIP_PROG) objcopy.o is-strip.o $(ADDL_LIBS) $(EXTRALIBS)
242
243 $(NM_PROG): $(ADDL_LIBS) nm.o $(BFD)
244 $(CC) $(CFLAGS) $(LDFLAGS) -o $(NM_PROG) nm.o $(ADDL_LIBS) $(EXTRALIBS)
245
246 $(OBJDUMP_PROG): $(ADDL_LIBS) objdump.o $(BFD) $(OPCODES)
247 $(CC) $(CFLAGS) $(LDFLAGS) -o $(OBJDUMP_PROG) objdump.o $(OPCODES) $(ADDL_LIBS) $(EXTRALIBS)
248
249 underscore.c: Makefile
250 rm -f underscore.c
251 echo '/*WARNING: This file is automatically generated!*/' >underscore.t
252 echo "int prepends_underscore = $(UNDERSCORE);" >>underscore.t
253 mv -f underscore.t underscore.c
254
255 version.o: version.c Makefile
256 $(CC) $(INCLUDES) $(HDEFINES) $(TDEFINES) -DVERSION='"$(VERSION)"' $(CFLAGS) -c $(srcdir)/version.c
257
258 cplus-dem.o: $(BASEDIR)/libiberty/cplus-dem.c $(INCDIR)/getopt.h
259 $(CC) -c -DMAIN -DVERSION='"$(VERSION)"' $(INCLUDES) $(HDEFINES) $(TDEFINES) $(CFLAGS) $(BASEDIR)/libiberty/cplus-dem.c
260
261 $(DEMANGLER_PROG): cplus-dem.o $(LIBIBERTY) underscore.o
262 $(CC) $(CFLAGS) $(LDFLAGS) -o $(DEMANGLER_PROG) cplus-dem.o $(LIBIBERTY) $(EXTRALIBS) underscore.o
263
264 arparse.c: arparse.y
265 $(BISON) $(BISONFLAGS) $(srcdir)/arparse.y
266 mv -f y.tab.c arparse.c
267 mv -f y.tab.h arparse.h
268
269 # Separate from arparse.c so that a parallel make doesn't try to build
270 # both arparse.c and arparse.h simultaneously.
271 arparse.h: arparse.c
272
273 arlex.c: arlex.l
274 $(LEX) $(LEX_OPTIONS) $(srcdir)/arlex.l
275 mv lex.yy.c arlex.c
276
277 $(AR_PROG): $(ADDL_LIBS) ar.o arparse.o arlex.o not-ranlib.o $(BFD) arsup.o
278 $(CC) $(CFLAGS) $(LDFLAGS) -o $(AR_PROG) ar.o arparse.o arlex.o arsup.o not-ranlib.o $(ADDL_LIBS) $(EXTRALIBS)
279
280 $(RANLIB_PROG): $(ADDL_LIBS) ar.o is-ranlib.o arparse.o arlex.o arsup.o $(BFD)
281 $(CC) $(CFLAGS) $(LDFLAGS) -o $(RANLIB_PROG) ar.o arparse.o arlex.o arsup.o is-ranlib.o $(ADDL_LIBS) $(EXTRALIBS)
282
283 # This rule creates a single binary that switches between ar and ranlib
284 # by looking at argv[0]. Use this kludge to save some disk space.
285 # However, you have to install things by hand.
286 # (That is after 'make install', replace the installed ranlib by a link to ar.)
287
288 # Alternatively, you can install ranlib.sh as ranlib.
289
290 ar_with_ranlib: $(ADDL_LIBS) ar.o maybe-ranlib.o $(BFD)
291 $(CC) $(CFLAGS) $(LDFLAGS) -o $(AR_PROG) ar.o maybe-ranlib.o $(ADDL_LIBS) $(EXTRALIBS)
292 -rm -f $(RANLIB_PROG)
293 -ln $(AR_PROG) $(RANLIB_PROG)
294
295 # objcopy and strip in one binary that uses argv[0] to decide its action.
296
297 objcopy_with_strip: $(ADDL_LIBS) objcopy.o maybe-strip.o $(BFD)
298 $(CC) $(CFLAGS) $(LDFLAGS) -o $(OBJCOPY_PROG) objcopy.o maybe-strip.o $(ADDL_LIBS) $(EXTRALIBS)
299 -rm -f $(STRIP_PROG)
300 -ln $(OBJCOPY_PROG) $(STRIP_PROG)
301
302 sysroff.c: sysinfo sysroff.info
303 ./sysinfo -c <$(srcdir)/sysroff.info >sysroff.c
304 ./sysinfo -i <$(srcdir)/sysroff.info >>sysroff.c
305 ./sysinfo -g <$(srcdir)/sysroff.info >>sysroff.c
306
307 sysroff.h: sysinfo sysroff.info
308 ./sysinfo -d <$(srcdir)/sysroff.info >sysroff.h
309
310 # Depend upon arparse.c to avoid building both arparse.c and sysinfo.c
311 # simultaneously.
312 sysinfo.c: sysinfo.y arparse.c
313 $(BISON) -tvd $(srcdir)/sysinfo.y
314 rm -f sysinfo.c
315 mv -f y.tab.c sysinfo.c
316 mv -f y.tab.h sysinfo.h
317
318 # Separate from sysinfo.c so that a parallel make doesn't try to build
319 # both sysinfo.c and sysinfo.h simultaneously.
320 sysinfo.h: sysinfo.c
321
322 syslex.c : syslex.l
323 $(LEX) $(LEX_OPTIONS) $(srcdir)/syslex.l
324 mv lex.yy.c syslex.c
325
326 sysinfo: sysinfo.o syslex.o
327 $(CC_FOR_BUILD) $(CFLAGS) $(LDFLAGS) -o $@ sysinfo.o syslex.o
328
329 syslex.o: syslex.c sysinfo.h
330 if [ -r syslex.c ]; then \
331 $(CC_FOR_BUILD) -c -I. $(CFLAGS) syslex.c ; \
332 else \
333 $(CC_FOR_BUILD) -c -I. $(CFLAGS) $(srcdir)/syslex.c ;\
334 fi
335
336 sysinfo.o: sysinfo.c
337 if [ -r sysinfo.c ]; then \
338 $(CC_FOR_BUILD) -c -I. $(CFLAGS) sysinfo.c ; \
339 else \
340 $(CC_FOR_BUILD) -c -I. $(CFLAGS) $(srcdir)/sysinfo.c ; \
341 fi
342
343 srconv.o: srconv.c sysroff.h sysroff.c coffgrok.h $(INCDIR)/coff/internal.h \
344 ../bfd/libcoff.h
345
346 srconv: srconv.o coffgrok.o $(ADDL_LIBS)
347 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ srconv.o coffgrok.o $(ADDL_LIBS) $(EXTRALIBS)
348
349 dlltool:dlltool.o defparse.o deflex.o
350 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ dlltool.o defparse.o deflex.o $(ADDL_LIBS) $(EXTRALIBS)
351
352 defparse.c:defparse.y
353 $(BISON) $(BISONFLAGS) $(srcdir)/defparse.y
354 mv -f y.tab.c defparse.c
355 mv -f y.tab.h defparse.h
356
357 defparse.h: defparse.c
358
359 deflex.c:deflex.l
360 $(LEX) $(LEX_OPTIONS) $(srcdir)/deflex.l
361 mv lex.yy.c deflex.c
362
363 dlltool.o:dlltool.c
364 $(CC) -c $(INCLUDES) $(HDEFINES) $(TDEFINES) $(DLLTOOL_DEFS) $(CFLAGS) $(srcdir)/dlltool.c
365
366 coffdump: coffdump.o coffgrok.o $(ADDL_LIBS)
367 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ coffdump.o coffgrok.o $(ADDL_LIBS) $(EXTRALIBS)
368
369 sysdump.o: sysdump.c sysroff.h sysroff.c
370
371 sysdump: sysdump.o $(ADDL_LIBS)
372 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ sysdump.o $(ADDL_LIBS) $(EXTRALIBS)
373
374 # Depend upon sysinfo.c to avoid building both nlmheader.c and sysinfo.c
375 # simultaneously.
376 nlmheader.c: nlmheader.y sysinfo.c
377 $(BISON) $(srcdir)/nlmheader.y
378 rm -f nlmheader.c
379 mv -f y.tab.c nlmheader.c
380
381 nlmconv.o: nlmconv.c
382 ldname=`t='$(program_transform_name)'; echo ld | sed -e "s/brokensed/brokensed/" $$t`; \
383 $(CC) -c -DLD_NAME="\"$${ldname}\"" $(INCLUDES) $(HDEFINES) $(TDEFINES) $(NLMCONV_DEFS) $(CFLAGS) $(srcdir)/nlmconv.c
384
385 $(NLMCONV_PROG): nlmconv.o nlmheader.o $(ADDL_LIBS) $(BFD)
386 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ nlmconv.o nlmheader.o $(ADDL_LIBS) $(EXTRALIBS)
387
388 # This list of dependencies was generated by doing a make with gcc -MM
389 # saving the output in a file and removing the gcc commands
390 # changing "../../devo/binutils/../bfd" to "$(BFDDIR)"
391 # removing "../../devo/binutils/"
392 # changing "../include" to "$(INCDIR)"
393
394 bucomm.o: bucomm.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
395 $(INCDIR)/obstack.h ../bfd/sysdep.h $(BFDDIR)/hosts/std-host.h \
396 $(INCDIR)/fopen-same.h bucomm.h
397 filemode.o: filemode.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
398 $(INCDIR)/obstack.h ../bfd/sysdep.h $(BFDDIR)/hosts/std-host.h \
399 $(INCDIR)/fopen-same.h
400 size.o: size.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
401 $(INCDIR)/obstack.h ../bfd/sysdep.h $(BFDDIR)/hosts/std-host.h \
402 $(INCDIR)/fopen-same.h $(INCDIR)/getopt.h
403 objdump.o: objdump.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
404 $(INCDIR)/obstack.h ../bfd/sysdep.h $(BFDDIR)/hosts/std-host.h \
405 $(INCDIR)/fopen-same.h $(INCDIR)/getopt.h \
406 $(INCDIR)/dis-asm.h $(INCDIR)/aout/aout64.h \
407 $(INCDIR)/elf/internal.h $(INCDIR)/aout/stab.def
408 nm.o: nm.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
409 $(INCDIR)/obstack.h ../bfd/sysdep.h $(BFDDIR)/hosts/std-host.h \
410 $(INCDIR)/fopen-same.h bucomm.h $(INCDIR)/getopt.h \
411 $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
412 $(INCDIR)/aout/ranlib.h $(INCDIR)/demangle.h
413 ar.o: ar.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
414 $(INCDIR)/obstack.h ../bfd/sysdep.h $(BFDDIR)/hosts/std-host.h \
415 $(INCDIR)/fopen-same.h bucomm.h $(INCDIR)/aout/ar.h \
416 $(BFDDIR)/libbfd.h arsup.h
417 arparse.o: arparse.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
418 $(INCDIR)/obstack.h arsup.h
419 arlex.o: arlex.c ./arparse.h
420 not-ranlib.o: not-ranlib.c
421 arsup.o: arsup.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
422 $(INCDIR)/obstack.h arsup.h bucomm.h
423 strings.o: strings.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
424 $(INCDIR)/obstack.h bucomm.h
425 objcopy.o: objcopy.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
426 $(INCDIR)/obstack.h ../bfd/sysdep.h $(BFDDIR)/hosts/std-host.h \
427 $(INCDIR)/fopen-same.h bucomm.h
428 is-strip.o: is-strip.c
429 is-ranlib.o: is-ranlib.c
430 not-strip.o: not-strip.c
431 nlmheader.o: nlmheader.c ../bfd/bfd.h ../bfd/sysdep.h \
432 $(BFDDIR)/hosts/std-host.h $(INCDIR)/fopen-same.h bucomm.h \
433 $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h nlmconv.h
434 nlmconv.o: nlmconv.c ../bfd/bfd.h $(INCDIR)/libiberty.h ../bfd/sysdep.h \
435 $(BFDDIR)/hosts/std-host.h $(INCDIR)/fopen-same.h bucomm.h \
436 $(BFDDIR)/libnlm.h $(INCDIR)/nlm/common.h \
437 $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h nlmconv.h \
438 $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h
439
440 stage1: force
441 - mkdir stage1
442 - mv -f $(STAGESTUFF) stage1
443
444 stage2: force
445 - mkdir stage2
446 - mv -f $(STAGESTUFF) stage2
447
448 stage3: force
449 - mkdir stage3
450 - mv -f $(STAGESTUFF) stage3
451
452 against=stage2
453
454 comparison: force
455 for i in $(STAGESTUFF) ; do cmp $$i $(against)/$$i ; done
456
457 de-stage1: force
458 - (cd stage1 ; mv -f * ..)
459 - rmdir stage1
460
461 de-stage2: force
462 - (cd stage2 ; mv -f * ..)
463 - rmdir stage2
464
465 de-stage3: force
466 - (cd stage3 ; mv -f * ..)
467 - rmdir stage3
468
469 ###
470 # DOCUMENTATION TARGETS
471 config.texi: Makefile
472 rm -f config.texi
473 echo '@set VERSION $(VERSION)' > config.texi
474 # TeX output
475 binutils.dvi: $(srcdir)/binutils.texi config.texi
476 TEXINPUTS=$(TEXIDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/binutils.texi
477
478 # info file for online browsing
479 binutils.info: $(srcdir)/binutils.texi config.texi
480 $(MAKEINFO) -o binutils.info $(srcdir)/binutils.texi
481
482 $(DEMANGLER_PROG).1: cxxfilt.man Makefile
483 sed -e 's/@PROGRAM@/$(DEMANGLER_PROG)/' < $(srcdir)/cxxfilt.man \
484 > $(DEMANGLER_PROG).1
485
486 # different targets for -ms, -mm, -me
487 # Try to use a recent texi2roff. v2 was put on prep in jan91.
488 # If you want an index, see texi2roff doc for postprocessing
489 # and add -i to texi2roff invocations below.
490 # Workarounds for texi2roff-2 (probably fixed in later texi2roff's, delete
491 # corresponding -e lines when later texi2roff's are current)
492 # + @ifinfo's deleted explicitly due to texi2roff-2 bug w nested constructs.
493 # + @c's deleted explicitly because texi2roff sees texinfo commands in them
494 # + @ (that's at-BLANK) not recognized by texi2roff, turned into blank
495 # + @alphaenumerate is ridiculously new, turned into @enumerate
496
497 # roff output (-ms)
498 binutils.ms: $(srcdir)/binutils.texi
499 sed -e '/\\input texinfo/d' \
500 -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
501 -e '/^@ifinfo/,/^@end ifinfo/d' \
502 -e '/^@c/d' \
503 -e 's/{.*,,/{/' \
504 -e 's/@ / /g' \
505 -e 's/^@alphaenumerate/@enumerate/g' \
506 -e 's/^@end alphaenumerate/@end enumerate/g' \
507 $(srcdir)/binutils.texi | \
508 $(TEXI2ROFF) -ms | \
509 sed -e 's/---/\\(em/g' \
510 >binutils.ms
511
512 # roff output (-mm)
513 # '@noindent's removed due to texi2roff-2 mm bug; if yours is newer,
514 # try leaving them in
515 binutils.mm: $(srcdir)/binutils.texi
516 sed -e '/\\input texinfo/d' \
517 -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
518 -e '/^@ifinfo/,/^@end ifinfo/d' \
519 -e '/^@c/d' \
520 -e 's/{.*,,/{/' \
521 -e '/@noindent/d' \
522 -e 's/@ / /g' \
523 -e 's/^@alphaenumerate/@enumerate/g' \
524 -e 's/^@end alphaenumerate/@end enumerate/g' \
525 $(srcdir)/binutils.texi | \
526 $(TEXI2ROFF) -mm | \
527 sed -e 's/---/\\(em/g' \
528 >binutils.mm
529
530 # roff output (-me)
531 binutils.me: $(srcdir)/binutils.texi
532 sed -e '/\\input texinfo/d' \
533 -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
534 -e '/^@ifinfo/,/^@end ifinfo/d' \
535 -e '/^@c/d' \
536 -e 's/{.*,,/{/' \
537 -e 's/@ / /g' \
538 -e 's/^@alphaenumerate/@enumerate/g' \
539 -e 's/^@end alphaenumerate/@end enumerate/g' \
540 $(srcdir)/binutils.texi | \
541 $(TEXI2ROFF) -me | \
542 sed -e 's/---/\\(em/g' \
543 >binutils.me
544
545
546 ###
547
548 mostlyclean:
549 -rm -f *.o *~ \#* core binutils.?? binutils.??? y.output
550 -rm -rf tmpdir
551 clean: mostlyclean
552 -rm -f $(PROGS) underscore.c sysroff sysroff.c sysroff.h sysinfo
553 distclean:
554 -rm -f Makefile config.status sysdep.h *.o *~ \#* core y.* \
555 binutils.?? binutils.??s binutils.aux binutils.log binutils.toc
556 -rm -f $(PROGS) underscore.c
557 realclean: clean distclean
558 -rm -f $(DISTSTUFF) *.info TAGS
559
560 etags tags: TAGS
561
562 TAGS: force
563 etags $(INCDIR)/*.h $(srcdir)/*.[hc]
564
565 install: all $(DEMANGLER_PROG).1
566 for i in $(PROGS) ; do \
567 $(INSTALL_XFORM) $$i $(bindir)/`echo $$i | sed -e 's/.new//'` ; \
568 done
569 for i in $(MANPAGES) ; do \
570 $(INSTALL_XFORM1) $(srcdir)/$$i.1 $(man1dir)/$$i.1 ; \
571 done
572 $(INSTALL_XFORM1) $(DEMANGLER_PROG).1 $(man1dir)/$(DEMANGLER_PROG).1
573 -if [ -d $(tooldir) ]; then \
574 if [ -d $(tooldir)/bin ]; then true; else mkdir $(tooldir)/bin; fi; \
575 for i in $(TOOL_PROGS) ; do \
576 j=`echo $$i | sed -e 's/.new//'`; \
577 rm -f $(tooldir)/bin/$$j; \
578 k=`t='$(program_transform_name)'; echo $$j | sed -e s/x/x/ $$t`; \
579 ln $(bindir)/$$k $(tooldir)/bin/$$j >/dev/null 2>/dev/null \
580 || $(INSTALL_PROGRAM) $$i $(tooldir)/bin/$$j; \
581 done; \
582 else true; fi
583
584 # This little path search is required because in the FSF net releases,
585 # the info files are included in the source tree, and that may not be
586 # the same as the build directory.
587 install-info: binutils.info
588 if [ -r binutils.info ]; then \
589 dir=. ; \
590 else \
591 dir=$(srcdir) ; \
592 fi ; \
593 for i in `cd $$dir; echo binutils.info*` ; do \
594 $(INSTALL_DATA) $$dir/$$i $(infodir)/$$i ; \
595 done
596
597 clean-info:
598 -rm -rf *.info*
599
600 # Making a dist:
601 # cvs rtag binutils-x-yy ld+utils
602 # cvs co -r binutils-x-yy ld+utils
603 # Sanitize
604 # cd {HERE}; make dist [-f Makefile.in]
605
606 dist: $(DIST_NAME).tar.z
607
608 diststuff: $(DISTSTUFF) info
609
610 $(DIST_NAME).tar.z:
611 cd ../..; rm -f $(DIST_NAME); ln -s devo $(DIST_NAME)
612 make diststuff -f Makefile.in
613 cd ../ld; make diststuff -f Makefile.in
614 cd ../gprof; make diststuff -f Makefile.in
615 cd ../texinfo; mv texinfo.tex ..; rm -rf *; mv ../texinfo.tex .
616 # Take out texinfo from configurable dirs
617 mv ../configure.in tmp; \
618 sed -e '/^host_tools=/s/texinfo //' <tmp >../configure.in; rm tmp
619 cd ..; chmod og=u `find . -print`
620 cd ../..; tar chf - $(DIST_NAME) | gzip >$(DIST_NAME).tar.z
621 rm -rf ../../$(DIST_NAME)
622
623 #-----------------------------------------------------------------------------
624 # 'STANDARD' GNU/960 TARGETS BELOW THIS POINT
625 #
626 # 'VERSION' file must be present and contain a string of the form "x.y"
627 #-----------------------------------------------------------------------------
628
629 ver960.c: FORCE
630 rm -f ver960.c
631 echo "char ${TARG}_ver[]= \"${TARG} `cat VERSION`, `date`\";" > ver960.c
632
633
634 # Dummy target to force execution of dependent targets.
635 #
636 force:
637
638 # Target to uncomment host-specific lines in this makefile. Such lines must
639 # have the following string beginning in column 1: #__<hostname>__#
640 # Original Makefile is backed up as 'Makefile.old'.
641 #
642 # Invoke with: make make HOST=xxx
643 #
644 make:
645 -@if test $(HOST)x = x ; then \
646 echo '\aSpecify "make make HOST=???"'; \
647 exit 1; \
648 fi ; \
649 grep -s "^#The next line was generated by 'make make'" Makefile; \
650 if test $$? = 0 ; then \
651 echo "\aMakefile has already been processed with 'make make'";\
652 exit 1; \
653 fi ; \
654 mv -f Makefile Makefile.old; \
655 echo "#The next line was generated by 'make make'" >Makefile ; \
656 echo "HOST=$(HOST)" >>Makefile ; \
657 echo >>Makefile ; \
658 sed "s/^#__$(HOST)__#//" < Makefile.old >>Makefile
659
660 Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
661 $(SHELL) ./config.status
662
663 ### Local Variables: ***
664 ### mode:fundamental ***
665 ### page-delimiter: "^#\f" ***
666 ### End: ***
667 ### end of file
This page took 0.0429 seconds and 4 git commands to generate.