* mpw-config.in: Add PowerMac target support, generate config.h.
[deliverable/binutils-gdb.git] / ld / mpw-make.sed
CommitLineData
49af8a4e
SS
1# Sed commands to finish translating the ld Makefile.in into MPW syntax.
2
3/HDEFINES/s/@HDEFINES@//
4
5/^target_alias = @target_alias@/s/^/#/
6
7/^EMUL = @EMUL@/s/^/#/
8
9/^EMULATION_OFILES = @EMULATION_OFILES@/s/^/#/
10
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}": /
15
16# Use byacc instead of bison (for now anyway).
17/BISON/s/^BISON =.*$/BISON = byacc/
18#/BISONFLAGS/s/^BISONFLAGS =.*$/BISONFLAGS = /
19
20# Suppress the suppression of smart makes.
21/^\.y\.c/d
22
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} -d DEFAULT_EMULATION='"'{EMUL}'"' -d SCRIPTDIR='"'{scriptdir}'"' {ALL_CFLAGS} "{s}"ldmain.c -o "{o}"ldmain.c.o\
27
28
29# Remove ldemul-list.h build, rely on configure to make one.
30/^ldemul-list.h /,/Rename -y "{s}"ldemul-tmp.h /d
31
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/
35
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/
40
41/ldgram.c/s/"{s}"ldgram\.c/"{o}"ldgram.c/g
42/ldgram.c/s/^ldgram\.c/"{o}"ldgram.c/
43
44/ldgram.h/s/"{s}"ldgram\.h/"{o}"ldgram.h/g
45/ldgram.h/s/^ldgram\.h/"{o}"ldgram.h/
46
47/ldlex.c/s/"{s}"ldlex\.c/"{o}"ldlex.c/g
48/ldlex.c/s/^ldlex\.c/"{o}"ldlex.c/
49
50/ldlex.c.new/s/"{s}"ldlex\.c\.new/"{o}"ldlex.c.new/g
51
52/lex.yy.c/s/"{s}"lex\.yy\.c/"{o}"lex.yy.c/g
53
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/
56
57/"{s}"e.*\.c/s/"{s}"e\([-_a-z0-9]*\)\.c/"{o}"e\1.c/g
58/^e.*\.c/s/^e\([-_a-z0-9]*\)\.c/"{o}"e\1.c/
59
60#/sed.*free/,/> "{o}"ldlex.c.new/c\
61# \ Catenate "{o}"lex.yy.c >"{o}"ldlex.c.new
62
63# The resource file is called mac-ld.r.
64/{LD_PROG}.r/s/{LD_PROG}\.r/mac-ld.r/
65
66# Remove dependency rebuilding crud.
67/^.dep /,/# .PHONY /d
68
69# Remove the lintlog action, pipe symbols in column 1 lose.
70/^lintlog \\Option-f/,/^$/d
71
72/^Makefile \\Option-f/,/^$/d
73/^"{o}"config.h \\Option-f/,/^$/d
74/^config.status \\Option-f/,/^$/d
This page took 0.025418 seconds and 4 git commands to generate.