Commit | Line | Data |
---|---|---|
698e0075 SS |
1 | # Sed commands to finish translating the Unix BFD Makefile into MPW syntax. |
2 | ||
3 | # Whack out unused host and target define bits. | |
4 | /HDEFINES/s/@HDEFINES@// | |
5 | /TDEFINES/s/@TDEFINES@// | |
6 | ||
22edd547 SS |
7 | # Fix pathnames to include directories. |
8 | /^INCDIR = /s/^INCDIR = .*$/INCDIR = "{topsrcdir}"include/ | |
9 | /^CSEARCH = /s/$/ -i "{INCDIR}":mpw: -i ::extra-include:/ | |
698e0075 | 10 | |
22edd547 SS |
11 | # Comment out setting of vars, configure script will add these itself. |
12 | /^WORDSIZE =/s/^/#/ | |
13 | # /^ALL_BACKENDS/s/^/#/ | |
14 | /^BFD_BACKENDS/s/^/#/ | |
15 | /^BFD_MACHINES/s/^/#/ | |
16 | /^TDEFAULTS/s/^/#/ | |
698e0075 SS |
17 | |
18 | # Remove extra, useless, "all". | |
19 | /^all \\Option-f _oldest/,/^$/d | |
20 | ||
21 | # Remove the Makefile rebuild rule. | |
22 | /^Makefile /,/--recheck/d | |
23 | ||
24 | # Don't do any recursive subdir stuff. | |
aadf04f7 | 25 | / subdir_do/s/{MAKE}/null-command/ |
698e0075 SS |
26 | |
27 | /BFD_H/s/^{BFD_H}/#{BFD_H}/ | |
28 | ||
29 | # Point at include files that are always in the objdir. | |
30 | /bfd/s/"{s}"bfd\.h/"{o}"bfd.h/g | |
31 | /config/s/"{s}"config\.h/"{o}"config.h/g | |
32 | /elf32-target/s/"{s}"elf32-target\.h/"{o}"elf32-target.h/g | |
b576c7b3 | 33 | /elf32-target/s/^elf32-target\.h/"{o}"elf32-target.h/ |
698e0075 | 34 | /elf64-target/s/"{s}"elf64-target\.h/"{o}"elf64-target.h/g |
b576c7b3 | 35 | /elf64-target/s/^elf64-target\.h/"{o}"elf64-target.h/ |
698e0075 SS |
36 | |
37 | /"{s}"{INCDIR}/s/"{s}"{INCDIR}/"{INCDIR}"/g | |
38 | ||
39 | /dep/s/\.dep/__dep/g | |
40 | ||
41 | # Removing duplicates is cool but presently unnecessary, | |
42 | # so whack this out. | |
43 | /^ofiles \\Option-f/,/^$/d | |
44 | /ofiles/s/{OFILES} ofiles/{OFILES}/ | |
45 | /echo ofiles = /d | |
46 | /cat ofiles/s/`cat ofiles`/{OFILES}/ | |
47 | ||
48 | # No corefile support. | |
49 | /COREFILE/s/@COREFILE@// | |
50 | /COREFLAG/s/@COREFLAG@// | |
51 | ||
14fd4616 SS |
52 | # No PIC foolery in this environment. |
53 | /@ALLLIBS@/s/@ALLLIBS@/{TARGETLIB}/ | |
54 | /@PICLIST@/s/@PICLIST@// | |
55 | /@PICFLAG@/s/@PICFLAG@// | |
56 | /^{OFILES} \\Option-f stamp-picdir/,/^$/d | |
57 | ||
58 | # Remove the pic trickery from the default build rule. | |
59 | /^\.c\.o \\Option-f /,/End If/c\ | |
60 | .c.o \\Option-f .c | |
61 | ||
698e0075 SS |
62 | # MPW Make doesn't know about $<. |
63 | /"{o}"targets.c.o \\Option-f "{s}"targets.c Makefile/,/^$/c\ | |
64 | "{o}"targets.c.o \\Option-f "{s}"targets.c Makefile\ | |
22edd547 | 65 | {CC} @DASH_C_FLAG@ {ALL_CFLAGS} {TDEFAULTS} "{s}"targets.c -o "{o}"targets.c.o |
698e0075 SS |
66 | |
67 | /"{o}"archures.c.o \\Option-f "{s}"archures.c Makefile/,/^$/c\ | |
68 | "{o}"archures.c.o \\Option-f "{s}"archures.c Makefile\ | |
22edd547 | 69 | {CC} @DASH_C_FLAG@ {ALL_CFLAGS} {TDEFAULTS} "{s}"archures.c -o "{o}"archures.c.o |
698e0075 | 70 | |
14fd4616 SS |
71 | # Remove the .h rebuilding rules, we don't currently have a doc subdir, |
72 | # or a way to build the prototype-hacking tool that's in it. | |
73 | /^"{srcdir}"bfd-in2.h \\Option-f /,/^$/d | |
74 | /^"{srcdir}"libbfd.h \\Option-f /,/^$/d | |
75 | /^"{srcdir}"libcoff.h \\Option-f /,/^$/d |