]>
Commit | Line | Data |
---|---|---|
fecd2382 | 1 | # Makefile for GNU Assembler |
79a54a5b | 2 | # Copyright (C) 1987-1992 Free Software Foundation, Inc. |
fecd2382 RP |
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 | |
1058238c | 8 | #the Free Software Foundation; either version 2, or (at your option) |
fecd2382 RP |
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 | ||
fecd2382 RP |
20 | # The targets for external use include: |
21 | # all, doc, proto, install, uninstall, includes, TAGS, | |
22 | # clean, cleanconfig, realclean, stage1, stage2, stage3, stage4. | |
23 | ||
24 | # Variables that exist for you to override. | |
25 | # See below for how to change them for certain systems. | |
26 | ||
1058238c RP |
27 | srcdir = . |
28 | ||
29 | prefix = /usr/local | |
30 | ||
7e10f53c | 31 | program_transform_name = |
787c6bfe RP |
32 | exec_prefix = $(prefix) |
33 | bindir = $(exec_prefix)/bin | |
34 | libdir = $(exec_prefix)/lib | |
35 | tooldir = $(libdir) | |
36 | ||
1058238c | 37 | datadir = $(prefix)/lib |
787c6bfe | 38 | mandir = $(prefix)/man |
1058238c RP |
39 | man1dir = $(mandir)/man1 |
40 | man2dir = $(mandir)/man2 | |
41 | man3dir = $(mandir)/man3 | |
42 | man4dir = $(mandir)/man4 | |
43 | man5dir = $(mandir)/man5 | |
44 | man6dir = $(mandir)/man6 | |
45 | man7dir = $(mandir)/man7 | |
46 | man8dir = $(mandir)/man8 | |
47 | man9dir = $(mandir)/man9 | |
787c6bfe | 48 | infodir = $(prefix)/info |
1058238c RP |
49 | includedir = $(prefix)/include |
50 | docdir = $(datadir)/doc | |
51 | ||
fecd2382 | 52 | SHELL = /bin/sh |
1058238c | 53 | |
fecd2382 | 54 | INSTALL = install -c |
fecd2382 | 55 | INSTALL_PROGRAM = $(INSTALL) |
1058238c | 56 | INSTALL_DATA = $(INSTALL) |
fecd2382 | 57 | |
1058238c RP |
58 | AR = ar |
59 | AR_FLAGS = qv | |
60 | BISON = bison | |
61 | MAKEINFO = makeinfo | |
fecd2382 | 62 | RANLIB = ranlib |
4b857710 ILT |
63 | CFLAGS = -g |
64 | ||
65 | FLAGS_TO_PASS = \ | |
66 | "prefix=$(prefix)" \ | |
67 | "exec_prefix=$(exec_prefix)" \ | |
68 | "tooldir=$(tooldir)" \ | |
69 | "AR=$(AR)" \ | |
70 | "AR_FLAGS=$(AR_FLAGS)" \ | |
71 | "CC=$(CC)" \ | |
72 | "CFLAGS=$(CFLAGS)" \ | |
73 | "RANLIB=$(RANLIB)" \ | |
74 | "LOADLIBES=$(LOADLIBES)" \ | |
75 | "LDFLAGS=$(LDFLAGS)" \ | |
76 | "BISON=$(BISON)" \ | |
77 | "LEX=$(LEX)" \ | |
78 | "MAKEINFO=$(MAKEINFO)" \ | |
79 | "INSTALL=$(INSTALL)" \ | |
80 | "INSTALL_DATA=$(INSTALL_DATA)" \ | |
81 | "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" | |
fecd2382 | 82 | |
fecd2382 RP |
83 | # Lists of files for various purposes. |
84 | ||
85 | REAL_SOURCES = \ | |
86 | $(srcdir)/app.c \ | |
87 | $(srcdir)/as.c \ | |
88 | $(srcdir)/atof-generic.c \ | |
89 | $(srcdir)/bignum-copy.c \ | |
90 | $(srcdir)/cond.c \ | |
91 | $(srcdir)/expr.c \ | |
5d53038b | 92 | $(srcdir)/flonum-konst.c \ |
fecd2382 RP |
93 | $(srcdir)/flonum-copy.c \ |
94 | $(srcdir)/flonum-mult.c \ | |
95 | $(srcdir)/frags.c \ | |
96 | $(srcdir)/hash.c \ | |
97 | $(srcdir)/hex-value.c \ | |
98 | $(srcdir)/input-file.c \ | |
99 | $(srcdir)/input-scrub.c \ | |
100 | $(srcdir)/messages.c \ | |
542e1629 | 101 | $(srcdir)/obstack.c \ |
fecd2382 RP |
102 | $(srcdir)/output-file.c \ |
103 | $(srcdir)/read.c \ | |
542e1629 | 104 | $(srcdir)/strerror.c \ |
fecd2382 RP |
105 | $(srcdir)/strstr.c \ |
106 | $(srcdir)/subsegs.c \ | |
107 | $(srcdir)/symbols.c \ | |
108 | $(srcdir)/version.c \ | |
109 | $(srcdir)/write.c \ | |
3340f7e5 | 110 | $(srcdir)/listing.c \ |
fecd2382 RP |
111 | $(srcdir)/xmalloc.c \ |
112 | $(srcdir)/xrealloc.c | |
113 | ||
114 | # in an expedient order | |
115 | LINKED_SOURCES = \ | |
116 | targ-cpu.c \ | |
117 | obj-format.c \ | |
118 | atof-targ.c | |
119 | ||
120 | SOURCES = $(LINKED_SOURCES) $(REAL_SOURCES) | |
121 | ||
122 | REAL_HEADERS = \ | |
123 | $(srcdir)/as.h \ | |
124 | $(srcdir)/bignum.h \ | |
125 | $(srcdir)/expr.h \ | |
126 | $(srcdir)/flonum.h \ | |
127 | $(srcdir)/frags.h \ | |
128 | $(srcdir)/hash.h \ | |
129 | $(srcdir)/input-file.h \ | |
542e1629 | 130 | $(srcdir)/listing.h \ |
fecd2382 RP |
131 | $(srcdir)/tc.h \ |
132 | $(srcdir)/obj.h \ | |
542e1629 | 133 | $(srcdir)/obstack.h \ |
fecd2382 | 134 | $(srcdir)/read.h \ |
fecd2382 RP |
135 | $(srcdir)/struc-symbol.h \ |
136 | $(srcdir)/subsegs.h \ | |
137 | $(srcdir)/symbols.h \ | |
fecd2382 RP |
138 | $(srcdir)/write.h |
139 | ||
140 | LINKED_HEADERS = \ | |
141 | a.out.gnu.h \ | |
142 | a.out.h \ | |
143 | host.h \ | |
144 | targ-env.h \ | |
145 | targ-cpu.h \ | |
146 | obj-format.h \ | |
147 | atof-targ.h | |
148 | ||
149 | HEADERS = $(LINKED_HEADERS) $(REAL_HEADERS) | |
150 | ||
151 | OBJS = \ | |
152 | targ-cpu.o \ | |
153 | obj-format.o \ | |
154 | atof-targ.o \ | |
155 | app.o \ | |
156 | as.o \ | |
157 | atof-generic.o \ | |
158 | bignum-copy.o \ | |
159 | cond.o \ | |
160 | expr.o \ | |
5d53038b | 161 | flonum-konst.o \ |
fecd2382 RP |
162 | flonum-copy.o \ |
163 | flonum-mult.o \ | |
164 | frags.o \ | |
165 | hash.o \ | |
166 | hex-value.o \ | |
167 | input-file.o \ | |
168 | input-scrub.o \ | |
169 | messages.o \ | |
542e1629 | 170 | obstack.o \ |
fecd2382 RP |
171 | output-file.o \ |
172 | read.o \ | |
542e1629 | 173 | strerror.o \ |
fecd2382 RP |
174 | strstr.o \ |
175 | subsegs.o \ | |
176 | symbols.o \ | |
177 | version.o \ | |
178 | write.o \ | |
3340f7e5 | 179 | listing.o \ |
fecd2382 RP |
180 | xmalloc.o \ |
181 | xrealloc.o | |
182 | ||
f6b67e4c RP |
183 | #### host, target, and site specific Makefile frags come in here. |
184 | ||
542e1629 | 185 | all: as.new |
4b857710 | 186 | @(cd doc ; $(MAKE) $(FLAGS_TO_PASS) all) |
79a54a5b | 187 | |
1058238c | 188 | info: |
4b857710 | 189 | @(cd doc ; $(MAKE) $(FLAGS_TO_PASS) info) |
79a54a5b | 190 | |
81f73963 | 191 | install-info: |
4b857710 | 192 | @(cd doc ; $(MAKE) $(FLAGS_TO_PASS) install-info) |
79a54a5b RP |
193 | |
194 | clean-info: | |
4b857710 | 195 | @(cd doc ; $(MAKE) $(FLAGS_TO_PASS) clean-info) |
fecd2382 | 196 | |
fecd2382 RP |
197 | # Now figure out from those variables how to compile and link. |
198 | ||
199 | # This is the variable actually used when we compile. | |
7121231f | 200 | ALL_CFLAGS = $(INTERNAL_CFLAGS) $(CROSS) $(CFLAGS) $(HDEFINES) $(TDEFINES) -DTARGET_CPU=\"$(target_cpu)\" |
fecd2382 | 201 | |
fecd2382 RP |
202 | # How to link with both our special library facilities |
203 | # and the system's installed libraries. | |
f6b67e4c | 204 | |
4b857710 | 205 | LIBS = $(LOCAL_LOADLIBES) $(CLIB) ../libiberty/libiberty.a |
fecd2382 RP |
206 | |
207 | # Specify the directories to be searched for header files. | |
208 | # Both . and srcdir are used, in that order, | |
209 | # so that tm.h and config.h will be found in the compilation | |
210 | # subdirectory rather than in the source directory. | |
1058238c RP |
211 | INCLUDES = -I. -I$(srcdir) -I$(srcdir)/config -I$(srcdir)/../include |
212 | SUBDIR_INCLUDES = -I.. -I$(srcdir) -I$(srcdir)/config | |
fecd2382 RP |
213 | |
214 | # Always use -I$(srcdir)/config when compiling. | |
215 | .c.o: | |
216 | $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $< | |
217 | ||
218 | # This tells GNU make version 3 not to export all the variables | |
219 | # defined in this file into the environment. | |
220 | .NOEXPORT: | |
542e1629 | 221 | |
fecd2382 | 222 | # Files to be copied away after each stage in building. |
da0b2bff | 223 | STAGESTUFF = *.o as.new |
fecd2382 | 224 | |
b0952e12 | 225 | as.new: $(OBJS) $(LIBDEPS) $(LOCAL_LOADLIBES) |
5d53038b | 226 | [ ! -f as.new ] || mv as.new as.old |
da0b2bff | 227 | $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o as.new $(OBJS) $(LIBS) $(LOADLIBES) |
fecd2382 | 228 | |
787c6bfe RP |
229 | check: |
230 | ||
fecd2382 RP |
231 | config.status: |
232 | @echo You must configure gas. Look at the INSTALL file for details. | |
233 | @false | |
234 | ||
fecd2382 RP |
235 | # Compiling object files from source files. |
236 | ||
fecd2382 | 237 | app.o : app.c as.h host.h targ-env.h obj-format.h \ |
d1a9e594 | 238 | targ-cpu.h struc-symbol.h \ |
fecd2382 RP |
239 | write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h |
240 | as.o : as.c as.h host.h targ-env.h obj-format.h \ | |
d1a9e594 | 241 | targ-cpu.h struc-symbol.h \ |
fecd2382 RP |
242 | write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h |
243 | atof-generic.o : atof-generic.c as.h host.h targ-env.h obj-format.h \ | |
d1a9e594 | 244 | targ-cpu.h struc-symbol.h \ |
fecd2382 RP |
245 | write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h |
246 | bignum-copy.o : bignum-copy.c as.h host.h \ | |
247 | targ-env.h obj-format.h \ | |
d1a9e594 | 248 | targ-cpu.h struc-symbol.h \ |
fecd2382 RP |
249 | write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h |
250 | cond.o : cond.c as.h host.h targ-env.h obj-format.h \ | |
d1a9e594 | 251 | targ-cpu.h struc-symbol.h \ |
da7aaffb SEF |
252 | write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h |
253 | ||
fecd2382 | 254 | debug.o : debug.c as.h host.h targ-env.h obj-format.h \ |
d1a9e594 | 255 | targ-cpu.h struc-symbol.h \ |
fecd2382 RP |
256 | write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \ |
257 | subsegs.h | |
258 | expr.o : expr.c as.h host.h targ-env.h obj-format.h \ | |
d1a9e594 | 259 | targ-cpu.h struc-symbol.h \ |
da7aaffb SEF |
260 | write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h |
261 | ||
5d53038b | 262 | flonum-konst.o : flonum-konst.c flonum.h bignum.h |
fecd2382 | 263 | flonum-copy.o : flonum-copy.c as.h host.h targ-env.h obj-format.h \ |
d1a9e594 | 264 | targ-cpu.h struc-symbol.h \ |
fecd2382 RP |
265 | write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h |
266 | flonum-mult.o : flonum-mult.c flonum.h bignum.h | |
267 | frags.o : frags.c as.h host.h targ-env.h obj-format.h \ | |
d1a9e594 | 268 | targ-cpu.h struc-symbol.h \ |
fecd2382 | 269 | write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \ |
d1a9e594 | 270 | subsegs.h |
fecd2382 | 271 | hash.o : hash.c as.h host.h targ-env.h obj-format.h \ |
d1a9e594 | 272 | targ-cpu.h struc-symbol.h \ |
fecd2382 RP |
273 | write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h |
274 | hex-value.o : hex-value.c | |
275 | input-file.o : input-file.c as.h host.h \ | |
276 | targ-env.h obj-format.h targ-cpu.h \ | |
d1a9e594 | 277 | struc-symbol.h write.h flonum.h bignum.h expr.h \ |
fecd2382 RP |
278 | frags.h hash.h read.h symbols.h tc.h obj.h input-file.h |
279 | input-scrub.o : input-scrub.c /usr/include/errno.h /usr/include/sys/errno.h \ | |
280 | as.h host.h targ-env.h obj-format.h \ | |
d1a9e594 | 281 | targ-cpu.h struc-symbol.h \ |
fecd2382 RP |
282 | write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \ |
283 | input-file.h | |
3340f7e5 RP |
284 | listing.o : listing.c as.h host.h targ-env.h flonum.h bignum.h \ |
285 | listing.h obj-format.h targ-cpu.h struc-symbol.h write.h expr.h \ | |
286 | frags.h hash.h read.h symbols.h tc.h obj.h input-file.h | |
fecd2382 | 287 | messages.o : messages.c as.h host.h targ-env.h obj-format.h \ |
d1a9e594 | 288 | targ-cpu.h struc-symbol.h \ |
fecd2382 | 289 | write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h |
d1a9e594 | 290 | obstack.o : obstack.c |
fecd2382 | 291 | output-file.o : output-file.c as.h host.h targ-env.h obj-format.h \ |
d1a9e594 | 292 | targ-cpu.h struc-symbol.h \ |
fecd2382 RP |
293 | write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \ |
294 | output-file.h | |
295 | read.o : read.c as.h host.h targ-env.h obj-format.h \ | |
d1a9e594 | 296 | targ-cpu.h struc-symbol.h \ |
da7aaffb SEF |
297 | write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h |
298 | ||
787c6bfe | 299 | strerror.o : strerror.c |
fecd2382 RP |
300 | strstr.o : strstr.c |
301 | subsegs.o : subsegs.c as.h host.h targ-env.h obj-format.h \ | |
d1a9e594 | 302 | targ-cpu.h struc-symbol.h \ |
fecd2382 | 303 | write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \ |
d1a9e594 | 304 | subsegs.h |
fecd2382 | 305 | symbols.o : symbols.c as.h host.h targ-env.h obj-format.h \ |
d1a9e594 | 306 | targ-cpu.h struc-symbol.h \ |
fecd2382 | 307 | write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \ |
d1a9e594 | 308 | subsegs.h |
fecd2382 RP |
309 | version.o : version.c |
310 | write.o : write.c as.h host.h targ-env.h obj-format.h \ | |
d1a9e594 | 311 | targ-cpu.h struc-symbol.h \ |
fecd2382 | 312 | write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \ |
d1a9e594 | 313 | subsegs.h output-file.h |
fecd2382 RP |
314 | xmalloc.o : xmalloc.c |
315 | xrealloc.o : xrealloc.c | |
316 | atof-targ.o : atof-targ.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 \ |
319 | symbols.h tc.h obj.h | |
320 | obj-format.o : obj-format.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 \ |
d1a9e594 | 323 | symbols.h tc.h obj.h |
fecd2382 | 324 | targ-cpu.o : targ-cpu.c targ-env.h obj-format.h \ |
d1a9e594 | 325 | targ-cpu.h struc-symbol.h \ |
fecd2382 | 326 | write.h flonum.h bignum.h expr.h frags.h hash.h read.h \ |
da0b2bff | 327 | symbols.h tc.h obj.h $(TARG_CPU_DEPENDENTS) |
d1a9e594 | 328 | |
fecd2382 RP |
329 | # Remake the info files. |
330 | ||
921faa52 | 331 | doc: $(srcdir)/as.info |
fecd2382 | 332 | |
921faa52 | 333 | $(srcdir)/as.info: $(srcdir)/doc/as.texinfo |
4b857710 | 334 | @(cd doc; make $(FLAGS_TO_PASS) as.info; mv as.info $srcdir) |
fecd2382 | 335 | |
fecd2382 | 336 | clean: |
4b857710 | 337 | @(cd doc ; $(MAKE) $(FLAGS_TO_PASS) clean) |
542e1629 | 338 | -rm -f $(STAGESTUFF) core |
fecd2382 RP |
339 | |
340 | # Like clean but also delete the links made to configure gas. | |
542e1629 RP |
341 | distclean: clean |
342 | -rm -f config.status Makefile host.h targ-env.h targ-cpu.h \ | |
343 | targ-cpu.c obj-format.h obj-format.c atof-targ.c \ | |
344 | gas.aux gas.cps gas.fns gas.info gas.kys gas.pgs | |
345 | gas.tps gas.vrs TAGS gas.info* gas.?? gas.??s gas.log \ | |
346 | gas.toc gas.*aux *.dvi | |
347 | ||
fecd2382 RP |
348 | # Entry points `install', `includes' and `uninstall'. |
349 | ||
350 | # Copy the files into directories where they will be run. | |
542e1629 | 351 | install: |
4b857710 ILT |
352 | -parent=`echo $(bindir)|sed -e 's@/[^/]*$$@@'`; \ |
353 | if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi | |
354 | -if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; fi | |
355 | -parent=`echo $(man1dir)|sed -e 's@/[^/]*$$@@'`; \ | |
356 | if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi | |
357 | -if [ -d $(man1dir) ] ; then true ; else mkdir $(man1dir) ; fi | |
7e10f53c ILT |
358 | -n=`t='$(program_transform_name)'; echo as | sed -e "" $$t`; \ |
359 | rm -f $(bindir)/$$n; \ | |
360 | $(INSTALL_PROGRAM) as.new $(bindir)/$$n; \ | |
361 | rm -f $(tooldir)/as; \ | |
362 | ln $(bindir)/$$n $(tooldir)/as || cp $(bindir)/$$n $(tooldir)/as; \ | |
363 | $(INSTALL_DATA) $(srcdir)/doc/as.1 $(man1dir)/$$n.1 | |
fecd2382 | 364 | |
fecd2382 RP |
365 | # Cancel installation by deleting the installed files. |
366 | uninstall: | |
7e10f53c ILT |
367 | -n=`t='$(program_transform_name)'; echo as | sed -e "" $$t`; \ |
368 | rm -f $(bindir)/$$n; \ | |
369 | rm -f $(mandir)/$$n.1 | |
542e1629 | 370 | |
fecd2382 RP |
371 | # These exist for maintenance purposes. |
372 | ||
373 | tags TAGS: force | |
787c6bfe | 374 | etags $(REAL_HEADERS) $(REAL_SOURCES) $(srcdir)/config/*.[hc] $(srcdir)/README $(srcdir)/Makefile.in |
fecd2382 | 375 | |
542e1629 | 376 | bootstrap: as.new force |
fecd2382 | 377 | $(MAKE) stage1 |
542e1629 | 378 | $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage1/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new |
fecd2382 | 379 | $(MAKE) stage2 |
542e1629 | 380 | $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage2/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new |
a01bf1fb | 381 | $(MAKE) comparison against=stage2 |
fecd2382 RP |
382 | |
383 | bootstrap2: force | |
542e1629 | 384 | $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage1/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new |
fecd2382 | 385 | $(MAKE) stage2 |
542e1629 | 386 | $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage2/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new |
da0b2bff | 387 | $(MAKE) comparison against=stage2 |
fecd2382 RP |
388 | |
389 | bootstrap3: force | |
542e1629 | 390 | $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage2/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new |
a01bf1fb | 391 | $(MAKE) comparison against=stage2 |
fecd2382 RP |
392 | |
393 | # Copy the object files from a particular stage into a subdirectory. | |
394 | stage1: force | |
395 | -mkdir stage1 | |
396 | -mv $(STAGESTUFF) stage1 | |
81f73963 | 397 | if [ -f stage1/as.new -a ! -f stage1/as ] ; then (cd stage1 ; ln -s as.new as) ; fi |
fecd2382 RP |
398 | |
399 | stage2: force | |
400 | -mkdir stage2 | |
401 | -mv $(STAGESTUFF) stage2 | |
81f73963 | 402 | if [ -f stage2/as.new -a ! -f stage2/as ] ; then (cd stage2 ; ln -s as.new as) ; fi |
fecd2382 RP |
403 | |
404 | stage3: force | |
405 | -mkdir stage3 | |
6a3958b2 | 406 | -mv $(STAGESTUFF) stage3 |
81f73963 | 407 | if [ -f stage3/as.new -a ! -f stage3/as ] ; then (cd stage3 ; ln -s as.new as) ; fi |
fecd2382 | 408 | |
a01bf1fb RP |
409 | against=stage2 |
410 | ||
411 | comparison: force | |
412 | for i in $(STAGESTUFF) ; do cmp $$i $(against)/$$i ; done | |
413 | ||
6a3958b2 | 414 | de-stage1: force |
da0b2bff | 415 | - (cd stage1 ; rm as ; mv -f * ..) |
6a3958b2 RP |
416 | - rmdir stage1 |
417 | ||
418 | de-stage2: force | |
da0b2bff | 419 | - (cd stage2 ; rm as ; mv -f * ..) |
6a3958b2 RP |
420 | - rmdir stage2 |
421 | ||
422 | de-stage3: force | |
da0b2bff | 423 | - (cd stage3 ; rm as ; mv -f * ..) |
6a3958b2 | 424 | - rmdir stage3 |
fecd2382 | 425 | |
fecd2382 RP |
426 | #In GNU Make, ignore whether `stage*' exists. |
427 | .PHONY: stage1 stage2 stage3 stage4 clean realclean TAGS bootstrap | |
fecd2382 RP |
428 | |
429 | force: | |
430 | ||
f1eb48b6 | 431 | Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag) |
a26878d1 | 432 | $(SHELL) ./config.status |
61907f51 | 433 |