]>
Commit | Line | Data |
---|---|---|
d8474a9b | 1 | # Makefile for GNU binary-file utilities |
d8e89b6b | 2 | # Copyright (C) 1989-1992 Free Software Foundation, Inc. |
d8474a9b PB |
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. | |
99a42820 | 19 | |
a10d26a1 | 20 | srcdir = . |
84396dcf | 21 | |
d8e89b6b RP |
22 | prefix = /usr/local |
23 | ||
3790af1d | 24 | program_transform_name = |
d8e89b6b RP |
25 | exec_prefix = $(prefix) |
26 | bindir = $(exec_prefix)/bin | |
27 | libdir = $(exec_prefix)/lib | |
28 | tooldir = $(libdir) | |
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 | |
84396dcf RP |
44 | |
45 | SHELL = /bin/sh | |
d8e89b6b RP |
46 | |
47 | INSTALL = install -c | |
48 | INSTALL_PROGRAM = $(INSTALL) | |
49 | INSTALL_DATA = $(INSTALL) | |
50 | ||
51 | AR = ar | |
52 | AR_FLAGS = qv | |
53 | CFLAGS = -g | |
d8e89b6b RP |
54 | MAKEINFO = makeinfo |
55 | RANLIB = ranlib | |
9752f9fd | 56 | BISONFLAGS = -d |
c83497f5 | 57 | TEXI2ROFF=texi2roff |
b5132a6b | 58 | |
8d5d0e11 PB |
59 | SYMLINK = ln -s |
60 | ||
9752f9fd | 61 | BISON = `if [ -f ../byacc/byacc ] ; then echo ../byacc/byacc ; else echo byacc ; fi` |
45212e5e PB |
62 | # Comment these out if using lex. |
63 | LEX_OPTIONS = -I -Cem | |
64 | LEX = `if [ -f ../flex/flex ] ; then echo ../flex/flex -S../flex/flex.skel ; else echo flex ; fi` | |
65 | ||
8539db10 | 66 | # Distribution version |
455a0d28 | 67 | VERSION=1.97.90 |
8539db10 | 68 | # Distribution name |
d8e89b6b | 69 | DIST_NAME=binutils-${VERSION} |
8539db10 | 70 | |
d8e89b6b | 71 | version=`./../gcc/gcc -dumpversion` |
b5132a6b | 72 | |
6b583720 | 73 | # Where to find texinfo.tex to format docn with TeX |
b7a11ec2 RP |
74 | TEXIDIR = $(srcdir)/../texinfo/fsf |
75 | ||
3790af1d | 76 | MANPAGES= ar nm objdump ranlib size strip |
84396dcf | 77 | |
a10d26a1 | 78 | #CC=gcc -Wall |
06a97fbd | 79 | # these two are almost the same program |
a10d26a1 RP |
80 | AR_PROG=ar |
81 | RANLIB_PROG=ranlib | |
99a42820 RP |
82 | |
83 | # copy and strip should be the same program | |
a10d26a1 RP |
84 | COPY_PROG=copy |
85 | STRIP_PROG=strip | |
99a42820 RP |
86 | |
87 | # These should all be the same program too. | |
a10d26a1 RP |
88 | SIZE_PROG=size |
89 | NM_PROG=nm | |
90 | OBJDUMP_PROG=objdump | |
99a42820 | 91 | |
d8e89b6b | 92 | PROGS = $(SIZE_PROG) $(OBJDUMP_PROG) $(NM_PROG) $(AR_PROG) $(STRIP_PROG) $(RANLIB_PROG) |
a01bf1fb | 93 | STAGESTUFF = $(PROGS) *.o |
8d5d0e11 PB |
94 | # Files that can be generated, but should be in the distribution. |
95 | DISTSTUFF=arparse.c arlex.c binutils.mm | |
99a42820 | 96 | |
40773f7f | 97 | BASEDIR = $(srcdir)/.. |
d8e89b6b | 98 | LIBDIR = ./../bfd |
a4ef8601 | 99 | OPCODEDIR = ./../opcodes |
a10d26a1 | 100 | |
a10d26a1 RP |
101 | #### host and target dependant Makefile fragments come in here. |
102 | ### | |
103 | ||
9bba7784 | 104 | INCDIR = $(BASEDIR)/include |
99a42820 | 105 | |
d8e89b6b RP |
106 | .c.o: |
107 | $(CC) -c $(CFLAGS) -I. -I$(srcdir) -I$(INCDIR) $(HDEFINES) $(TDEFINES) $< | |
99a42820 | 108 | |
a26878d1 RP |
109 | # When adding .o files, to make VPATH work in Sun Make, you have to |
110 | # also add a foo.o: foo.c line at the bottom of the file. | |
60c80016 | 111 | DISASMS = m68k-pinsn.o i960-pinsn.o i386-pinsn.o sparc-pinsn.o am29k-pinsn.o |
6a3958b2 | 112 | |
99a42820 RP |
113 | #\f |
114 | ## Random definitions | |
115 | # Hopefully all these may be flushed once we get configuration down pat. | |
116 | ||
117 | # alloca only needed for systems which don't have it and when cc != gcc. | |
118 | # ALLOCA = alloca.o | |
119 | ||
120 | # nm tries to malloc enough space for the string table. The old GNU malloc | |
121 | # rounds this up to a power of two (e.g. 5M becomes 8M), and so it might | |
122 | # fail unnecessarily. I've also seen some Unix malloc's fail, even when | |
123 | # there is enough memory. So use the new GNU malloc. | |
124 | # MALLOC = gmalloc.o | |
125 | ||
126 | # Use the GNU getopt unless you have problems with it. | |
127 | # The IRIS version could probably benefit from being assembled with | |
128 | # libmalloc rather than the ordinary malloc. | |
d8e89b6b | 129 | LIBIBERTY = ./../libiberty/libiberty.a |
99a42820 RP |
130 | |
131 | # Code shared by all the binutils. | |
a10d26a1 | 132 | BULIBS = bucomm.o version.o filemode.o |
99a42820 | 133 | |
7a5a3c7b | 134 | ADDL_LIBS = $(MALLOC) $(BULIBS) $(BFD) $(LIBIBERTY) |
99a42820 RP |
135 | |
136 | BFD = $(LIBDIR)/libbfd.a | |
a4ef8601 | 137 | OPCODES = $(OPCODEDIR)/libopcodes.a |
99a42820 RP |
138 | #\f |
139 | ## The rules | |
140 | ||
c83497f5 RP |
141 | all: $(ADDL_LIBS) $(PROGS) |
142 | ||
d8e89b6b | 143 | check: |
dc760829 | 144 | /bin/sh $(srcdir)/sanity.sh . |
d8e89b6b | 145 | |
7d6cc102 RP |
146 | test-install: |
147 | /bin/sh $(srcdir)/sanity.sh $(bindir) | |
148 | ||
d8e89b6b | 149 | info: binutils.info |
a10d26a1 RP |
150 | |
151 | #$(BFD):$(LIBDIR)/../common/*.c | |
152 | # (cd $(LIBDIR); make) | |
99a42820 | 153 | |
a10d26a1 | 154 | $(SIZE_PROG): $(ADDL_LIBS) size.o $(BFD) |
6a3958b2 | 155 | $(CC) $(LDFLAGS) $(CFLAGS) -o $(SIZE_PROG) size.o $(ADDL_LIBS) $(LOADLIBES) |
99a42820 | 156 | |
d8e89b6b RP |
157 | $(COPY_PROG): $(ADDL_LIBS) copy.o not-strip.o $(BFD) |
158 | $(CC) $(LDFLAGS) $(CFLAGS) -o $(COPY_PROG) copy.o not-strip.o $(ADDL_LIBS) $(LOADLIBES) | |
159 | ||
160 | $(STRIP_PROG): $(ADDL_LIBS) copy.o is-strip.o $(BFD) | |
161 | $(CC) $(LDFLAGS) $(CFLAGS) -o $(STRIP_PROG) copy.o is-strip.o $(ADDL_LIBS) $(LOADLIBES) | |
99a42820 | 162 | |
a10d26a1 | 163 | $(NM_PROG): $(ADDL_LIBS) nm.o $(BFD) |
6a3958b2 | 164 | $(CC) $(LDFLAGS) $(CFLAGS) -o $(NM_PROG) nm.o $(ADDL_LIBS) $(LOADLIBES) |
99a42820 | 165 | |
a4ef8601 | 166 | $(OBJDUMP_PROG): $(ADDL_LIBS) size.o objdump.o $(DISASMS) $(BFD) $(OPCODES) |
fd9d7e4a | 167 | $(CC) $(LDFLAGS) $(CFLAGS) -o $(OBJDUMP_PROG) objdump.o $(DISASMS) $(ADDL_LIBS) $(OPCODES) $(LOADLIBES) |
99a42820 | 168 | |
d8e89b6b | 169 | arparse.c:arparse.y |
9752f9fd ME |
170 | $(BISON) $(BISONFLAGS) $(srcdir)/arparse.y |
171 | -mv y.tab.c arparse.c | |
172 | -mv y.tab.h arparse.h | |
d8e89b6b | 173 | |
99a42820 | 174 | |
9752f9fd ME |
175 | arlex.c: arlex.l |
176 | $(LEX) $(LEX_OPTIONS) $(srcdir)/arlex.l | |
177 | mv lex.yy.c arlex.c | |
d8e89b6b RP |
178 | |
179 | $(AR_PROG): $(ADDL_LIBS) ar.o arparse.o arlex.o not-ranlib.o $(BFD) arsup.o | |
180 | $(CC) $(LDFLAGS) $(CFLAGS) -o $(AR_PROG) ar.o arparse.o arlex.o arsup.o not-ranlib.o $(ADDL_LIBS) $(LOADLIBES) | |
181 | ||
182 | $(RANLIB_PROG): $(ADDL_LIBS) ar.o is-ranlib.o arparse.o arlex.o arsup.o $(BFD) | |
183 | $(CC) $(LDFLAGS) $(CFLAGS) -o $(RANLIB_PROG) ar.o arparse.o arlex.o arsup.o is-ranlib.o $(ADDL_LIBS) $(LOADLIBES) | |
06a97fbd PB |
184 | |
185 | # This rule creates a single binary that switches between ar and ranlib | |
186 | # by looking at argv[0]. Use this kludge to save some disk space. | |
187 | # However, you have to install things by hand. | |
188 | # (That is after 'make install', replace the installed ranlib by a link to ar.) | |
189 | ||
190 | # Alternatively, you can install ranlib.sh as ranlib. | |
191 | ||
192 | ar_with_ranlib: $(ADDL_LIBS) ar.o maybe-ranlib.o $(BFD) | |
193 | $(CC) $(LDFLAGS) $(CFLAGS) -o $(AR_PROG) ar.o maybe-ranlib.o $(ADDL_LIBS) $(LOADLIBES) | |
a10d26a1 RP |
194 | -rm -f $(RANLIB_PROG) |
195 | -ln $(AR_PROG) $(RANLIB_PROG) | |
99a42820 | 196 | |
d8e89b6b RP |
197 | # copy and strip in one binary that uses argv[0] to decide its action. |
198 | ||
199 | copy_with_strip: $(ADDL_LIBS) copy.o maybe-strip.o $(BFD) | |
200 | $(CC) $(LDFLAGS) $(CFLAGS) -o $(COPY_PROG) copy.o maybe-strip.o $(ADDL_LIBS) $(LOADLIBES) | |
a10d26a1 RP |
201 | -rm -f $(STRIP_PROG) |
202 | -ln $(COPY_PROG) $(STRIP_PROG) | |
99a42820 | 203 | |
6a3958b2 RP |
204 | stage1: force |
205 | - mkdir stage1 | |
a01bf1fb | 206 | - mv -f $(STAGESTUFF) stage1 |
6a3958b2 RP |
207 | |
208 | stage2: force | |
209 | - mkdir stage2 | |
a01bf1fb | 210 | - mv -f $(STAGESTUFF) stage2 |
6a3958b2 RP |
211 | |
212 | stage3: force | |
213 | - mkdir stage3 | |
a01bf1fb RP |
214 | - mv -f $(STAGESTUFF) stage3 |
215 | ||
216 | against=stage2 | |
217 | ||
218 | comparison: force | |
219 | for i in $(STAGESTUFF) ; do cmp $$i $(against)/$$i ; done | |
6a3958b2 RP |
220 | |
221 | de-stage1: force | |
222 | - (cd stage1 ; mv -f * ..) | |
223 | - rmdir stage1 | |
224 | ||
225 | de-stage2: force | |
226 | - (cd stage2 ; mv -f * ..) | |
227 | - rmdir stage2 | |
228 | ||
229 | de-stage3: force | |
230 | - (cd stage3 ; mv -f * ..) | |
231 | - rmdir stage3 | |
232 | ||
6b583720 RP |
233 | ###################################################################### |
234 | # DOCUMENTATION TARGETS | |
235 | # TeX output | |
2226a090 RP |
236 | binutils.dvi: $(srcdir)/binutils.texi |
237 | TEXINPUTS=${TEXIDIR}:.:$$TEXINPUTS tex $(srcdir)/binutils.texi | |
b7a11ec2 | 238 | texindex binutils.?? |
2226a090 | 239 | TEXINPUTS=${TEXIDIR}:.:$$TEXINPUTS tex $(srcdir)/binutils.texi |
b7a11ec2 | 240 | |
6b583720 | 241 | # info file for online browsing |
2226a090 | 242 | binutils.info: $(srcdir)/binutils.texi |
6141fd50 | 243 | $(MAKEINFO) -o binutils.info $(srcdir)/binutils.texi |
b7a11ec2 | 244 | |
0c10ff03 | 245 | # different targets for -ms, -mm, -me |
c83497f5 RP |
246 | # Try to use a recent texi2roff. v2 was put on prep in jan91. |
247 | # If you want an index, see texi2roff doc for postprocessing | |
248 | # and add -i to texi2roff invocations below. | |
249 | # Workarounds for texi2roff-2 (probably fixed in later texi2roff's, delete | |
250 | # correspondint -e lines when later texi2roff's are current) | |
251 | # + @ifinfo's deleted explicitly due to texi2roff-2 bug w nested constructs. | |
252 | # + @c's deleted explicitly because texi2roff sees texinfo commands in them | |
253 | # + @ (that's at-BLANK) not recognized by texi2roff, turned into blank | |
254 | # + @alphaenumerate is ridiculously new, turned into @enumerate | |
255 | ||
0c10ff03 | 256 | # roff output (-ms) |
2226a090 | 257 | binutils.ms: $(srcdir)/binutils.texi |
6b583720 RP |
258 | sed -e '/\\input texinfo/d' \ |
259 | -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \ | |
c83497f5 RP |
260 | -e '/^@ifinfo/,/^@end ifinfo/d' \ |
261 | -e '/^@c/d' \ | |
2226a090 | 262 | -e 's/{.*,,/{/' \ |
c83497f5 RP |
263 | -e 's/@ / /g' \ |
264 | -e 's/^@alphaenumerate/@enumerate/g' \ | |
265 | -e 's/^@end alphaenumerate/@end enumerate/g' \ | |
2226a090 | 266 | $(srcdir)/binutils.texi | \ |
d8e89b6b | 267 | $(TEXI2ROFF) -ms | \ |
c83497f5 RP |
268 | sed -e 's/---/\\(em/g' \ |
269 | >binutils.ms | |
6b583720 | 270 | |
0c10ff03 | 271 | # roff output (-mm) |
c83497f5 RP |
272 | # '@noindent's removed due to texi2roff-2 mm bug; if yours is newer, |
273 | # try leaving them in | |
2226a090 | 274 | binutils.mm: $(srcdir)/binutils.texi |
0c10ff03 RP |
275 | sed -e '/\\input texinfo/d' \ |
276 | -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \ | |
c83497f5 RP |
277 | -e '/^@ifinfo/,/^@end ifinfo/d' \ |
278 | -e '/^@c/d' \ | |
2226a090 RP |
279 | -e 's/{.*,,/{/' \ |
280 | -e '/@noindent/d' \ | |
c83497f5 RP |
281 | -e 's/@ / /g' \ |
282 | -e 's/^@alphaenumerate/@enumerate/g' \ | |
283 | -e 's/^@end alphaenumerate/@end enumerate/g' \ | |
2226a090 | 284 | $(srcdir)/binutils.texi | \ |
d8e89b6b | 285 | $(TEXI2ROFF) -mm | \ |
2226a090 RP |
286 | sed -e 's/---/\\(em/g' \ |
287 | >binutils.mm | |
0c10ff03 RP |
288 | |
289 | # roff output (-me) | |
2226a090 | 290 | binutils.me: $(srcdir)/binutils.texi |
0c10ff03 RP |
291 | sed -e '/\\input texinfo/d' \ |
292 | -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \ | |
c83497f5 RP |
293 | -e '/^@ifinfo/,/^@end ifinfo/d' \ |
294 | -e '/^@c/d' \ | |
2226a090 | 295 | -e 's/{.*,,/{/' \ |
c83497f5 RP |
296 | -e 's/@ / /g' \ |
297 | -e 's/^@alphaenumerate/@enumerate/g' \ | |
298 | -e 's/^@end alphaenumerate/@end enumerate/g' \ | |
2226a090 | 299 | $(srcdir)/binutils.texi | \ |
d8e89b6b | 300 | $(TEXI2ROFF) -me | \ |
c83497f5 RP |
301 | sed -e 's/---/\\(em/g' \ |
302 | >binutils.me | |
0c10ff03 RP |
303 | |
304 | ||
6b583720 RP |
305 | ###################################################################### |
306 | ||
8d5d0e11 PB |
307 | mostlyclean: |
308 | -rm -f *.o *~ \#* core *.o binutils.?? binutils.??? | |
309 | clean: mostlyclean | |
310 | -rm $(STAGESTUFF) | |
311 | distclean: clean | |
312 | -rm Makefile config.status | |
313 | realclean: distclean | |
314 | -rm -f $(DISTSTUFF) TAGS | |
99a42820 RP |
315 | |
316 | etags tags: TAGS | |
317 | ||
6a3958b2 | 318 | TAGS: force |
99a42820 RP |
319 | etags $(INCDIR)/*.h $(BFDSRC)/*.[hc] *.[hc] |
320 | ||
c83497f5 | 321 | install: all |
f478fcf6 ILT |
322 | -parent=`echo $(bindir)|sed -e 's@/[^/]*$$@@'`; \ |
323 | if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi | |
324 | -if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; fi | |
b5132a6b | 325 | for i in $(PROGS) ; do \ |
3790af1d | 326 | $(INSTALL_PROGRAM) $$i $(bindir)/`t='$(program_transform_name)'; echo $$i | sed -e "" $$t` ; \ |
99a42820 | 327 | done |
8d5d0e11 PB |
328 | if [ -d $(tooldir) ] ; then true ; else mkdir $(tooldir) ; fi |
329 | -rm -f $(tooldir)/nm | |
330 | cd $(tooldir); $(SYMLINK) $(bindir)/$(program_prefix)nm$(program_suffix) nm | |
f478fcf6 ILT |
331 | -parent=`echo $(man1dir)|sed -e 's@/[^/]*$$@@'`; \ |
332 | if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi | |
333 | -if [ -d $(man1dir) ] ; then true ; else mkdir $(man1dir) ; fi | |
84396dcf | 334 | for i in $(MANPAGES) ; do \ |
3790af1d | 335 | $(INSTALL_DATA) $(srcdir)/$$i.1 $(man1dir)/`t='$(program_transform_name)'; echo $$i | sed -e "" $$t`.1 ; \ |
de53632c | 336 | done |
c83497f5 | 337 | |
d8e89b6b | 338 | install-info: info |
f478fcf6 ILT |
339 | -parent=`echo $(infodir)|sed -e 's@/[^/]*$$@@'`; \ |
340 | if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi | |
341 | -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; fi | |
de53632c | 342 | for i in *.info* ; do \ |
d8e89b6b | 343 | $(INSTALL_DATA) $$i $(infodir)/$$i ; \ |
84396dcf | 344 | done |
99a42820 | 345 | |
d8e89b6b RP |
346 | clean-info: |
347 | -rm -rf *.info* | |
348 | ||
8539db10 PB |
349 | dist: $(DIST_NAME).tar.Z |
350 | ||
8d5d0e11 PB |
351 | diststuff: $(DISTSTUFF) |
352 | ||
d8474a9b | 353 | $(DIST_NAME).tar.Z: |
b27d2046 | 354 | cd ../..; rm -f $(DIST_NAME); ln -s devo $(DIST_NAME) |
8d5d0e11 PB |
355 | make diststuff -f Makefile.in |
356 | cd ../ld; make diststuff -f Makefile.in | |
d8474a9b | 357 | cd ../..; tar chf - $(DIST_NAME) | compress >$(DIST_NAME).tar.Z |
b27d2046 | 358 | rm -rf ../../$(DIST_NAME) |
8539db10 | 359 | |
d7cce023 JG |
360 | # These get around a bug in Sun Make in SunOS 4.1.1 |
361 | alloca.o:alloca.c | |
a26878d1 | 362 | am29k-pinsn.o: am29k-pinsn.c |
99a42820 | 363 | ar.o: ar.c |
22923083 | 364 | arsup.o: arsup.c |
d7cce023 JG |
365 | bucomm.o: bucomm.c |
366 | copy.o: copy.c | |
d7cce023 | 367 | filemode.o:filemode.c |
a10d26a1 RP |
368 | getopt.o:getopt.c |
369 | getopt1.o:getopt1.c | |
d7cce023 JG |
370 | gmalloc.o:gmalloc.c |
371 | i960-pinsn.o: i960-pinsn.c | |
372 | is-ranlib.o:is-ranlib.c | |
d8e89b6b | 373 | is-strip.o:is-strip.c |
d7cce023 JG |
374 | m68k-pinsn.o: m68k-pinsn.c |
375 | maybe-ranlib.o:maybe-ranlib.c | |
d8e89b6b | 376 | maybe-strip.o:maybe-strip.c |
d7cce023 JG |
377 | nm.o: nm.c |
378 | not-ranlib.o:not-ranlib.c | |
d8e89b6b | 379 | not-strip.o:not-strip.c |
d7cce023 JG |
380 | objdump.o: objdump.c |
381 | size.o: size.c | |
382 | sparc-pinsn.o: sparc-pinsn.c | |
60c80016 | 383 | i386-pinsn.o: i386-pinsn.c |
d7cce023 | 384 | strip.o:strip.c |
d8e89b6b RP |
385 | version.o: $(srcdir)/version.c |
386 | $(CC) $(CFLAGS) -I. -I$(srcdir) -I$(INCDIR) $(HDEFINES) $(TDEFINES) -DVERSION='"$(VERSION)"' -c $(srcdir)/version.c | |
8539db10 | 387 | |
99a42820 RP |
388 | #----------------------------------------------------------------------------- |
389 | # 'STANDARD' GNU/960 TARGETS BELOW THIS POINT | |
390 | # | |
391 | # 'VERSION' file must be present and contain a string of the form "x.y" | |
392 | #----------------------------------------------------------------------------- | |
393 | ||
394 | ver960.c: FORCE | |
395 | rm -f ver960.c | |
396 | echo "char ${TARG}_ver[]= \"${TARG} `cat VERSION`, `date`\";" > ver960.c | |
397 | ||
398 | ||
399 | # Dummy target to force execution of dependent targets. | |
400 | # | |
6a3958b2 | 401 | force: |
99a42820 RP |
402 | |
403 | # Target to uncomment host-specific lines in this makefile. Such lines must | |
404 | # have the following string beginning in column 1: #__<hostname>__# | |
405 | # Original Makefile is backed up as 'Makefile.old'. | |
406 | # | |
407 | # Invoke with: make make HOST=xxx | |
408 | # | |
409 | make: | |
410 | -@if test $(HOST)x = x ; then \ | |
411 | echo '\aSpecify "make make HOST=???"'; \ | |
412 | exit 1; \ | |
413 | fi ; \ | |
414 | grep -s "^#The next line was generated by 'make make'" Makefile; \ | |
415 | if test $$? = 0 ; then \ | |
416 | echo "\aMakefile has already been processed with 'make make'";\ | |
417 | exit 1; \ | |
418 | fi ; \ | |
419 | mv -f Makefile Makefile.old; \ | |
420 | echo "#The next line was generated by 'make make'" >Makefile ; \ | |
421 | echo "HOST=$(HOST)" >>Makefile ; \ | |
422 | echo >>Makefile ; \ | |
423 | sed "s/^#__$(HOST)__#//" < Makefile.old >>Makefile | |
424 | ||
f1eb48b6 | 425 | Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag) |
a26878d1 | 426 | $(SHELL) ./config.status |
99a42820 RP |
427 | |
428 | ### Local Variables: *** | |
429 | ### mode:fundamental *** | |
430 | ### page-delimiter: "^#\f" *** | |
431 | ### End: *** | |
432 | ### end of file |