Use ``set remote memory-read-packet-size'' instead of ``set endian
[deliverable/binutils-gdb.git] / gdb / mpw-make.sed
index 6725b3cd7a63168882a981247b6b481c6804bab3..ce6a9ecdb155b1bac10a0d9097a94fa6ddf5e208 100644 (file)
@@ -1,11 +1,14 @@
 # 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@/{ENABLE_CFLAGS}/g
+/^ENABLE_CFLAGS=/s/^/#/
+
 # Edit all the symbolic definitions pointing to various libraries and such.
 
 /^INCLUDE_DIR = /s/"{srcdir}":include/"{topsrcdir}"include:/
@@ -13,7 +16,7 @@
 /^MMALLOC_DIR = /s/::mmalloc/mmalloc:/
 /^MMALLOC_SRC = /s/"{srcdir}"/"{topsrcdir}"/
 /^MMALLOC =/s/=.*$/=/
-/#MMALLOC_DISABLE/s/^#//
+/MMALLOC_CFLAGS =/s/=.*$/= -u USE_MMALLOC/
 
 /^BFD_DIR = /s/::bfd/bfd:/
 /^BFD = /s/{BFD_DIR}:libbfd/{BFD_DIR}libbfd/
 
 /^TERMCAP =/s/ =.*$/ =/
 
+# Whack out various autoconf vars that we don't need.
+/@CONFIG_LDFLAGS@/s/@CONFIG_LDFLAGS@//g
+/@HLDFLAGS@/s/@HLDFLAGS@//g
 /@DEFS@/s/@DEFS@//g
-
 /@YACC@/s/@YACC@/byacc/g
-
 /@ENABLE_OBS@/s/@ENABLE_OBS@//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
@@ -54,8 +62,6 @@
 readline_headers =\
 
 
-/{MMALLOC_CHECK}/s/{MMALLOC_CHECK}//g
-
 # This isn't really useful, and seems to cause nonsensical complaints.
 /{ALLDEPFILES}/s/{ALLDEPFILES}//g
 
@@ -64,8 +70,11 @@ readline_headers =\
 # 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
@@ -84,6 +93,7 @@ readline_headers =\
 /init/s/"{s}"init\.c/"{o}"init.c/g
 /init/s/^init\.c/"{o}"init.c/
 
+# Fix up the generation of version.c.
 /"{o}"version.c \\Option-f Makefile/,/^$/c\
 "{o}"version.c \\Option-f Makefile\
        echo -n 'char *version = "'      >"{o}"version.c\
@@ -97,6 +107,8 @@ readline_headers =\
        echo '";'                       >>"{o}"version.c\
 
 
+/ansidecl/s/include "{s}""ansidecl.h"/include "ansidecl.h"/
+
 # Open-brace in a command causes much confusion; replace with the
 # result from a script.
 /initialize_all_files ()/c\
@@ -104,8 +116,9 @@ readline_headers =\
        open-brace >> "{o}"init.c-tmp
 
 # Replace the whole sed bit for init.c; it's simpler that way...
-/filename=`echo $i | sed/,/esac/c\
-          set filename "`Echo {i} | sed \\Option-d\
+/echo {OBS} {TSOBS}/,/echo '}'/c\
+       For i in {OBS} {TSOBS}\
+          Set filename "`Echo {i} | sed \\Option-d\
             -e '/^Onindy.c.o/d' \\Option-d\
             -e '/^nindy.c.o/d' \\Option-d\
             -e '/ttyflush.c.o/d' \\Option-d\
@@ -122,7 +135,9 @@ readline_headers =\
           If "{filename}" != ""\
             sed <"{s}""{filename}" >>"{o}"init.c-tmp -n \\Option-d\
             -e '/^_initialize_[a-z_0-9A-Z]* *(/s/^\\([a-z_0-9A-Z]*\\).*/  {extern void \\1 (); \\1 ();}/p'\
-          End If
+          End If\
+       End For\
+       Echo '}' >>"{o}"init.c-tmp
 
 # Fix the main compile/link command.
 /{CC_LD} {INTERNAL_LDFLAGS} -o gdb/,/"{o}"init.c.o {OBS} {TSOBS} {ADD_FILES} {CLIBS} {LOADLIBES}/c\
@@ -130,3 +145,34 @@ readline_headers =\
        {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}'"'\
 
+# Replace the install actions with MPW-friendly script.
+/^install \\Option-f /,/^$/c\
+install \\Option-f all install-only\
+\
+install-only \\Option-f \
+       NewFolderRecursive "{bindir}"\
+       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
+
+# Don't test config.h dependencies.
+/^"{o}"config.h \\Option-f/s/^/#/
+
+# Add an action to build SIOWgdb.
+$a\
+SIOWgdb \\Option-f {OBS} {TSOBS} {ADD_DEPS} {CDEPS} "{o}"init.c.o\
+       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} "{s}"mac-gdb.r -o SIOWgdb -append -d VERSION_STRING='"'{version}'"'\
+
This page took 0.024305 seconds and 4 git commands to generate.