diff options
author | Stan Shebs <shebs@codesourcery.com> | 1995-09-29 03:07:08 +0000 |
---|---|---|
committer | Stan Shebs <shebs@codesourcery.com> | 1995-09-29 03:07:08 +0000 |
commit | d1e46898ffce600fb1412190967ff04524d2153b (patch) | |
tree | e4cdea49d70e5b933e53a56eca3dae05ce21a778 /binutils/mpw-make.sed | |
parent | 63c67f3c43ad7bac586d2aa553878fead11803d0 (diff) | |
download | gdb-d1e46898ffce600fb1412190967ff04524d2153b.zip gdb-d1e46898ffce600fb1412190967ff04524d2153b.tar.gz gdb-d1e46898ffce600fb1412190967ff04524d2153b.tar.bz2 |
* mpw-config.in: Calculate underscore and put into makefile
fragment, generate config.h.
* mpw-make.sed: New file, sed commands to edit Unix makefile
into MPW syntax.
* mpw-make.in: Remove.
* mac-binutils.r: New file, Mac resources.
Diffstat (limited to 'binutils/mpw-make.sed')
-rw-r--r-- | binutils/mpw-make.sed | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/binutils/mpw-make.sed b/binutils/mpw-make.sed new file mode 100644 index 0000000..3f28e44 --- /dev/null +++ b/binutils/mpw-make.sed @@ -0,0 +1,68 @@ +# Sed commands to finish translating the binutils Unix makefile into MPW syntax. + +# Define undefined makefile variables. +/^#### .*/a\ +\ +BUILD_NLMCONV = \ +BUILD_SRCONV = \ +SYSINFO_PROG = \ +BUILD_DLLTOOL = \ +\ +"{o}"underscore.c.o \\Option-f "{o}"underscore.c\ + +# Whack out unused host define bits. +/HDEFINES/s/@HDEFINES@// + +/BUILD_NLMCONV/s/@BUILD_NLMCONV@// +/BUILD_SRCONV/s/@BUILD_SRCONV@// +/BUILD_DLLTOOL/s/@BUILD_DLLTOOL@// + +/UNDERSCORE/s/@UNDERSCORE@/{UNDERSCORE}/ + +# 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 = / + +# '+' is a special char to MPW, don't use it ever. +/c++filt/s/c++filt/cplusfilt/ + +/^{[A-Z]*_PROG}/s/$/ "{s}"mac-binutils.r/ +/{[A-Z]*_PROG}\.r/s/{[A-Z]*_PROG}\.r/mac-binutils.r/ + +# 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/ +/arparse.c/s/"{s}"arparse\.c/"{o}"arparse.c/g +/arparse.c/s/^arparse\.c/"{o}"arparse.c/ +/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/'.*'/' '/ + +# Remove un-useful targets. +/^Makefile \\Option-f/,/^$/d +/^"{o}"config.h \\Option-f/,/^$/d +/^config.status \\Option-f/,/^$/d |