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