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 | ||
f20f2474 SS |
29 | # Add explicit srcdir paths to special files. |
30 | /config.bfd/s/ config.bfd/ "{s}"config.bfd/g | |
31 | /targmatch.sed/s/ targmatch.sed/ "{s}"targmatch.sed/g | |
32 | ||
698e0075 SS |
33 | # Point at include files that are always in the objdir. |
34 | /bfd/s/"{s}"bfd\.h/"{o}"bfd.h/g | |
35 | /config/s/"{s}"config\.h/"{o}"config.h/g | |
f20f2474 SS |
36 | /targmatch/s/"{s}"targmatch\.h/"{o}"targmatch.h/g |
37 | /targmatch/s/^targmatch\.h/"{o}"targmatch.h/ | |
698e0075 | 38 | /elf32-target/s/"{s}"elf32-target\.h/"{o}"elf32-target.h/g |
b576c7b3 | 39 | /elf32-target/s/^elf32-target\.h/"{o}"elf32-target.h/ |
698e0075 | 40 | /elf64-target/s/"{s}"elf64-target\.h/"{o}"elf64-target.h/g |
b576c7b3 | 41 | /elf64-target/s/^elf64-target\.h/"{o}"elf64-target.h/ |
698e0075 SS |
42 | |
43 | /"{s}"{INCDIR}/s/"{s}"{INCDIR}/"{INCDIR}"/g | |
44 | ||
45 | /dep/s/\.dep/__dep/g | |
46 | ||
47 | # Removing duplicates is cool but presently unnecessary, | |
48 | # so whack this out. | |
49 | /^ofiles \\Option-f/,/^$/d | |
50 | /ofiles/s/{OFILES} ofiles/{OFILES}/ | |
51 | /echo ofiles = /d | |
52 | /cat ofiles/s/`cat ofiles`/{OFILES}/ | |
53 | ||
54 | # No corefile support. | |
55 | /COREFILE/s/@COREFILE@// | |
56 | /COREFLAG/s/@COREFLAG@// | |
57 | ||
14fd4616 SS |
58 | # No PIC foolery in this environment. |
59 | /@ALLLIBS@/s/@ALLLIBS@/{TARGETLIB}/ | |
60 | /@PICLIST@/s/@PICLIST@// | |
61 | /@PICFLAG@/s/@PICFLAG@// | |
62 | /^{OFILES} \\Option-f stamp-picdir/,/^$/d | |
63 | ||
64 | # Remove the pic trickery from the default build rule. | |
65 | /^\.c\.o \\Option-f /,/End If/c\ | |
66 | .c.o \\Option-f .c | |
67 | ||
698e0075 SS |
68 | # MPW Make doesn't know about $<. |
69 | /"{o}"targets.c.o \\Option-f "{s}"targets.c Makefile/,/^$/c\ | |
70 | "{o}"targets.c.o \\Option-f "{s}"targets.c Makefile\ | |
22edd547 | 71 | {CC} @DASH_C_FLAG@ {ALL_CFLAGS} {TDEFAULTS} "{s}"targets.c -o "{o}"targets.c.o |
698e0075 SS |
72 | |
73 | /"{o}"archures.c.o \\Option-f "{s}"archures.c Makefile/,/^$/c\ | |
74 | "{o}"archures.c.o \\Option-f "{s}"archures.c Makefile\ | |
22edd547 | 75 | {CC} @DASH_C_FLAG@ {ALL_CFLAGS} {TDEFAULTS} "{s}"archures.c -o "{o}"archures.c.o |
698e0075 | 76 | |
14fd4616 SS |
77 | # Remove the .h rebuilding rules, we don't currently have a doc subdir, |
78 | # or a way to build the prototype-hacking tool that's in it. | |
79 | /^"{srcdir}"bfd-in2.h \\Option-f /,/^$/d | |
80 | /^"{srcdir}"libbfd.h \\Option-f /,/^$/d | |
81 | /^"{srcdir}"libcoff.h \\Option-f /,/^$/d |