# Sed commands that finish translating the GDB Unix Makefile to MPW syntax.
-/^host_alias =/d
-/^target_alias =/d
+/^host_alias =/s/^/#/
+/^target_alias =/s/^/#/
/^host_makefile_frag@$/d
/^target_makefile_frag@$/d
-/@ENABLE_CFLAGS@/s/@ENABLE_CFLAGS@//g
+/@ENABLE_CFLAGS@/s/@ENABLE_CFLAGS@/{ENABLE_CFLAGS}/g
+/^ENABLE_CFLAGS=/s/^/#/
# Edit all the symbolic definitions pointing to various libraries and such.
/^TERMCAP =/s/ =.*$/ =/
+# Whack out autoconf hook for thread debugging.
+/@CONFIG_LDFLAGS@/s/@CONFIG_LDFLAGS@//g
+
/@DEFS@/s/@DEFS@//g
/@YACC@/s/@YACC@/byacc/g
/@ENABLE_CLIBS@/s/@ENABLE_CLIBS@//g
+/@LIBS@/s/@LIBS@//g
+
+# Whack out autoconf hook for thread debugging.
+/@THREAD_DB_OBS@/s/@THREAD_DB_OBS@//g
+
+# Fix up paths to include directories.
/INCLUDE_DIR/s/"{s}"{INCLUDE_DIR}/{INCLUDE_DIR}/g
/INCLUDE_DIR/s/{INCLUDE_DIR}:/{INCLUDE_DIR}/g
/INCLUDE_DIR/s/"{INCLUDE_DIR}":/"{INCLUDE_DIR}"/g
# Fix the syntax of bits of C code that go into version.c.
/char /s/'char .Option-x/'char */
+# Point at files in the obj dir rather than src dir.
/version/s/"{s}"version\.c/"{o}"version.c/g
/version/s/^version\.c/"{o}"version.c/
+/config/s/"{s}"config\.h/"{o}"config.h/g
+/config/s/^config\.h/"{o}"config.h/
/xm/s/"{s}"xm\.h/"{o}"xm.h/g
/xm/s/^xm\.h/"{o}"xm.h/
/tm/s/"{s}"tm\.h/"{o}"tm.h/g
{MAKEPEF} gdb{PROG_EXT} -o gdb {MAKEPEF_TOOL_FLAGS} {MAKEPEF_FLAGS}\
{REZ} "{s}"mac-gdb.r -o gdb -append -d PROG_NAME='"'gdb'"' -d VERSION_STRING='"'{version}'"'\
+/^install \\Option-f /,/^$/c\
+install \\Option-f all install-only\
+\
+install-only \\Option-f \
+ Duplicate -y gdb "{bindir}"gdb\
+ If "`Exists SiowGDB`" != ""\
+ Duplicate -y SiowGDB "{bindir}"SiowGDB\
+ End If\
+
+
# Don't do any recursive subdir stuff.
/ subdir_do/s/{MAKE}/null-command/
+# Edit out actions that only confuse MPW Make.
/^config.status \\Option-f/,/^$/d
+/^Makefile \\Option-f/,/^$/d
+
+/^"{o}"config.h \\Option-f/s/^/#/
# Add an action to build SIOWgdb.
$a\
Delete -i -y SIOWgdb\
{CC_LD} {INTERNAL_LDFLAGS} -t 'APPL' -c 'gdb ' -o SIOWgdb{PROG_EXT} "{o}"init.c.o {OBS} {TSOBS} {ADD_FILES} {CLIBS} {SIOW_LIB} {LOADLIBES} {EXTRALIBS}\
{MAKEPEF} SIOWgdb{PROG_EXT} -o SIOWgdb -ft 'APPL' -fc 'gdb ' {MAKEPEF_FLAGS} \
- {REZ} -o SIOWgdb {RIncludes}siow.r -append -d __kPrefSize=5000 -d __kMinSize=2000 -d APPNAME='"'SIOWgdb'"' \
+ {REZ} -o SIOWgdb "{RIncludes}"siow.r -append -d __kPrefSize=5000 -d __kMinSize=2000 -d APPNAME='"'SIOWgdb'"' \
{REZ} "{s}"mac-gdb.r -o SIOWgdb -append -d VERSION_STRING='"'{version}'"'\
-
-