1995-09-29 04:07:08 +01:00
|
|
|
# Sed commands to finish translating the binutils Unix makefile into MPW syntax.
|
|
|
|
|
1996-01-16 21:12:17 +01:00
|
|
|
# Add a rule.
|
1995-09-29 04:07:08 +01:00
|
|
|
/^#### .*/a\
|
|
|
|
\
|
|
|
|
"{o}"underscore.c.o \\Option-f "{o}"underscore.c\
|
|
|
|
|
1996-01-16 21:12:17 +01:00
|
|
|
# Comment out any alias settings.
|
|
|
|
/^host_alias =/s/^/#/
|
|
|
|
/^target_alias =/s/^/#/
|
|
|
|
|
1995-09-29 04:07:08 +01:00
|
|
|
# Whack out unused host define bits.
|
|
|
|
/HDEFINES/s/@HDEFINES@//
|
|
|
|
|
1996-08-16 04:32:31 +02:00
|
|
|
# Don't build specialized tools.
|
1995-09-29 04:07:08 +01:00
|
|
|
/BUILD_NLMCONV/s/@BUILD_NLMCONV@//
|
|
|
|
/BUILD_SRCONV/s/@BUILD_SRCONV@//
|
|
|
|
/BUILD_DLLTOOL/s/@BUILD_DLLTOOL@//
|
|
|
|
|
|
|
|
/UNDERSCORE/s/@UNDERSCORE@/{UNDERSCORE}/
|
|
|
|
|
1996-02-27 03:13:37 +01:00
|
|
|
# Don't need this.
|
|
|
|
/@HLDFLAGS@/s/@HLDFLAGS@//
|
|
|
|
|
|
|
|
# Point at the libraries directly.
|
|
|
|
/@BFDLIB@/s/@BFDLIB@/::bfd:libbfd.o/
|
|
|
|
/@OPCODES@/s/@OPCODES@/::opcodes:libopcodes.o/
|
|
|
|
|
1995-09-29 04:07:08 +01:00
|
|
|
# Whack out target makefile fragment.
|
|
|
|
/target_makefile_fragment/s/target_makefile_fragment@//
|
|
|
|
|
|
|
|
# Fix and add to the include paths.
|
|
|
|
/^INCLUDES = .*$/s/$/ -i "{INCDIR}":mpw: -i ::extra-include:/
|
|
|
|
/BFDDIR/s/-i {BFDDIR} /-i "{BFDDIR}": /
|
|
|
|
/INCDIR/s/-i {INCDIR} /-i "{INCDIR}": /
|
|
|
|
|
|
|
|
# Use byacc instead of bison (for now anyway).
|
|
|
|
/BISON/s/^BISON =.*$/BISON = byacc/
|
|
|
|
#/BISONFLAGS/s/^BISONFLAGS =.*$/BISONFLAGS = /
|
|
|
|
|
1996-08-16 04:32:31 +02:00
|
|
|
# Embed the version in symbolic doublequotes that will expand to
|
|
|
|
# the right thing for each compiler.
|
|
|
|
/VERSION/s/'"{VERSION}"'/{dq}{VERSION}{dq}/
|
|
|
|
|
1995-09-29 04:07:08 +01:00
|
|
|
# '+' is a special char to MPW, don't use it ever.
|
|
|
|
/c++filt/s/c++filt/cplusfilt/
|
|
|
|
|
1996-08-16 04:32:31 +02:00
|
|
|
# All of the binutils use the same Rez file, change names to refer to it.
|
1995-09-29 04:07:08 +01:00
|
|
|
/^{[A-Z]*_PROG}/s/$/ "{s}"mac-binutils.r/
|
|
|
|
/{[A-Z]*_PROG}\.r/s/{[A-Z]*_PROG}\.r/mac-binutils.r/
|
|
|
|
|
1996-01-16 21:12:17 +01:00
|
|
|
# There are auto-generated references to BFD .h files that are not
|
|
|
|
# in the objdir (like bfd.h) but are in the source dir.
|
|
|
|
/::bfd:lib/s/::bfd:lib\([a-z]*\)\.h/{BFDDIR}:lib\1.h/g
|
|
|
|
|
1995-09-29 04:07:08 +01:00
|
|
|
# Fix the locations of generated files.
|
|
|
|
/config/s/"{s}"config\.h/"{o}"config.h/g
|
|
|
|
/config/s/^config\.h/"{o}"config\.h/
|
|
|
|
/underscore/s/"{s}"underscore\.c/"{o}"underscore.c/g
|
|
|
|
/underscore/s/^underscore\.c/"{o}"underscore\.c/
|
|
|
|
|
|
|
|
# Fix paths to generated source files.
|
|
|
|
/lex.yy.c/s/"{s}"lex\.yy\.c/"{o}"lex.yy.c/g
|
|
|
|
/lex.yy.c/s/^lex\.yy\.c/"{o}"lex.yy.c/
|
|
|
|
/arlex.c/s/"{s}"arlex\.c/"{o}"arlex.c/g
|
|
|
|
/arlex.c/s/^arlex\.c/"{o}"arlex.c/
|
1995-10-25 20:12:25 +01:00
|
|
|
/y.tab.c/s/"{s}"y\.tab\.c/"{o}"y.tab.c/g
|
|
|
|
/y.tab.c/s/^y\.tab\.c/"{o}"y.tab.c/
|
1995-09-29 04:07:08 +01:00
|
|
|
/arparse.c/s/"{s}"arparse\.c/"{o}"arparse.c/g
|
|
|
|
/arparse.c/s/^arparse\.c/"{o}"arparse.c/
|
1995-10-25 20:12:25 +01:00
|
|
|
/y.tab.h/s/"{s}"y\.tab\.h/"{o}"y.tab.h/g
|
|
|
|
/y.tab.h/s/^y\.tab\.h/"{o}"y.tab.h/
|
1995-09-29 04:07:08 +01:00
|
|
|
/arparse.h/s/"{s}"arparse\.h/"{o}"arparse.h/g
|
|
|
|
/arparse.h/s/^arparse\.h/"{o}"arparse.h/
|
|
|
|
|
|
|
|
/"{s}"{INCDIR}/s/"{s}"{INCDIR}/"{INCDIR}"/g
|
|
|
|
|
|
|
|
# The generated lexer may include an ifdef for older Mac compilers that
|
|
|
|
# needs to work with newer compilers also.
|
|
|
|
/lex.yy.c/s/Rename -y \([^ ]*\) \([^ ]*\)$/sed -e 's,ifdef macintosh,if defined(macintosh) || defined(__MWERKS__),' \1 > \2/
|
|
|
|
|
|
|
|
# Fix an over-eagerness.
|
|
|
|
/echo.*WARNING.*This file/s/'.*'/' '/
|
|
|
|
|
1996-01-25 20:38:14 +01:00
|
|
|
# Add a "stamps" target.
|
|
|
|
$a\
|
|
|
|
stamps \\Option-f stamp-under\
|
|
|
|
|
1995-12-01 23:44:24 +01:00
|
|
|
/^install \\Option-f /,/^$/c\
|
|
|
|
install \\Option-f all install-only\
|
|
|
|
\
|
|
|
|
install-only \\Option-f\
|
1996-12-19 20:29:38 +01:00
|
|
|
NewFolderRecursive "{bindir}"\
|
1995-12-01 23:44:24 +01:00
|
|
|
# Need to copy all the tools\
|
|
|
|
For prog in {PROGS}\
|
|
|
|
Set progname `echo {prog} | sed -e 's/.new//'`\
|
|
|
|
Duplicate -y :{prog} "{bindir}"{progname}\
|
|
|
|
End For\
|
|
|
|
|
|
|
|
|
1996-01-16 21:12:17 +01:00
|
|
|
/true/s/ ; @true$//
|
|
|
|
|
|
|
|
# dot files are trouble, remove them and their actions.
|
|
|
|
/^\.dep/,/^$/d
|
|
|
|
|
1995-09-29 04:07:08 +01:00
|
|
|
# Remove un-useful targets.
|
|
|
|
/^Makefile \\Option-f/,/^$/d
|
|
|
|
/^"{o}"config.h \\Option-f/,/^$/d
|
|
|
|
/^config.status \\Option-f/,/^$/d
|
1995-11-12 22:03:38 +01:00
|
|
|
|
|
|
|
# Don't try to make the demangler's man page, it's useless.
|
|
|
|
/^{DEMANGLER_PROG}\.1 \\Option-f/,/^$/d
|
|
|
|
# Don't depend on it either.
|
|
|
|
/{DEMANGLER_PROG}/s/ {DEMANGLER_PROG}\.1//
|
|
|
|
|