home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / binutils-2.7-src.tgz / tar.out / fsf / binutils / ld / mpw-make.sed < prev    next >
Text File  |  1996-09-28  |  3KB  |  102 lines

  1. # Sed commands to finish translating the ld Makefile.in into MPW syntax.
  2.  
  3. /HDEFINES/s/@HDEFINES@//
  4.  
  5. /^target_alias = @target_alias@/s/^/#/
  6.  
  7. /^EMUL = @EMUL@/s/^/#/
  8.  
  9. /^EMULATION_OFILES = @EMULATION_OFILES@/s/^/#/
  10.  
  11. # Fixadd to the include paths.
  12. /^INCLUDES = .*$/s/$/ -i "{INCDIR}":mpw: -i ::extra-include:/
  13. /BFDDIR/s/-i {BFDDIR} /-i "{BFDDIR}": /
  14. /INCDIR/s/-i {INCDIR} /-i "{INCDIR}": /
  15.  
  16. # Use byacc instead of bison (for now anyway).
  17. /BISON/s/^BISON =.*$/BISON = byacc/
  18. #/BISONFLAGS/s/^BISONFLAGS =.*$/BISONFLAGS = /
  19.  
  20. # Suppress the suppression of smart makes.
  21. /^\.y\.c/d
  22.  
  23. # Hack up ldmain compile.
  24. /^"{o}"ldmain.c.o \\Option-f .* config.status$/,/^$/c\
  25. "{o}"ldmain.c.o \\Option-f  "{s}"ldmain.c\
  26.     {CC} -d DEFAULT_EMULATION='"'{EMUL}'"' -d SCRIPTDIR='"'{scriptdir}'"' {ALL_CFLAGS} "{s}"ldmain.c -o "{o}"ldmain.c.o\
  27.  
  28.  
  29. # Remove ldemul-list.h build, rely on configure to make one.
  30. /^ldemul-list.h /,/Rename -y "{s}"ldemul-tmp.h /d
  31.  
  32. # Fix pathnames to generated files.
  33. /config.h/s/"{s}"config\.h/"{o}"config.h/g
  34. /config.h/s/^config\.h/"{o}"config.h/
  35.  
  36. /y.tab.c/s/"{s}"y\.tab\.c/"{o}"y.tab.c/g
  37. /y.tab.c/s/^y\.tab\.c/"{o}"y.tab.c/
  38. /y.tab.h/s/"{s}"y\.tab\.h/"{o}"y.tab.h/g
  39. /y.tab.h/s/^y\.tab\.h/"{o}"y.tab.h/
  40.  
  41. /ldgram.c/s/"{s}"ldgram\.c/"{o}"ldgram.c/g
  42. /ldgram.c/s/^ldgram\.c/"{o}"ldgram.c/
  43.  
  44. /ldgram.h/s/"{s}"ldgram\.h/"{o}"ldgram.h/g
  45. /ldgram.h/s/^ldgram\.h/"{o}"ldgram.h/
  46.  
  47. /ldlex.c/s/"{s}"ldlex\.c/"{o}"ldlex.c/g
  48. /ldlex.c/s/^ldlex\.c/"{o}"ldlex.c/
  49.  
  50. /ldlex.c.new/s/"{s}"ldlex\.c\.new/"{o}"ldlex.c.new/g
  51.  
  52. /lex.yy.c/s/"{s}"lex\.yy\.c/"{o}"lex.yy.c/g
  53.  
  54. /ldemul-list.h/s/"{s}"ldemul-list\.h/"{o}"ldemul-list.h/g
  55. /ldemul-list.h/s/^ldemul-list\.h/"{o}"ldemul-list.h/
  56.  
  57. # Edit pathnames to emulation files.
  58. /"{s}"e.*\.c/s/"{s}"e\([-_a-z0-9]*\)\.c/"{o}"e\1.c/g
  59. /^e.*\.c/s/^e\([-_a-z0-9]*\)\.c/"{o}"e\1.c/
  60.  
  61. # We can't run genscripts, so don't try.
  62. /{GENSCRIPTS}/s/{GENSCRIPTS}/null-command/
  63.  
  64. # Comment out the TDIRS bits.
  65. /^TDIRS@/s/^/#/
  66.  
  67. # Point at the BFD library directly.
  68. /@BFDLIB@/s/@BFDLIB@/::bfd:libbfd.o/
  69.  
  70. # Don't need this.
  71. /@HLDFLAGS@/s/@HLDFLAGS@//
  72.  
  73. #/sed.*free/,/> "{o}"ldlex.c.new/c\
  74. #    \    Catenate "{o}"lex.yy.c >"{o}"ldlex.c.new
  75.  
  76. # The resource file is called mac-ld.r.
  77. /{LD_PROG}.r/s/{LD_PROG}\.r/mac-ld.r/
  78.  
  79. /^install \\Option-f /,/^$/c\
  80. install \\Option-f  all install-only\
  81. \
  82. install-only \\Option-f\
  83.     If "`Exists "{prefix}"`" == ""\
  84.         Echo "{prefix}" does not exist, cannot install anything\
  85.         Exit 1\
  86.     End If\
  87.     If "`Exists "{bindir}"`" == ""\
  88.         NewFolder "{bindir}"\
  89.     End If\
  90.     Duplicate -y :ld.new "{bindir}"ld\
  91.  
  92.  
  93. # Remove dependency rebuilding crud.
  94. /^.dep /,/# .PHONY /d
  95.  
  96. # Remove the lintlog action, pipe symbols in column 1 lose.
  97. /^lintlog \\Option-f/,/^$/d
  98.  
  99. /^Makefile \\Option-f/,/^$/d
  100. /^"{o}"config.h \\Option-f/,/^$/d
  101. /^config.status \\Option-f/,/^$/d
  102.