Wed Nov 4 18:42:00 1998 Dave Brolley <brolley@cygnus.com>
[deliverable/binutils-gdb.git] / binutils / mpw-make.sed
CommitLineData
d1e46898
SS
1# Sed commands to finish translating the binutils Unix makefile into MPW syntax.
2
dda8716b 3# Add a rule.
d1e46898
SS
4/^#### .*/a\
5\
d1e46898
SS
6"{o}"underscore.c.o \\Option-f "{o}"underscore.c\
7
dda8716b
SS
8# Comment out any alias settings.
9/^host_alias =/s/^/#/
10/^target_alias =/s/^/#/
11
d1e46898
SS
12# Whack out unused host define bits.
13/HDEFINES/s/@HDEFINES@//
14
1906118d 15# Don't build specialized tools.
d1e46898
SS
16/BUILD_NLMCONV/s/@BUILD_NLMCONV@//
17/BUILD_SRCONV/s/@BUILD_SRCONV@//
18/BUILD_DLLTOOL/s/@BUILD_DLLTOOL@//
19
20/UNDERSCORE/s/@UNDERSCORE@/{UNDERSCORE}/
21
ad77e2b8
SS
22# Don't need this.
23/@HLDFLAGS@/s/@HLDFLAGS@//
24
25# Point at the libraries directly.
26/@BFDLIB@/s/@BFDLIB@/::bfd:libbfd.o/
27/@OPCODES@/s/@OPCODES@/::opcodes:libopcodes.o/
28
d1e46898
SS
29# Whack out target makefile fragment.
30/target_makefile_fragment/s/target_makefile_fragment@//
31
32# Fix and add to the include paths.
33/^INCLUDES = .*$/s/$/ -i "{INCDIR}":mpw: -i ::extra-include:/
34/BFDDIR/s/-i {BFDDIR} /-i "{BFDDIR}": /
35/INCDIR/s/-i {INCDIR} /-i "{INCDIR}": /
36
37# Use byacc instead of bison (for now anyway).
38/BISON/s/^BISON =.*$/BISON = byacc/
39#/BISONFLAGS/s/^BISONFLAGS =.*$/BISONFLAGS = /
40
1906118d
SS
41# Embed the version in symbolic doublequotes that will expand to
42# the right thing for each compiler.
43/VERSION/s/'"{VERSION}"'/{dq}{VERSION}{dq}/
44
d1e46898
SS
45# '+' is a special char to MPW, don't use it ever.
46/c++filt/s/c++filt/cplusfilt/
47
1906118d 48# All of the binutils use the same Rez file, change names to refer to it.
d1e46898
SS
49/^{[A-Z]*_PROG}/s/$/ "{s}"mac-binutils.r/
50/{[A-Z]*_PROG}\.r/s/{[A-Z]*_PROG}\.r/mac-binutils.r/
51
dda8716b
SS
52# There are auto-generated references to BFD .h files that are not
53# in the objdir (like bfd.h) but are in the source dir.
54/::bfd:lib/s/::bfd:lib\([a-z]*\)\.h/{BFDDIR}:lib\1.h/g
55
d1e46898
SS
56# Fix the locations of generated files.
57/config/s/"{s}"config\.h/"{o}"config.h/g
58/config/s/^config\.h/"{o}"config\.h/
59/underscore/s/"{s}"underscore\.c/"{o}"underscore.c/g
60/underscore/s/^underscore\.c/"{o}"underscore\.c/
61
62# Fix paths to generated source files.
63/lex.yy.c/s/"{s}"lex\.yy\.c/"{o}"lex.yy.c/g
64/lex.yy.c/s/^lex\.yy\.c/"{o}"lex.yy.c/
65/arlex.c/s/"{s}"arlex\.c/"{o}"arlex.c/g
66/arlex.c/s/^arlex\.c/"{o}"arlex.c/
e78d1750
SS
67/y.tab.c/s/"{s}"y\.tab\.c/"{o}"y.tab.c/g
68/y.tab.c/s/^y\.tab\.c/"{o}"y.tab.c/
d1e46898
SS
69/arparse.c/s/"{s}"arparse\.c/"{o}"arparse.c/g
70/arparse.c/s/^arparse\.c/"{o}"arparse.c/
e78d1750
SS
71/y.tab.h/s/"{s}"y\.tab\.h/"{o}"y.tab.h/g
72/y.tab.h/s/^y\.tab\.h/"{o}"y.tab.h/
d1e46898
SS
73/arparse.h/s/"{s}"arparse\.h/"{o}"arparse.h/g
74/arparse.h/s/^arparse\.h/"{o}"arparse.h/
75
76/"{s}"{INCDIR}/s/"{s}"{INCDIR}/"{INCDIR}"/g
77
78# The generated lexer may include an ifdef for older Mac compilers that
79# needs to work with newer compilers also.
80/lex.yy.c/s/Rename -y \([^ ]*\) \([^ ]*\)$/sed -e 's,ifdef macintosh,if defined(macintosh) || defined(__MWERKS__),' \1 > \2/
81
82# Fix an over-eagerness.
83/echo.*WARNING.*This file/s/'.*'/' '/
84
e069197a
RJ
85# Add a "stamps" target.
86$a\
87stamps \\Option-f stamp-under\
88
67e69d7e
SS
89/^install \\Option-f /,/^$/c\
90install \\Option-f all install-only\
91\
92install-only \\Option-f\
51cd0ae7 93 NewFolderRecursive "{bindir}"\
67e69d7e
SS
94 # Need to copy all the tools\
95 For prog in {PROGS}\
96 Set progname `echo {prog} | sed -e 's/.new//'`\
97 Duplicate -y :{prog} "{bindir}"{progname}\
98 End For\
99
100
dda8716b
SS
101/true/s/ ; @true$//
102
103# dot files are trouble, remove them and their actions.
104/^\.dep/,/^$/d
105
d1e46898
SS
106# Remove un-useful targets.
107/^Makefile \\Option-f/,/^$/d
108/^"{o}"config.h \\Option-f/,/^$/d
109/^config.status \\Option-f/,/^$/d
d101d7bf
SS
110
111# Don't try to make the demangler's man page, it's useless.
112/^{DEMANGLER_PROG}\.1 \\Option-f/,/^$/d
113# Don't depend on it either.
114/{DEMANGLER_PROG}/s/ {DEMANGLER_PROG}\.1//
115
This page took 0.109636 seconds and 4 git commands to generate.