Initial revision
[binutils.git] / ld / mpw-make.sed
blobc91970839a9cd9bfd5fc928896179272784dbd63
1 # Sed commands to finish translating the ld Makefile.in into MPW syntax.
3 /HDEFINES/s/@HDEFINES@//
5 /^target_alias = @target_alias@/s/^/#/
7 /^EMUL = @EMUL@/s/^/#/
9 /^EMULATION_OFILES = @EMULATION_OFILES@/s/^/#/
11 # Fixadd to the include paths.
12 /^INCLUDES = .*$/s/$/ -i "{INCDIR}":mpw: -i ::extra-include:/
13 /BFDDIR/s/-i {BFDDIR} /-i "{BFDDIR}": /
14 /INCDIR/s/-i {INCDIR} /-i "{INCDIR}": /
16 # Use byacc instead of bison (for now anyway).
17 /BISON/s/^BISON =.*$/BISON = byacc/
18 #/BISONFLAGS/s/^BISONFLAGS =.*$/BISONFLAGS = /
20 # Suppress the suppression of smart makes.
21 /^\.y\.c/d
23 # Hack up ldmain compile.
24 /^"{o}"ldmain.c.o \\Option-f .* config.status$/,/^$/c\
25 "{o}"ldmain.c.o \\Option-f  "{s}"ldmain.c\
26         {CC} @DASH_C_FLAG@ -d DEFAULT_EMULATION={dq}{EMUL}{dq} -d SCRIPTDIR={dq}{scriptdir}{dq} {ALL_CFLAGS} "{s}"ldmain.c -o "{o}"ldmain.c.o\
29 # Remove ldemul-list.h build, rely on configure to make one.
30 /^ldemul-list.h /,/Rename -y "{s}"ldemul-tmp.h /d
32 # Fix pathnames to generated files.
33 /config.h/s/"{s}"config\.h/"{o}"config.h/g
34 /config.h/s/^config\.h/"{o}"config.h/
36 /y.tab.c/s/"{s}"y\.tab\.c/"{o}"y.tab.c/g
37 /y.tab.c/s/^y\.tab\.c/"{o}"y.tab.c/
38 /y.tab.h/s/"{s}"y\.tab\.h/"{o}"y.tab.h/g
39 /y.tab.h/s/^y\.tab\.h/"{o}"y.tab.h/
41 /ldgram.c/s/"{s}"ldgram\.c/"{o}"ldgram.c/g
42 /ldgram.c/s/^ldgram\.c/"{o}"ldgram.c/
44 /ldgram.h/s/"{s}"ldgram\.h/"{o}"ldgram.h/g
45 /ldgram.h/s/^ldgram\.h/"{o}"ldgram.h/
47 /ldlex.c/s/"{s}"ldlex\.c/"{o}"ldlex.c/g
48 /ldlex.c/s/^ldlex\.c/"{o}"ldlex.c/
50 /ldlex.c.new/s/"{s}"ldlex\.c\.new/"{o}"ldlex.c.new/g
52 /lex.yy.c/s/"{s}"lex\.yy\.c/"{o}"lex.yy.c/g
54 /ldemul-list.h/s/"{s}"ldemul-list\.h/"{o}"ldemul-list.h/g
55 /ldemul-list.h/s/^ldemul-list\.h/"{o}"ldemul-list.h/
57 # Edit pathnames to emulation files.
58 /"{s}"e.*\.c/s/"{s}"e\([-_a-z0-9]*\)\.c/"{o}"e\1.c/g
59 /^e.*\.c/s/^e\([-_a-z0-9]*\)\.c/"{o}"e\1.c/
61 # We can't run genscripts, so don't try.
62 /{GENSCRIPTS}/s/{GENSCRIPTS}/null-command/
64 # Comment out the TDIRS bits.
65 /^TDIRS@/s/^/#/
67 # Point at the BFD library directly.
68 /@BFDLIB@/s/@BFDLIB@/::bfd:libbfd.o/
70 # Don't need this.
71 /@HLDFLAGS@/s/@HLDFLAGS@//
73 #/sed.*free/,/> "{o}"ldlex.c.new/c\
74 #       \       Catenate "{o}"lex.yy.c >"{o}"ldlex.c.new
76 # The resource file is called mac-ld.r.
77 /{LD_PROG}.r/s/{LD_PROG}\.r/mac-ld.r/
79 /^install \\Option-f /,/^$/c\
80 install \\Option-f  all install-only\
82 install-only \\Option-f\
83         NewFolderRecursive "{bindir}"\
84         Duplicate -y :ld.new "{bindir}"ld\
87 # Remove dependency rebuilding crud.
88 /^.dep /,/# .PHONY /d
90 # Remove the lintlog action, pipe symbols in column 1 lose.
91 /^lintlog \\Option-f/,/^$/d
93 /^Makefile \\Option-f/,/^$/d
94 /^"{o}"config.h \\Option-f/,/^$/d
95 /^config.status \\Option-f/,/^$/d