shorten copyright line
[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
15/BUILD_NLMCONV/s/@BUILD_NLMCONV@//
16/BUILD_SRCONV/s/@BUILD_SRCONV@//
17/BUILD_DLLTOOL/s/@BUILD_DLLTOOL@//
18
19/UNDERSCORE/s/@UNDERSCORE@/{UNDERSCORE}/
20
21# Whack out target makefile fragment.
22/target_makefile_fragment/s/target_makefile_fragment@//
23
24# Fix and add to the include paths.
25/^INCLUDES = .*$/s/$/ -i "{INCDIR}":mpw: -i ::extra-include:/
26/BFDDIR/s/-i {BFDDIR} /-i "{BFDDIR}": /
27/INCDIR/s/-i {INCDIR} /-i "{INCDIR}": /
28
29# Use byacc instead of bison (for now anyway).
30/BISON/s/^BISON =.*$/BISON = byacc/
31#/BISONFLAGS/s/^BISONFLAGS =.*$/BISONFLAGS = /
32
33# '+' is a special char to MPW, don't use it ever.
34/c++filt/s/c++filt/cplusfilt/
35
36/^{[A-Z]*_PROG}/s/$/ "{s}"mac-binutils.r/
37/{[A-Z]*_PROG}\.r/s/{[A-Z]*_PROG}\.r/mac-binutils.r/
38
dda8716b
SS
39# There are auto-generated references to BFD .h files that are not
40# in the objdir (like bfd.h) but are in the source dir.
41/::bfd:lib/s/::bfd:lib\([a-z]*\)\.h/{BFDDIR}:lib\1.h/g
42
d1e46898
SS
43# Fix the locations of generated files.
44/config/s/"{s}"config\.h/"{o}"config.h/g
45/config/s/^config\.h/"{o}"config\.h/
46/underscore/s/"{s}"underscore\.c/"{o}"underscore.c/g
47/underscore/s/^underscore\.c/"{o}"underscore\.c/
48
49# Fix paths to generated source files.
50/lex.yy.c/s/"{s}"lex\.yy\.c/"{o}"lex.yy.c/g
51/lex.yy.c/s/^lex\.yy\.c/"{o}"lex.yy.c/
52/arlex.c/s/"{s}"arlex\.c/"{o}"arlex.c/g
53/arlex.c/s/^arlex\.c/"{o}"arlex.c/
e78d1750
SS
54/y.tab.c/s/"{s}"y\.tab\.c/"{o}"y.tab.c/g
55/y.tab.c/s/^y\.tab\.c/"{o}"y.tab.c/
d1e46898
SS
56/arparse.c/s/"{s}"arparse\.c/"{o}"arparse.c/g
57/arparse.c/s/^arparse\.c/"{o}"arparse.c/
e78d1750
SS
58/y.tab.h/s/"{s}"y\.tab\.h/"{o}"y.tab.h/g
59/y.tab.h/s/^y\.tab\.h/"{o}"y.tab.h/
d1e46898
SS
60/arparse.h/s/"{s}"arparse\.h/"{o}"arparse.h/g
61/arparse.h/s/^arparse\.h/"{o}"arparse.h/
62
63/"{s}"{INCDIR}/s/"{s}"{INCDIR}/"{INCDIR}"/g
64
65# The generated lexer may include an ifdef for older Mac compilers that
66# needs to work with newer compilers also.
67/lex.yy.c/s/Rename -y \([^ ]*\) \([^ ]*\)$/sed -e 's,ifdef macintosh,if defined(macintosh) || defined(__MWERKS__),' \1 > \2/
68
69# Fix an over-eagerness.
70/echo.*WARNING.*This file/s/'.*'/' '/
71
67e69d7e
SS
72/^install \\Option-f /,/^$/c\
73install \\Option-f all install-only\
74\
75install-only \\Option-f\
76 If "`Exists "{prefix}"`" == ""\
77 Echo "{prefix}" does not exist, cannot install anything\
78 Exit 1\
79 End If\
80 If "`Exists "{bindir}"`" == ""\
81 NewFolder "{bindir}"\
82 End If\
83 # Need to copy all the tools\
84 For prog in {PROGS}\
85 Set progname `echo {prog} | sed -e 's/.new//'`\
86 Duplicate -y :{prog} "{bindir}"{progname}\
87 End For\
88
89
dda8716b
SS
90/true/s/ ; @true$//
91
92# dot files are trouble, remove them and their actions.
93/^\.dep/,/^$/d
94
d1e46898
SS
95# Remove un-useful targets.
96/^Makefile \\Option-f/,/^$/d
97/^"{o}"config.h \\Option-f/,/^$/d
98/^config.status \\Option-f/,/^$/d
d101d7bf
SS
99
100# Don't try to make the demangler's man page, it's useless.
101/^{DEMANGLER_PROG}\.1 \\Option-f/,/^$/d
102# Don't depend on it either.
103/{DEMANGLER_PROG}/s/ {DEMANGLER_PROG}\.1//
104
This page took 0.035307 seconds and 4 git commands to generate.