blob: 03abffe18f8a23b8fc96db9b425bcb42813926b2 [file] [log] [blame]
# Sed commands to finish translating the binutils Unix makefile into MPW syntax.
# Add a rule.
/^#### .*/a\
"{o}"underscore.c.o \\Option-f "{o}"underscore.c\
# Comment out any alias settings.
/^host_alias =/s/^/#/
/^target_alias =/s/^/#/
# Whack out unused host define bits.
# Don't build specialized tools.
# Don't need this.
# Point at the libraries directly.
# Whack out 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/
# Embed the version in symbolic doublequotes that will expand to
# the right thing for each compiler.
# '+' is a special char to MPW, don't use it ever.
# All of the binutils use the same Rez file, change names to refer to it.
/^{[A-Z]*_PROG}/s/$/ "{s}"mac-binutils.r/
# There are auto-generated references to BFD .h files that are not
# in the objdir (like bfd.h) but are in the source dir.
# Fix the locations of generated files.
# Fix paths to generated source files.
# 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/'.*'/' '/
# Add a "stamps" target.
stamps \\Option-f stamp-under\
/^install \\Option-f /,/^$/c\
install \\Option-f all install-only\
install-only \\Option-f\
NewFolderRecursive "{bindir}"\
# 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\
/true/s/ ; @true$//
# dot files are trouble, remove them and their actions.
# Remove un-useful targets.
/^Makefile \\Option-f/,/^$/d
/^"{o}"config.h \\Option-f/,/^$/d
/^config.status \\Option-f/,/^$/d
# 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.