blob: 120b5a1fa3a5aa230c61c1006d7e0355ea464c97 [file] [log] [blame]
# Sed commands to finish translating the G++ Unix makefile into MPW syntax.
# Remove control-Ls, they upset MPW make.
s/ //g
# Remove references to always-empty variables used to mark things.
# Add a bunch of definitions, mostly empty.
/^# Variables that exist for you to override.$/a\
xmake_file = \
tmake_file = \
build_xm_file = \
REAL_H = \
# The "target" variable is special to MPW make, avoid it.
# Suppress the suppression of smart makes.
# Whack out "..." assignments.
/\.\.\./s/^\([a-z_]*= \.\.\.\)/#\1/
# Previous edits go a little overboard, undo.
/^objext = /s/"{o}"//
# Always link in low-level MPW functions.
/^LIBDEPS=/s/$/ ::strerror.c.o ::mpwlib.c.o/
/{CLIB}/s/{CLIB}/ ::strerror.c.o ::mpwlib.c.o {CLIB}/
# Don't get tricky about finding various .o file, point at dir above.
# Point includes at parent directly correctly.
/^INCLUDES = /s/:\./::/g
/^INCLUDES = /s/"{srcdir}"\.\./"{topsrcdir}"gcc:/g
/^INCLUDES = /s,"{srcdir}"/\.\.,"{topsrcdir}"gcc:,g
/^INCLUDES = /s,"{srcdir}":config,"{topsrcdir}"gcc:config:,g
# Add the special MPW include dirs.
/^INCLUDES = /s/$/ -i "{topsrcdir}"include:mpw: -i :::extra-include:/
# A nasty hack to reduce confusion.
/true/s/ ; @true$//
# (should be in common translation?)
/{CC_LD} /s/$/ {EXTRALIBS}/
# Don't use general compiler flags (which may include definitions
# and other compiler-only bits) with linking commands.
# Whack out build rules that are not useful.
/^Makefile \\Option-f /,/^$/d
/^config.status \\Option-f /,/^$/d
# (Note that MPW make is not case sensitive, and so this name
# is considered the same as "md_file".)
/^{MD_FILE} \\Option-f/,/^$/d
# Depending on config.status is not useful for us.
/config.status/s/ config.status//
# Repeat of stuff from generic edit.
# Fix references to C frontend files in main dir.
# Fix pathnames to generated files in the objdir.
# Put in the definition of YYEMPTY directly.
/grep/s/grep .* >>/Echo '#define YYEMPTY -1' >>/
# If the dates are wrong, then this tries to run gperf, which we don't
# really want.
# Sed the object file list instead of using cat (meow).
/cat/s/`cat /`sed -e 's,:,::,g' -e 's,{objext},.o,g' /
# Simplify dependencies of generated parser files.
# Fix the compile line for the generated parser.
/{CC} -c/,/echo {PARSE_C}/c\
{CC} @DASH_C_FLAG@ {ALL_CFLAGS} {ALL_CPPFLAGS} {INCLUDES} {BIG_SWITCHFLAG} "{o}"parse.c -o "{o}"parse.c.o\
# Change all Rez commands to use mac-gcc.r.
# Remove pathname junk from the container name.