Reorder contents; reorganize new-host, new-target, and new-config
[deliverable/binutils-gdb.git] / gas / Makefile.in
CommitLineData
fecd2382
RP
1# Makefile for GNU Assembler
2# Copyright (C) 1987, 1988, 1990, 1991 Free Software Foundation, Inc.
3
4#This file is part of GNU GAS.
5
6#GNU GAS 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 1, or (at your option)
9#any later version.
10
11#GNU GAS 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 GNU GAS; see the file COPYING. If not, write to
18#the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
19
20# $Id$
21
22# The targets for external use include:
23# all, doc, proto, install, uninstall, includes, TAGS,
24# clean, cleanconfig, realclean, stage1, stage2, stage3, stage4.
25
26# Variables that exist for you to override.
27# See below for how to change them for certain systems.
28
29ALLOCA =
d1a9e594 30CFLAGS = -g $(XCFLAGS) -I$(srcdir)/../include
fecd2382
RP
31INTERNAL_CFLAGS = $(CROSS)
32OLDCC = cc
33BISON = bison
34BISONFLAGS = -v
35AR = ar
36OLDAR_FLAGS = qc
37AR_FLAGS = rc
38SHELL = /bin/sh
39# on sysV, define this as cp.
40INSTALL = install -c
41# These permit overriding just for certain files.
42INSTALL_PROGRAM = $(INSTALL)
43INSTALL_FILE = $(INSTALL)
44
45# Define this as & to perform parallel make on a Sequent.
46# Note that this has some bugs, and it seems currently necessary
47# to compile all the gen* files first by hand to avoid erroneous results.
48P =
49
50# How to invoke ranlib.
51RANLIB = ranlib
52# Test to use to see whether ranlib exists on the system.
53RANLIB_TEST = [ -f /usr/bin/ranlib -o -f /bin/ranlib ]
54
55# CFLAGS for use with OLDCC, for compiling gnulib.
56# NOTE: -O does not work on some Unix systems!
57CCLIBFLAGS = -O
58
59# Version of ar to use when compiling gnulib.
60OLDAR = ar
61
da0b2bff 62version=`awk '{print substr ($$4, 2, length ($$4) - 3); }' $(srcdir)/../gcc/version.c`
fecd2382
RP
63
64# Directory where sources are, from where we are.
65srcdir = .
66# Common prefix for installation directories.
67# NOTE: This directory must exist when you start installation.
3d6f0983
RP
68destdir = /usr/local
69prefix = $(destdir)
fecd2382
RP
70# Directory in which to put the executable for the command `gcc'
71bindir = $(prefix)/bin
72# Directory in which to put the directories used by the compiler.
73libdir = $(prefix)/lib
74# Directory in which the compiler finds executables, libraries, etc.
75libsubdir = $(libdir)/gcc/$(target)/$(version)
76# Number to put in man-page filename.
77manext = 1
78# Directory in which to put man pages.
79mandir = $(prefix)/man/man$(manext)
80
81# Additional system libraries to link with.
82CLIB=
83
fecd2382
RP
84# Specify the rule for actually making gnulib.
85GNULIB = gnulib.portable
86
87# Specify the rule for actually making gnulib2.
88GNULIB2 = gnulib2.portable
89
90# List of extra C and assembler files to add to gnulib.
91# Assembler files should have names ending in `.asm'.
92LIBFUNCS_EXTRA =
93
94# Program to convert libraries.
95LIBCONVERT =
96
97# Control whether header files are installed.
98INSTALL_HEADERS=install-headers
99
100# Change this to empty to prevent installing limits.h
101LIMITS_H = limits.h
102
103# Directory to link to, when using the target `maketest'.
104DIR = ../gcc
105
106# For better debugging under COFF, define SEPARATE_AUX_OUTPUT in config.h
107# and define the following variable as `aux-output2.c' in make-...
108AUX_OUTPUT2 =
109
110# Flags to use when cross-building GCC.
111# Prefix to apply to names of object files when using them
112# to run on the machine we are compiling on.
113HOST_PREFIX=
114# Prefix to apply to names of object files when compiling them
115# to run on the machine we are compiling on.
116# The default for this variable is chosen to keep these rules
117# out of the way of the other rules for compiling the same source files.
118HOST_PREFIX_1=loser-
119HOST_CC=$(CC)
120HOST_CFLAGS=$(ALL_CFLAGS)
121HOST_LDFLAGS=$(LDFLAGS)
122HOST_CPPFLAGS=$(CPPFLAGS)
123
124# Choose the real default target.
da0b2bff 125ALL=as.new
fecd2382
RP
126
127# End of variables for you to override.
128
129# Lists of files for various purposes.
130
131REAL_SOURCES = \
132 $(srcdir)/app.c \
133 $(srcdir)/as.c \
134 $(srcdir)/atof-generic.c \
135 $(srcdir)/bignum-copy.c \
136 $(srcdir)/cond.c \
137 $(srcdir)/expr.c \
138 $(srcdir)/flonum-const.c \
139 $(srcdir)/flonum-copy.c \
140 $(srcdir)/flonum-mult.c \
141 $(srcdir)/frags.c \
142 $(srcdir)/hash.c \
143 $(srcdir)/hex-value.c \
144 $(srcdir)/input-file.c \
145 $(srcdir)/input-scrub.c \
146 $(srcdir)/messages.c \
147 $(srcdir)/output-file.c \
148 $(srcdir)/read.c \
149 $(srcdir)/strstr.c \
150 $(srcdir)/subsegs.c \
151 $(srcdir)/symbols.c \
152 $(srcdir)/version.c \
153 $(srcdir)/write.c \
154 $(srcdir)/xmalloc.c \
155 $(srcdir)/xrealloc.c
156
157# in an expedient order
158LINKED_SOURCES = \
159 targ-cpu.c \
160 obj-format.c \
161 atof-targ.c
162
163SOURCES = $(LINKED_SOURCES) $(REAL_SOURCES)
164
165REAL_HEADERS = \
166 $(srcdir)/as.h \
167 $(srcdir)/bignum.h \
168 $(srcdir)/expr.h \
169 $(srcdir)/flonum.h \
170 $(srcdir)/frags.h \
171 $(srcdir)/hash.h \
172 $(srcdir)/input-file.h \
173 $(srcdir)/tc.h \
174 $(srcdir)/obj.h \
175 $(srcdir)/read.h \
fecd2382
RP
176 $(srcdir)/struc-symbol.h \
177 $(srcdir)/subsegs.h \
178 $(srcdir)/symbols.h \
179 $(srcdir)/syscalls.h \
180 $(srcdir)/write.h
181
182LINKED_HEADERS = \
183 a.out.gnu.h \
184 a.out.h \
185 host.h \
186 targ-env.h \
187 targ-cpu.h \
188 obj-format.h \
189 atof-targ.h
190
191HEADERS = $(LINKED_HEADERS) $(REAL_HEADERS)
192
193OBJS = \
194 targ-cpu.o \
195 obj-format.o \
196 atof-targ.o \
197 app.o \
198 as.o \
199 atof-generic.o \
200 bignum-copy.o \
201 cond.o \
202 expr.o \
203 flonum-const.o \
204 flonum-copy.o \
205 flonum-mult.o \
206 frags.o \
207 hash.o \
208 hex-value.o \
209 input-file.o \
210 input-scrub.o \
211 messages.o \
212 output-file.o \
213 read.o \
214 strstr.o \
215 subsegs.o \
216 symbols.o \
217 version.o \
218 write.o \
219 xmalloc.o \
220 xrealloc.o
221
222# Definition of `all' is here so that new rules inserted by sed
223# do not specify the default target.
224# The real definition is under `all.internal'.
225
226all: $(ALL)
227
228# sed inserts variable overrides after the following line.
229####
230\f
231# Now figure out from those variables how to compile and link.
232
233# This is the variable actually used when we compile.
6a3958b2 234ALL_CFLAGS = $(INTERNAL_CFLAGS) $(CFLAGS) $(HDEFINES) $(TDEFINES)
fecd2382
RP
235
236# Even if ALLOCA is set, don't use it if compiling with GCC.
237USE_ALLOCA= `if [ x"${CC}" = x"${OLDCC}" ] ; then echo ${ALLOCA}; else true; fi`
238USE_HOST_ALLOCA= `if [ x"${CC}" = x"${OLDCC}" ] ; then echo ${HOST_PREFIX}${ALLOCA}; else true; fi`
239
fecd2382
RP
240# Likewise, for use in the tools that must run on this machine
241# even if we are cross-building GCC.
242# We don't use USE_ALLOCA because backquote expansion doesn't work in deps.
243HOST_LIBDEPS= $(HOST_PREFIX)$(OBSTACK) $(HOST_PREFIX)$(ALLOCA) $(HOST_PREFIX)$(MALLOC)
244
245# How to link with both our special library facilities
246# and the system's installed libraries.
d1a9e594 247LIBS = $(CLIB) $(srcdir)/../libiberty`if [ -d $(srcdir)/libiberty.$(target) ] ; then echo .$(target) ; fi`$(subdir)/libiberty.a
fecd2382
RP
248
249# Likewise, for use in the tools that must run on this machine
250# even if we are cross-building GCC.
251HOST_LIBS = $(HOST_PREFIX)$(OBSTACK) $(USE_HOST_ALLOCA) $(HOST_PREFIX)$(MALLOC) $(CLIB)
252
253# Specify the directories to be searched for header files.
254# Both . and srcdir are used, in that order,
255# so that tm.h and config.h will be found in the compilation
256# subdirectory rather than in the source directory.
257INCLUDES = -I. -I$(srcdir) -I$(srcdir)/config
258SUBDIR_INCLUDES = -I.. -I../$(srcdir) -I../$(srcdir)/config
259
260# Always use -I$(srcdir)/config when compiling.
261.c.o:
262 $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $<
263
264# This tells GNU make version 3 not to export all the variables
265# defined in this file into the environment.
266.NOEXPORT:
267\f
268# Files to be copied away after each stage in building.
269STAGE_GCC=gcc
da0b2bff 270STAGESTUFF = *.o as.new
fecd2382
RP
271
272# The files that "belong" in CONFIG_H are deliberately omitted
273# because having them there would not be useful in actual practice.
274# All they would do is cause complete recompilation every time
275# one of the machine description files is edited.
276# That may or may not be what one wants to do.
277# If it is, rm *.o is an easy way to do it.
278# CONFIG_H = config.h tm.h
279CONFIG_H =
280\f
da0b2bff
RP
281as.new: $(OBJS) $(LIBDEPS)
282 -mv -f as.new as.old
283 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o as.new $(OBJS) $(LIBS) $(LOADLIBES)
fecd2382 284
61907f51
RP
285objdump:
286
fecd2382
RP
287all.internal: native
288# This is what is made with the host's compiler if making a cross assembler.
6a3958b2 289native: config.status as
fecd2382
RP
290
291config.status:
292 @echo You must configure gas. Look at the INSTALL file for details.
293 @false
294
295compilations: ${OBJS}
296
297# Compiling object files from source files.
298
fecd2382 299app.o : app.c as.h host.h targ-env.h obj-format.h \
d1a9e594 300 targ-cpu.h struc-symbol.h \
fecd2382
RP
301 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h
302as.o : as.c as.h host.h targ-env.h obj-format.h \
d1a9e594 303 targ-cpu.h struc-symbol.h \
fecd2382
RP
304 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h
305atof-generic.o : atof-generic.c as.h host.h targ-env.h obj-format.h \
d1a9e594 306 targ-cpu.h struc-symbol.h \
fecd2382
RP
307 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h
308bignum-copy.o : bignum-copy.c as.h host.h \
309 targ-env.h obj-format.h \
d1a9e594 310 targ-cpu.h struc-symbol.h \
fecd2382
RP
311 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h
312cond.o : cond.c as.h host.h targ-env.h obj-format.h \
d1a9e594 313 targ-cpu.h struc-symbol.h \
fecd2382 314 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
d1a9e594 315
fecd2382 316debug.o : debug.c as.h host.h targ-env.h obj-format.h \
d1a9e594 317 targ-cpu.h struc-symbol.h \
fecd2382
RP
318 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
319 subsegs.h
320expr.o : expr.c as.h host.h targ-env.h obj-format.h \
d1a9e594 321 targ-cpu.h struc-symbol.h \
fecd2382 322 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
d1a9e594 323
fecd2382
RP
324flonum-const.o : flonum-const.c flonum.h bignum.h
325flonum-copy.o : flonum-copy.c as.h host.h targ-env.h obj-format.h \
d1a9e594 326 targ-cpu.h struc-symbol.h \
fecd2382
RP
327 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h
328flonum-mult.o : flonum-mult.c flonum.h bignum.h
329frags.o : frags.c as.h host.h targ-env.h obj-format.h \
d1a9e594 330 targ-cpu.h struc-symbol.h \
fecd2382 331 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
d1a9e594 332 subsegs.h
fecd2382 333hash.o : hash.c as.h host.h targ-env.h obj-format.h \
d1a9e594 334 targ-cpu.h struc-symbol.h \
fecd2382
RP
335 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h
336hex-value.o : hex-value.c
337input-file.o : input-file.c as.h host.h \
338 targ-env.h obj-format.h targ-cpu.h \
d1a9e594 339 struc-symbol.h write.h flonum.h bignum.h expr.h \
fecd2382
RP
340 frags.h hash.h read.h symbols.h tc.h obj.h input-file.h
341input-scrub.o : input-scrub.c /usr/include/errno.h /usr/include/sys/errno.h \
342 as.h host.h targ-env.h obj-format.h \
d1a9e594 343 targ-cpu.h struc-symbol.h \
fecd2382
RP
344 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
345 input-file.h
346messages.o : messages.c as.h host.h targ-env.h obj-format.h \
d1a9e594 347 targ-cpu.h struc-symbol.h \
fecd2382 348 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h
d1a9e594 349obstack.o : obstack.c
fecd2382 350output-file.o : output-file.c as.h host.h targ-env.h obj-format.h \
d1a9e594 351 targ-cpu.h struc-symbol.h \
fecd2382
RP
352 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
353 output-file.h
354read.o : read.c as.h host.h targ-env.h obj-format.h \
d1a9e594 355 targ-cpu.h struc-symbol.h \
fecd2382 356 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
d1a9e594 357
fecd2382
RP
358strstr.o : strstr.c
359subsegs.o : subsegs.c as.h host.h targ-env.h obj-format.h \
d1a9e594 360 targ-cpu.h struc-symbol.h \
fecd2382 361 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
d1a9e594 362 subsegs.h
fecd2382 363symbols.o : symbols.c as.h host.h targ-env.h obj-format.h \
d1a9e594 364 targ-cpu.h struc-symbol.h \
fecd2382 365 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
d1a9e594 366 subsegs.h
fecd2382
RP
367version.o : version.c
368write.o : write.c as.h host.h targ-env.h obj-format.h \
d1a9e594 369 targ-cpu.h struc-symbol.h \
fecd2382 370 write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
d1a9e594 371 subsegs.h output-file.h
fecd2382
RP
372xmalloc.o : xmalloc.c
373xrealloc.o : xrealloc.c
374atof-targ.o : atof-targ.c as.h host.h targ-env.h obj-format.h \
d1a9e594 375 targ-cpu.h struc-symbol.h \
fecd2382
RP
376 write.h flonum.h bignum.h expr.h frags.h hash.h read.h \
377 symbols.h tc.h obj.h
378obj-format.o : obj-format.c as.h host.h targ-env.h obj-format.h \
d1a9e594 379 targ-cpu.h struc-symbol.h \
fecd2382 380 write.h flonum.h bignum.h expr.h frags.h hash.h read.h \
d1a9e594 381 symbols.h tc.h obj.h
fecd2382 382targ-cpu.o : targ-cpu.c targ-env.h obj-format.h \
d1a9e594 383 targ-cpu.h struc-symbol.h \
fecd2382 384 write.h flonum.h bignum.h expr.h frags.h hash.h read.h \
da0b2bff 385 symbols.h tc.h obj.h $(TARG_CPU_DEPENDENTS)
d1a9e594 386
fecd2382
RP
387\f
388# Compile the libraries to be used by gen*.
389# If we are not cross-building, gen* use the same .o's that cc1 will use,
390# and HOST_PREFIX_1 is `foobar', just to ensure these rules don't conflict
391# with the rules for rtl.o, alloca.o, etc.
392$(HOST_PREFIX_1)alloca.o: alloca.c
393 rm -f $(HOST_PREFIX)alloca.c
394 cp $(srcdir)/alloca.c $(HOST_PREFIX)alloca.c
395 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)alloca.c
396
397$(HOST_PREFIX_1)obstack.o: obstack.c
398 rm -f $(HOST_PREFIX)obstack.c
399 cp $(srcdir)/obstack.c $(HOST_PREFIX)obstack.c
400 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)obstack.c
401
402$(HOST_PREFIX_1)malloc.o: malloc.c
403 rm -f $(HOST_PREFIX)malloc.c
404 cp $(srcdir)/malloc.c $(HOST_PREFIX)malloc.c
405 $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)malloc.c
406\f
407# Remake the info files.
408
409doc: $(srcdir)/gas.info
410
411$(srcdir)/gas.info: $(srcdir)/gas.texinfo
412 makeinfo `echo $(srcdir)/gas.texinfo | sed 's,^\./,,'`
413
414\f
415# Deletion of files made during compilation.
416# There are three levels of this: `clean', `cleanconfig' and `realclean'.
417# `clean' deletes what you want to delete ordinarily to save space.
418# This is most, but not all, of the files made by compilation.
419# `cleanconfig' also deletes everything depending
420# on the choice of config files.
421# `realclean' also deletes everything that could be regenerated automatically.
422
423clean:
424 -rm -f $(STAGESTUFF)
425# Delete the temporary source copies for cross compilation.
426 -rm -f $(HOST_PREFIX_1)alloca.c $(HOST_PREFIX_1)malloc.c
427 -rm -f $(HOST_PREFIX_1)obstack.c
428# Delete the stamp files except stamp-gnulib2.
429 -rm -f core
430
431# Like clean but also delete the links made to configure gas.
432cleanconfig: clean
433 -rm -f config.status Makefile host.h targ-env.h
434 -rm -f targ-cpu.h targ-cpu.c
435 -rm -f obj-format.h obj-format.c
436 -rm -f atof-targ.c
437
438# Get rid of every file that's generated from some other file (except INSTALL).
439realclean: cleanconfig
440 -rm -f gas.aux gas.cps gas.fns gas.info gas.kys gas.pgs gas.tps gas.vrs
441 -rm -f TAGS
442 -rm -f gas.info* gas.?? gas.??s gas.log gas.toc gas.*aux
443 -rm -f *.dvi
444\f
445# Entry points `install', `includes' and `uninstall'.
446
447# Copy the files into directories where they will be run.
6a3958b2
RP
448install: as
449 $(INSTALL_PROGRAM) as $(libsubdir)/as
fecd2382
RP
450
451# Create the installation directory.
452install-dir:
453 -mkdir $(libdir)
454 -mkdir $(libdir)/gcc
455 -mkdir $(libdir)/gcc/$(target)
456 -mkdir $(libdir)/gcc/$(target)/$(version)
457
458# Install the compiler executables built during cross compilation.
459install-cross: native install-dir
460 -if [ -f cc1 ] ; then $(INSTALL_PROGRAM) cc1 $(libsubdir)/cc1; else true; fi
461 -if [ -f cc1plus ] ; then $(INSTALL_PROGRAM) cc1plus $(libsubdir)/cc1plus; else true; fi
462 $(INSTALL_PROGRAM) cpp $(libsubdir)/cpp
463 ./gcc -dumpspecs > $(libsubdir)/specs
464 $(INSTALL_PROGRAM) gcc $(bindir)/gcc
465
466# Install the man pages.
467install-man: install-dir $(srcdir)/gcc.1 protoize.1 unprotoize.1
468 $(INSTALL_FILE) $(srcdir)/gcc.1 $(mandir)/gcc.$(manext)
469 chmod a-x $(mandir)/gcc.$(manext)
470 $(INSTALL_FILE) $(srcdir)/protoize.1 $(mandir)/protoize.$(manext)
471 chmod a-x $(mandir)/protoize.$(manext)
472 $(INSTALL_FILE) $(srcdir)/unprotoize.1 $(mandir)/unprotoize.$(manext)
473 chmod a-x $(mandir)/unprotoize.$(manext)
474
475# Cancel installation by deleting the installed files.
476uninstall:
477 -rm -rf $(libsubdir)
6a3958b2 478 -rm -rf $(bindir)/as
fecd2382
RP
479 -rm -rf $(mandir)/gas.$(manext)
480
481\f
482# These exist for maintenance purposes.
483
484tags TAGS: force
485 etags $(REAL_SOURCES) $(REAL_HEADERS) README Makefile config/*.[hc]
486
da0b2bff 487bootstrap: $(ALL) force
fecd2382 488 $(MAKE) stage1
6a3958b2 489 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage1/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as
fecd2382 490 $(MAKE) stage2
6a3958b2 491 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage2/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as
a01bf1fb 492 $(MAKE) comparison against=stage2
fecd2382
RP
493
494bootstrap2: force
6a3958b2 495 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage1/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as
fecd2382 496 $(MAKE) stage2
6a3958b2 497 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage2/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as
da0b2bff 498 $(MAKE) comparison against=stage2
fecd2382
RP
499
500bootstrap3: force
6a3958b2 501 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage2/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as
a01bf1fb 502 $(MAKE) comparison against=stage2
fecd2382
RP
503
504# Copy the object files from a particular stage into a subdirectory.
505stage1: force
506 -mkdir stage1
507 -mv $(STAGESTUFF) stage1
da0b2bff 508 (cd stage1 ; ln as.new as)
fecd2382
RP
509
510stage2: force
511 -mkdir stage2
512 -mv $(STAGESTUFF) stage2
da0b2bff 513 (cd stage2 ; ln as.new as)
fecd2382
RP
514
515stage3: force
516 -mkdir stage3
6a3958b2 517 -mv $(STAGESTUFF) stage3
da0b2bff 518 (cd stage3 ; ln as.new as)
fecd2382 519
a01bf1fb
RP
520against=stage2
521
522comparison: force
523 for i in $(STAGESTUFF) ; do cmp $$i $(against)/$$i ; done
524
6a3958b2 525de-stage1: force
da0b2bff 526 - (cd stage1 ; rm as ; mv -f * ..)
6a3958b2
RP
527 - rmdir stage1
528
529de-stage2: force
da0b2bff 530 - (cd stage2 ; rm as ; mv -f * ..)
6a3958b2
RP
531 - rmdir stage2
532
533de-stage3: force
da0b2bff 534 - (cd stage3 ; rm as ; mv -f * ..)
6a3958b2 535 - rmdir stage3
fecd2382
RP
536
537# Copy just the executable files from a particular stage into a subdirectory,
538# and delete the object files. Use this if you're just verifying a version
539# that is pretty sure to work, and you are short of disk space.
540risky-stage1: force
541 -mkdir stage1
542 -mv cc1 cpp cccp gcc stage1
543 -rm -f stage1/gnulib
544 -cp gnulib stage1 && $(RANLIB) stage1/gnulib
545 -make clean
546
547risky-stage2: force
548 -mkdir stage2
549 -mv cc1 cpp cccp gcc stage2
550 -rm -f stage2/gnulib
551 -cp gnulib stage2 && $(RANLIB) stage2/gnulib
552 -make clean
553
554risky-stage3: force
555 -mkdir stage3
556 -mv cc1 cpp cccp gcc stage3
557 -rm -f stage3/gnulib
558 -cp gnulib stage3 && $(RANLIB) stage3/gnulib
559 -make clean
560
561risky-stage4: force
562 -mkdir stage4
563 -mv cc1 cpp cccp gcc stage4
564 -rm -f stage4/gnulib
565 -cp gnulib stage4 && $(RANLIB) stage4/gnulib
566 -make clean
567
568#In GNU Make, ignore whether `stage*' exists.
569.PHONY: stage1 stage2 stage3 stage4 clean realclean TAGS bootstrap
570.PHONY: risky-stage1 risky-stage2 risky-stage3 risky-stage4
571
572force:
573
574Makefile: $(srcdir)/Makefile.in $(srcdir)/configure
61907f51 575 (cd $(srcdir) ; \
3d6f0983
RP
576 ./configure +destdir=$(destdir) \
577 +norecurse \
da0b2bff 578 `if [ "$(srcdir)" != "." ] ; then echo +subdirs; fi` \
3d6f0983 579 $(host) +target=$(target))
61907f51 580
This page took 0.058733 seconds and 4 git commands to generate.