* parse.c (write_dollar_variable): New function.
[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
3# Define undefined makefile variables.
4/^#### .*/a\
5\
6BUILD_NLMCONV = \
7BUILD_SRCONV = \
8SYSINFO_PROG = \
9BUILD_DLLTOOL = \
10\
11"{o}"underscore.c.o \\Option-f "{o}"underscore.c\
12
13# Whack out unused host define bits.
14/HDEFINES/s/@HDEFINES@//
15
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
22# Whack out target makefile fragment.
23/target_makefile_fragment/s/target_makefile_fragment@//
24
25# Fix and add to the include paths.
26/^INCLUDES = .*$/s/$/ -i "{INCDIR}":mpw: -i ::extra-include:/
27/BFDDIR/s/-i {BFDDIR} /-i "{BFDDIR}": /
28/INCDIR/s/-i {INCDIR} /-i "{INCDIR}": /
29
30# Use byacc instead of bison (for now anyway).
31/BISON/s/^BISON =.*$/BISON = byacc/
32#/BISONFLAGS/s/^BISONFLAGS =.*$/BISONFLAGS = /
33
34# '+' is a special char to MPW, don't use it ever.
35/c++filt/s/c++filt/cplusfilt/
36
37/^{[A-Z]*_PROG}/s/$/ "{s}"mac-binutils.r/
38/{[A-Z]*_PROG}\.r/s/{[A-Z]*_PROG}\.r/mac-binutils.r/
39
40# Fix the locations of generated files.
41/config/s/"{s}"config\.h/"{o}"config.h/g
42/config/s/^config\.h/"{o}"config\.h/
43/underscore/s/"{s}"underscore\.c/"{o}"underscore.c/g
44/underscore/s/^underscore\.c/"{o}"underscore\.c/
45
46# Fix paths to generated source files.
47/lex.yy.c/s/"{s}"lex\.yy\.c/"{o}"lex.yy.c/g
48/lex.yy.c/s/^lex\.yy\.c/"{o}"lex.yy.c/
49/arlex.c/s/"{s}"arlex\.c/"{o}"arlex.c/g
50/arlex.c/s/^arlex\.c/"{o}"arlex.c/
51/arparse.c/s/"{s}"arparse\.c/"{o}"arparse.c/g
52/arparse.c/s/^arparse\.c/"{o}"arparse.c/
53/arparse.h/s/"{s}"arparse\.h/"{o}"arparse.h/g
54/arparse.h/s/^arparse\.h/"{o}"arparse.h/
55
56/"{s}"{INCDIR}/s/"{s}"{INCDIR}/"{INCDIR}"/g
57
58# The generated lexer may include an ifdef for older Mac compilers that
59# needs to work with newer compilers also.
60/lex.yy.c/s/Rename -y \([^ ]*\) \([^ ]*\)$/sed -e 's,ifdef macintosh,if defined(macintosh) || defined(__MWERKS__),' \1 > \2/
61
62# Fix an over-eagerness.
63/echo.*WARNING.*This file/s/'.*'/' '/
64
65# Remove un-useful targets.
66/^Makefile \\Option-f/,/^$/d
67/^"{o}"config.h \\Option-f/,/^$/d
68/^config.status \\Option-f/,/^$/d
This page took 0.025707 seconds and 4 git commands to generate.