Adding diff to the fray.
[deliverable/binutils-gdb.git] / Makefile.in
CommitLineData
eb02fd64 1#
131a3881 2# Makefile for directory with subdirs to build.
4dfe09da 3# Copyright (C) 1990, 1991 Cygnus Support
eb02fd64 4#
4dfe09da
RP
5# This file is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation; either version 2 of the License, or
8# (at your option) any later version.
9#
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13# GNU General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with this program; if not, write to the Free Software
17# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
18#
19# Last Mod Tue Aug 20 12:48:54 PDT 1991, by rich@cygint.cygnus.com
eb02fd64 20#
f149eb99
RP
21# $Id$
22
eb02fd64 23srcdir = .
ec342d7d 24destdir = /usr/local
eb02fd64 25
ec342d7d
RP
26#CC = gcc -b$(target) # -B$(srcdir)/../gas/Host-$(host)/Target-$(target)/
27#CFLAGS = -g -nostdinc -nostdlib -I- -I/usr/local/lib/gcc/$(target)/1.92/include -I$(srcdir) -I$(srcdir)/../include -I$(OSINCLUDE)
eb02fd64 28
eb02fd64 29RANLIB = ranlib
ec342d7d
RP
30AR = ar
31AR_FLAGS = cqv
4dfe09da 32BISONPATH =
eb02fd64 33
4dfe09da 34BISON = `if [ -d $(srcdir)/../bison\`if [ -d $(srcdir)/bison.$(target) ] ; then echo .$(target) ; fi\`$(subdir) ] ; then echo $(srcdir)/../bison\`if [ -d $(srcdir)/bison.$(target) ] ; then echo .$(target) ; fi\`$(subdir)/bison -L $(srcdir)/../bison\`if [ -d $(srcdir)/bison.$(target) ] ; then echo .$(target) ; fi\`/; else echo yacc ; fi`
2645fb0c
RP
35
36SUBDIRS = libiberty readline bfd gdb binutils ld gas gcc gnulib
6a3958b2
RP
37OTHERS =
38
eb02fd64 39#### host and target specific makefile fragments come in here.
ec342d7d 40###
eb02fd64 41
6a3958b2 42all:
3c81fef5 43 $(MAKE) subdir_do DO=all "DODIRS=$(SUBDIRS) $(OTHERS)"
6a3958b2 44
3c81fef5 45subdir_do: force
a01bf1fb
RP
46 for i in $(DODIRS); do \
47 if [ -d $(srcdir)/$$i -o -d $(srcdir)/$$i.$(target) ] ; then \
48 if (cd $(srcdir)/$$i`if [ -d $(srcdir)/$$i.$(target) ] ; \
49 then echo .$(target) ; fi`$(subdir); \
50 $(MAKE) \
51 "against=$(against)" \
52 "AR=$(AR)" \
53 "AR_FLAGS=$(AR_FLAGS)" \
2645fb0c
RP
54 "RANLIB=$(RANLIB)" \
55 "BISON=$(BISON)" $(DO)) ; then true ; \
a01bf1fb
RP
56 else exit 1 ; fi ; \
57 else true ; fi ; \
58 done
eb02fd64 59
2b34da49
RP
60bootstrap:
61 $(MAKE) all
62 $(MAKE) stage1
6a3958b2
RP
63 $(MAKE) pass "stagepass=stage1"
64 $(MAKE) stage2
65 $(MAKE) pass "stagepass=stage2"
a01bf1fb 66 $(MAKE) comparison
6a3958b2
RP
67
68bootstrap2:
69 $(MAKE) pass "stagepass=stage1"
70 $(MAKE) stage2
71 $(MAKE) pass "stagepass=stage2"
a01bf1fb 72 $(MAKE) comparison
6a3958b2
RP
73
74bootstrap3:
75 $(MAKE) pass "stagepass=stage2"
a01bf1fb 76 $(MAKE) comparison
6a3958b2
RP
77
78pass:
2770ad8b
RP
79 cp $(srcdir)/gcc`if [ -d $(srcdir)/gcc.$(target) ] ; \
80 then echo .$(target) ; fi`/gstdarg.h $(srcdir)/gas/stdarg.h
3c81fef5 81 $(MAKE) subdir_do DO=all "DODIRS=$(SUBDIRS)" \
6a3958b2
RP
82 "CC=$(srcdir)/../gcc`if [ -d $(srcdir)/gcc.$(target) ] ; \
83 then echo .$(target) ; fi`$(subdir)/$(stagepass)/gcc -O \
84 -B$(srcdir)/../gcc`if [ -d $(srcdir)/gcc.$(target) ] ; \
85 then echo .$(target) ; fi`$(subdir)/$(stagepass)/ \
86 -B$(srcdir)/../gas`if [ -d $(srcdir)/gas.$(target) ] ; \
87 then echo .$(target) ; fi`$(subdir)/$(stagepass)/" \
88 "AR=$(srcdir)/../binutils`if [ -d $(srcdir)/binutils.$(target) ] ; \
89 then echo .$(target) ; fi`$(subdir)/$(stagepass)/ar" \
90 "RANLIB=$(srcdir)/../binutils`if [ -d $(srcdir)/binutils.$(target) ] ; \
91 then echo .$(target) ; fi`$(subdir)/$(stagepass)/ranlib" \
92 "LOADLIBES=$(srcdir)/../gnulib`if [ -d $(srcdir)/binutils.$(target) ] ; \
93 then echo .$(target) ; fi`$(subdir)/$(stagepass)/gnulib.a /lib/libc.a" \
94 "LDFLAGS=-nostdlib /lib/crt0.o \
4dfe09da
RP
95 -L$(srcdir)/../gnulib`if [ -d $(srcdir)/gnulib.$(target) ] ; \
96 then echo .$(target) ; fi`$(subdir)/$(stagepass)/ \
6a3958b2
RP
97 -B$(srcdir)/../ld`if [ -d $(srcdir)/ld.$(target) ] ; \
98 then echo .$(target) ; fi`$(subdir)/$(stagepass)/"
2b34da49 99
eb02fd64 100
6a3958b2 101stage1:
3c81fef5 102 $(MAKE) subdir_do DO=stage1 "DODIRS=$(SUBDIRS)"
eb02fd64 103
6a3958b2 104stage2:
3c81fef5 105 $(MAKE) subdir_do DO=stage2 "DODIRS=$(SUBDIRS)"
eb02fd64 106
6a3958b2 107stage3:
3c81fef5 108 $(MAKE) subdir_do DO=stage3 "DODIRS=$(SUBDIRS)"
eb02fd64 109
6a3958b2 110stage4:
3c81fef5 111 $(MAKE) subdir_do DO=stage4 "DODIRS=$(SUBDIRS)"
eb02fd64 112
a01bf1fb
RP
113against=stage2
114
115comparison:; $(MAKE) subdir_do DO=comparison against=$(against) "DODIRS=$(SUBDIRS)"
116
3c81fef5
RP
117de-stage1:; $(MAKE) subdir_do DO=de-stage1 "DODIRS=$(SUBDIRS)"
118de-stage2:; $(MAKE) subdir_do DO=de-stage2 "DODIRS=$(SUBDIRS)"
119de-stage3:; $(MAKE) subdir_do DO=de-stage3 "DODIRS=$(SUBDIRS)"
120de-stage4:; $(MAKE) subdir_do DO=de-stage4 "DODIRS=$(SUBDIRS)"
6a3958b2
RP
121
122clean:
123 rm -rf *.a TEMP errs core *.o *~ \#* TAGS *.E
3c81fef5 124 $(MAKE) subdir_do DO=clean "DODIRS=$(SUBDIRS) $(OTHERS)"
6a3958b2 125
2645fb0c 126install: install-dirs install-fixed-includes
3c81fef5 127 $(MAKE) subdir_do DO=install "DODIRS=$(SUBDIRS) $(OTHERS)"
eb02fd64 128
2645fb0c
RP
129install-dirs: force
130 - mkdir $(destdir)
131 - mkdir $(destdir)/bin
132 - mkdir $(destdir)/lib
133 - mkdir $(destdir)/include
134 - mkdir $(destdir)/man
135 - mkdir $(destdir)/man/man1
136 (cd $(srcdir)/gcc`if [ -d $(srcdir)/gcc.$(target) ] ; \
137 then echo .$(target) ; fi`$(subdir) ; $(MAKE) install-dir)
138
139install-fixed-includes: force
a7058e26
RP
140 (cd gcc ; $(MAKE) install-fixed-includes)
141
eb02fd64
RP
142etags tags: TAGS
143
144TAGS: FORCE
145 etags `$(MAKE) ls`
146
147ls:
148 @echo Makefile
149 @for i in $(SUBDIRS); \
150 do \
151 (cd $$i; \
152 pwd=`pwd`; \
153 wd=`basename $$pwd`; \
154 for j in `$(MAKE) ls`; \
155 do \
156 echo $$wd/$$j; \
157 done) \
158 done
159
3c81fef5 160force:
eb02fd64
RP
161
162# with the gnu make, this is done automatically.
163
164Makefile: $(srcdir)/Makefile.in $(srcdir)/configure
131a3881 165 (cd $(srcdir) ; \
f149eb99 166 ./configure +destdir=$(destdir) +norecurse \
4dfe09da 167 `if [ "$(srcdir)" != "." ] ; then echo +subdirs; fi` \
0df06ca0 168 $(host) +target=$(target))
eb02fd64 169
11954bf1
JG
170#
171# Build GDB distributions that contain BFD, Include, Libiberty, Readline, etc
172
173DEVO_SUPPORT= README.configure Makefile.in configure configure.in
174GDB_SUPPORT_DIRS= bfd include libiberty readline texinfo/fsf/texinfo.tex
175
176bfd.ilrt.tar.Z: force_update
177 ./configure -template=./configure
178 ./configure sun4
179 make clean
180 ./configure -rm sun4
181 rm -f bfd.ilrt.tar.Z
4dfe09da 182 chmod og=u `find $(DEVO_SUPPORT) $(GDB_SUPPORT_DIRS) -print`
11954bf1
JG
183 tar cf - $(DEVO_SUPPORT) $(GDB_SUPPORT_DIRS) \
184 | compress -v >bfd.ilrt.tar.Z
185
186force_update:
187
eb02fd64
RP
188#
189# $Log$
4dfe09da
RP
190# Revision 1.25 1991/08/22 07:15:49 rich
191# Three part names, etc.
192#
193# Revision 1.24 1991/08/20 01:57:31 rich
194# Another try at passing gnulib's location.
195#
196# Revision 1.23 1991/08/16 21:47:41 rich
197# Pass on BISON as bison only if bison is here.
198#
199# Revision 1.22 1991/08/07 19:15:26 rich
200# +forcesubdirs -> +subdirs
201#
202# Revision 1.21 1991/07/31 18:07:59 gnu
203# Set file permissions the same for everyone before making tar file.
204#
205# Revision 1.20 1991/07/31 02:47:14 gnu
11954bf1
JG
206# Add bfd.ilrt.tar.Z "make" rules.
207#
208# Revision 1.19 1991/07/27 07:46:34 rich
2645fb0c
RP
209# Changes to accomodate using the freshly built bison in place.
210#
211# Revision 1.18 1991/07/16 00:01:40 gnu
212# Add back gdb and readline.
213#
214# Revision 1.17 1991/06/18 15:30:55 rich
215# added install-dirs target.
216#
217# Revision 1.16 1991/06/14 13:35:40 rich
a7058e26
RP
218# install fixed include files on install.
219#
220# Revision 1.15 1991/06/09 20:27:01 rich
a01bf1fb
RP
221# added support for binary comparisons.
222#
223# Revision 1.14 1991/05/31 12:34:55 gnu
6849cb71
JG
224# Avoid error stop from Make if a directory doesn't exist during subdir_do.
225#
226# Revision 1.13 1991/05/27 23:03:20 rich
2770ad8b
RP
227# Put gcc/gstdarg.h where gas can find it; gas/stdarg.h.
228#
229# Revision 1.12 1991/05/19 00:36:44 rich
3c81fef5
RP
230# Added gdb.
231#
232# Revision 1.11 1991/05/03 21:30:41 gnu
592ecfb2
JG
233# Rename getopt to libiberty.
234#
235# Revision 1.10 1991/04/24 16:50:53 rich
6a3958b2
RP
236# Three staging checkpoint.
237#
238# Revision 1.9 1991/04/17 01:34:36 rich
2b34da49
RP
239# Added getopt for binutils, fixed problem with host dependancies in
240# configure.template.
241#
242# Revision 1.8 1991/04/15 23:43:45 rich
0df06ca0
RP
243# Now handles multiple hosts and targets.
244#
245# Revision 1.7 1991/04/13 13:06:16 tiemann
bb335cf4
MT
246# Don't depend `install' on `all'. Actually, the way things work, all
247# depends on things being incrementally installed, and install depends
248# on everything happening in a topological fashion.
249#
250# This will need to be worked on further, but for now it's ok.
251#
252# Revision 1.6 1991/04/13 10:04:14 rich
253# Now can build gas for a29k on a29k.
254#
255# Revision 1.5 1991/04/13 07:40:41 rich
f149eb99
RP
256# Fixed an ordering bug. Now everything is built, and then installed.
257#
258# Revision 1.4 1991/04/13 02:11:09 rich
ec342d7d
RP
259# Config cut 3. We now almost install a29k.
260#
261# Revision 1.3 1991/04/11 02:41:53 rich
131a3881 262# Cut 2 config. Subdirs.
eb02fd64
RP
263#
264#
265#
266
267# end of Makefile.in
This page took 0.04006 seconds and 4 git commands to generate.