5b9787303126b3ba96417109a3cc41d39541fec6
[deliverable/binutils-gdb.git] / Makefile.in
1 #
2 # Makefile for directory with subdirs to build.
3 # Copyright (C) 1990, 1991 Cygnus Support
4 #
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 Sun Aug 25 22:42:31 PDT 1991, by rich@cygint.cygnus.com
20 #
21 # $Id$
22
23 srcdir = .
24 destdir = /usr/local
25
26 SHELL=/bin/sh
27
28 #CC = gcc -b$(target) # -B$(srcdir)/../gas/Host-$(host)/Target-$(target)/
29 #CFLAGS = -g -nostdinc -nostdlib -I- -I/usr/local/lib/gcc/$(target)/1.92/include -I$(srcdir) -I$(srcdir)/../include -I$(OSINCLUDE)
30
31 RANLIB = ranlib
32 AR = ar
33 AR_FLAGS = cqv
34 BISONPATH =
35
36 BISON = `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`
37
38 SUBDIRS = libiberty readline bfd gdb binutils ld gas gcc gnulib
39 OTHERS =
40
41 #### host and target specific makefile fragments come in here.
42 ###
43
44 all:
45 $(MAKE) subdir_do DO=all "DODIRS=$(SUBDIRS) $(OTHERS)"
46
47 subdir_do: force
48 for i in $(DODIRS); do \
49 if [ -d $(srcdir)/$$i -o -d $(srcdir)/$$i.$(target) ] ; then \
50 if (cd $(srcdir)/$$i`if [ -d $(srcdir)/$$i.$(target) ] ; \
51 then echo .$(target) ; fi`$(subdir); \
52 $(MAKE) \
53 "against=$(against)" \
54 "AR=$(AR)" \
55 "CC=$(CC)" \
56 "AR_FLAGS=$(AR_FLAGS)" \
57 "RANLIB=$(RANLIB)" \
58 "BISON=$(BISON)" $(DO)) ; then true ; \
59 else exit 1 ; fi ; \
60 else true ; fi ; \
61 done
62
63 bootstrap:
64 $(MAKE) all
65 $(MAKE) stage1
66 $(MAKE) pass "stagepass=stage1"
67 $(MAKE) stage2
68 $(MAKE) pass "stagepass=stage2"
69 $(MAKE) comparison
70
71 bootstrap2:
72 $(MAKE) pass "stagepass=stage1"
73 $(MAKE) stage2
74 $(MAKE) pass "stagepass=stage2"
75 $(MAKE) comparison
76
77 bootstrap3:
78 $(MAKE) pass "stagepass=stage2"
79 $(MAKE) comparison
80
81 pass:
82 cp $(srcdir)/gcc`if [ -d $(srcdir)/gcc.$(target) ] ; \
83 then echo .$(target) ; fi`/gstdarg.h $(srcdir)/gas/stdarg.h
84 $(MAKE) subdir_do DO=all "DODIRS=$(SUBDIRS)" \
85 "CC=$(srcdir)/../gcc`if [ -d $(srcdir)/gcc.$(target) ] ; \
86 then echo .$(target) ; fi`$(subdir)/$(stagepass)/gcc -O \
87 -B$(srcdir)/../gcc`if [ -d $(srcdir)/gcc.$(target) ] ; \
88 then echo .$(target) ; fi`$(subdir)/$(stagepass)/ \
89 -B$(srcdir)/../gas`if [ -d $(srcdir)/gas.$(target) ] ; \
90 then echo .$(target) ; fi`$(subdir)/$(stagepass)/" \
91 "AR=$(srcdir)/../binutils`if [ -d $(srcdir)/binutils.$(target) ] ; \
92 then echo .$(target) ; fi`$(subdir)/$(stagepass)/ar" \
93 "RANLIB=$(srcdir)/../binutils`if [ -d $(srcdir)/binutils.$(target) ] ; \
94 then echo .$(target) ; fi`$(subdir)/$(stagepass)/ranlib" \
95 "LOADLIBES=$(srcdir)/../gnulib`if [ -d $(srcdir)/binutils.$(target) ] ; \
96 then echo .$(target) ; fi`$(subdir)/$(stagepass)/gnulib.a /lib/libc.a" \
97 "LDFLAGS=-nostdlib /lib/crt0.o \
98 -L$(srcdir)/../gnulib`if [ -d $(srcdir)/gnulib.$(target) ] ; \
99 then echo .$(target) ; fi`$(subdir)/$(stagepass)/ \
100 -B$(srcdir)/../ld`if [ -d $(srcdir)/ld.$(target) ] ; \
101 then echo .$(target) ; fi`$(subdir)/$(stagepass)/"
102
103
104 stage1:
105 $(MAKE) subdir_do DO=stage1 "DODIRS=$(SUBDIRS)"
106
107 stage2:
108 $(MAKE) subdir_do DO=stage2 "DODIRS=$(SUBDIRS)"
109
110 stage3:
111 $(MAKE) subdir_do DO=stage3 "DODIRS=$(SUBDIRS)"
112
113 stage4:
114 $(MAKE) subdir_do DO=stage4 "DODIRS=$(SUBDIRS)"
115
116 against=stage2
117
118 comparison:; $(MAKE) subdir_do DO=comparison against=$(against) "DODIRS=$(SUBDIRS)"
119
120 de-stage1:; $(MAKE) subdir_do DO=de-stage1 "DODIRS=$(SUBDIRS)"
121 de-stage2:; $(MAKE) subdir_do DO=de-stage2 "DODIRS=$(SUBDIRS)"
122 de-stage3:; $(MAKE) subdir_do DO=de-stage3 "DODIRS=$(SUBDIRS)"
123 de-stage4:; $(MAKE) subdir_do DO=de-stage4 "DODIRS=$(SUBDIRS)"
124
125 clean:
126 rm -rf *.a TEMP errs core *.o *~ \#* TAGS *.E
127 $(MAKE) subdir_do DO=clean "DODIRS=$(SUBDIRS) $(OTHERS)"
128
129 install: install-dirs install-fixed-includes
130 $(MAKE) subdir_do DO=install "DODIRS=$(SUBDIRS) $(OTHERS)"
131
132 # The "else true" stuff is for Ultrix; the shell returns the exit code
133 # of the "if" command, if no commands are run in the "then" or "else" part,
134 # causing Make to quit.
135 install-dirs: force
136 - mkdir $(destdir)
137 - mkdir $(destdir)/bin
138 - mkdir $(destdir)/lib
139 - mkdir $(destdir)/include
140 - mkdir $(destdir)/doc
141 - mkdir $(destdir)/man
142 - mkdir $(destdir)/man/man1
143 - mkdir $(destdir)/man/man2
144 - mkdir $(destdir)/man/man3
145 - mkdir $(destdir)/man/man4
146 - mkdir $(destdir)/man/man5
147 - mkdir $(destdir)/man/man6
148 - mkdir $(destdir)/man/man7
149 - mkdir $(destdir)/man/man8
150 if [ -d $(srcdir)/gcc`if [ -d $(srcdir)/gcc.$(target) ] ; \
151 then echo .$(target) ; fi`$(subdir) ] ; then \
152 (cd $(srcdir)/gcc`if [ -d $(srcdir)/gcc.$(target) ] ; \
153 then echo .$(target) ; fi`$(subdir) ; \
154 $(MAKE) install-dir) ; \
155 else true; \
156 fi
157
158 install-fixed-includes: force
159 if [ -d $(srcdir)/gcc`if [ -d $(srcdir)/gcc.$(target) ] ; \
160 then echo .$(target) ; fi`$(subdir) ] ; then \
161 (cd $(srcdir)/gcc`if [ -d $(srcdir)/gcc.$(target) ] ; \
162 then echo .$(target) ; fi`$(subdir) ; \
163 $(MAKE) install-fixed-includes) ; \
164 else true; \
165 fi
166
167 etags tags: TAGS
168
169 TAGS: FORCE
170 etags `$(MAKE) ls`
171
172 ls:
173 @echo Makefile
174 @for i in $(SUBDIRS); \
175 do \
176 (cd $$i; \
177 pwd=`pwd`; \
178 wd=`basename $$pwd`; \
179 for j in `$(MAKE) ls`; \
180 do \
181 echo $$wd/$$j; \
182 done) \
183 done
184
185 force:
186
187 # with the gnu make, this is done automatically.
188
189 Makefile: $(srcdir)/Makefile.in $(srcdir)/configure
190 (cd $(srcdir) ; \
191 ./configure +destdir=$(destdir) +norecurse \
192 `if [ "$(srcdir)" != "." ] ; then echo +subdirs; fi` \
193 $(host) +target=$(target))
194
195 #
196 # Build GDB distributions that contain BFD, Include, Libiberty, Readline, etc
197
198 DEVO_SUPPORT= README README.configure Makefile.in configure configure.in \
199 config.sub config
200 GDB_SUPPORT_DIRS= bfd include libiberty readline
201 GDB_SUPPORT_FILES= $(GDB_SUPPORT_DIRS) texinfo/fsf/texinfo.tex
202
203 setup-dirs: force_update
204 ./configure -template=./configure
205 ./configure sun4
206 make clean
207 ./configure -rm sun4
208
209 bfd.ilrt.tar.Z: setup-dirs
210 rm -f bfd.ilrt.tar.Z
211 chmod og=u `find $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) -print`
212 tar cf - $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) \
213 | compress -v >bfd.ilrt.tar.Z
214
215 gdb.tar.Z: setup-dirs
216 (cd gdb; $(MAKE) -f Makefile.in make-proto-gdb.dir)
217 $(MAKE) $(MFLAGS) -f Makefile.in make-gdb.tar.Z
218
219 make-gdb.tar.Z: $(DEVO_SUPPORT) $(GDB_SUPPORT_DIRS) gdb texinfo/fsf/texinfo.tex
220 rm -rf proto-toplev; mkdir proto-toplev
221 ln -s ../gdb/proto-gdb.dir proto-toplev/gdb
222 (cd proto-toplev; for i in $(DEVO_SUPPORT) $(GDB_SUPPORT_DIRS); do \
223 ln -s ../$$i . ; \
224 done)
225 mkdir proto-toplev/texinfo
226 mkdir proto-toplev/texinfo/fsf
227 ln -s ../../../texinfo/fsf/texinfo.tex proto-toplev/texinfo/fsf/
228 (VER=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
229 echo "==> Making gdb-$$VER.tar.Z"; \
230 ln -s proto-toplev gdb-$$VER; \
231 tar cfh - gdb-$$VER \
232 | compress -v >gdb-$$VER.tar.Z)
233
234 force_update:
235
236 #
237 # $Log$
238 # Revision 1.33 1991/09/20 08:41:45 gnu
239 # New rules for building distributions. Normal distribution
240 # is built by doing `make -f Makefile.in gdb.tar.Z' in the devo dir.
241 #
242 # Revision 1.32 1991/09/19 20:56:05 steve
243 # More changes for 68k and 386 coff support. (Sorry about the previous
244 # log).
245 #
246 # Revision 1.31 1991/09/03 13:28:38 gnu
247 # Add "else true" clauses for really dumb sh's such as Ultrix.
248 #
249 # Revision 1.30 1991/08/26 06:37:57 rich
250 # Correcting configurations and installs.
251 #
252 # Revision 1.29 1991/08/26 04:45:57 rich
253 # Correcting install target when gcc not present.
254 #
255 # Revision 1.28 1991/08/25 23:40:22 rich
256 # rcs enters the soup.
257 #
258 # Revision 1.27 1991/08/23 07:15:56 gnu
259 # Make README stick...
260 #
261 # Revision 1.26 1991/08/22 09:20:07 gnu
262 # Build a top-level README for devo.
263 #
264 # Revision 1.25 1991/08/22 07:15:49 rich
265 # Three part names, etc.
266 #
267 # Revision 1.24 1991/08/20 01:57:31 rich
268 # Another try at passing gnulib's location.
269 #
270 # Revision 1.23 1991/08/16 21:47:41 rich
271 # Pass on BISON as bison only if bison is here.
272 #
273 # Revision 1.22 1991/08/07 19:15:26 rich
274 # +forcesubdirs -> +subdirs
275 #
276 # Revision 1.21 1991/07/31 18:07:59 gnu
277 # Set file permissions the same for everyone before making tar file.
278 #
279 # Revision 1.20 1991/07/31 02:47:14 gnu
280 # Add bfd.ilrt.tar.Z "make" rules.
281 #
282 # Revision 1.19 1991/07/27 07:46:34 rich
283 # Changes to accomodate using the freshly built bison in place.
284 #
285 # Revision 1.18 1991/07/16 00:01:40 gnu
286 # Add back gdb and readline.
287 #
288 # Revision 1.17 1991/06/18 15:30:55 rich
289 # added install-dirs target.
290 #
291 # Revision 1.16 1991/06/14 13:35:40 rich
292 # install fixed include files on install.
293 #
294 # Revision 1.15 1991/06/09 20:27:01 rich
295 # added support for binary comparisons.
296 #
297 # Revision 1.14 1991/05/31 12:34:55 gnu
298 # Avoid error stop from Make if a directory doesn't exist during subdir_do.
299 #
300 # Revision 1.13 1991/05/27 23:03:20 rich
301 # Put gcc/gstdarg.h where gas can find it; gas/stdarg.h.
302 #
303 # Revision 1.12 1991/05/19 00:36:44 rich
304 # Added gdb.
305 #
306 # Revision 1.11 1991/05/03 21:30:41 gnu
307 # Rename getopt to libiberty.
308 #
309 # Revision 1.10 1991/04/24 16:50:53 rich
310 # Three staging checkpoint.
311 #
312 # Revision 1.9 1991/04/17 01:34:36 rich
313 # Added getopt for binutils, fixed problem with host dependancies in
314 # configure.template.
315 #
316 # Revision 1.8 1991/04/15 23:43:45 rich
317 # Now handles multiple hosts and targets.
318 #
319 # Revision 1.7 1991/04/13 13:06:16 tiemann
320 # Don't depend `install' on `all'. Actually, the way things work, all
321 # depends on things being incrementally installed, and install depends
322 # on everything happening in a topological fashion.
323 #
324 # This will need to be worked on further, but for now it's ok.
325 #
326 # Revision 1.6 1991/04/13 10:04:14 rich
327 # Now can build gas for a29k on a29k.
328 #
329 # Revision 1.5 1991/04/13 07:40:41 rich
330 # Fixed an ordering bug. Now everything is built, and then installed.
331 #
332 # Revision 1.4 1991/04/13 02:11:09 rich
333 # Config cut 3. We now almost install a29k.
334 #
335 # Revision 1.3 1991/04/11 02:41:53 rich
336 # Cut 2 config. Subdirs.
337 #
338 #
339 #
340
341 # end of Makefile.in
This page took 0.036486 seconds and 4 git commands to generate.