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 / configure.bat < prev    next >
DOS Batch File  |  1996-09-28  |  2KB  |  73 lines

  1. @echo off
  2. echo Configuring ld for go32
  3. echo This makefile will be built for GNUISH make
  4. rem This batch file assumes a unix-type "sed" program
  5.  
  6. update ..\bfd\hosts\go32.h sysdep.h
  7.  
  8. echo # Makefile generated by "configure.bat"> Makefile
  9. echo LONGARGS = gcc:ar >> Makefile
  10. echo CC=gcc >> Makefile
  11. echo host_alias=go32 >> Makefile
  12. echo target_alias=go32 >> Makefile
  13.  
  14. update ../bfd/hosts/go32.h sysdep.h
  15.  
  16. if exist config.sed del config.sed
  17.  
  18. echo "s/^    \$(srcdir)\/move-if-change/    update/    ">> config.sed
  19. echo "s/:\([^     ]\)/: \1/g                ">> config.sed
  20. echo "s/^    \ *\.\//    go32 /            ">> config.sed
  21. echo "s/`echo \$(srcdir)\///g                ">> config.sed
  22. echo "s/ | sed 's,\^\\\.\/,,'`//g            ">> config.sed
  23. echo "s/^    cd \$(srcdir)[     ]*;//            ">> config.sed
  24.  
  25. echo "/^####$/ i\                    ">> config.sed
  26. echo "CC = gcc\                        ">> config.sed
  27. echo "EMUL=go32\                    ">> config.sed
  28. echo "EMULATION_OFILES=ego32.o ei386aout.o        ">> config.sed
  29.  
  30. echo "/^SHELL *=/ d                    ">> config.sed
  31. echo "s/$(SHELL)/sh.exe/g                ">> config.sed
  32.  
  33. echo "s/'"/\\"/g                    ">> config.sed
  34. echo "s/"'/\\"/g                    ">> config.sed
  35.  
  36. echo "/^ldmain.o: ldmain.c/,/fi/ {            ">> config.sed
  37. echo "  s/; *\\$//                    ">> config.sed
  38. echo "  s/-DSCRIPTDIR[^     ]*/-DSCRIPTDIR=\\".\\"/    ">> config.sed
  39. echo "  s/config.status//                ">> config.sed
  40. echo "  /ldmain.o:/ p                    ">> config.sed
  41. echo "  /(CC)/ p                    ">> config.sed
  42. echo "  d                        ">> config.sed
  43. echo "}                            ">> config.sed
  44.  
  45. echo "s/^SHELL.*$/SHELL=sh.exe/                ">> config.sed
  46. echo "s/genscripts.sh/genscripts.dos/g            ">> config.sed
  47.  
  48. echo "s/^ldemul-list.h/not-ldemul-list.h/        ">> config.sed
  49.  
  50. sed -e "s/^\"//" -e "s/\"$//" -e "s/[     ]*$//" config.sed > config2.sed
  51. sed -f config2.sed Makefile.in >> Makefile
  52. del config.sed
  53. del config2.sed
  54.  
  55. echo set -a > genscripts.dj
  56. sed -e "/^[a-zA-Z0-9_]*=/ s/^/export /" -e "s/(. \(.*\))/sh \1/" -e "/\.em/ d" genscripts.sh >> genscripts.dj
  57. type emultempl\generic.em >> genscripts.dj
  58. update genscripts.dj genscripts.dos
  59.  
  60. echo extern ld_emulation_xfer_type ld_go32_emulation; > ldemul-list.h2
  61. echo extern ld_emulation_xfer_type ld_i386aout_emulation; >> ldemul-list.h2
  62. echo #define EMULATION_LIST \>>ldemul-list.h2
  63. echo   &ld_go32_emulation,\>>ldemul-list.h2
  64. echo   &ld_i386aout_emulation,\>>ldemul-list.h2
  65. echo 0>>ldemul-list.h2
  66.  
  67. update ldemul-list.h2 ldemul-list.h
  68.  
  69. if exist ldscripts\dostest goto ldscripts
  70. mkdir ldscripts
  71. dir > ldscripts\dostest
  72. :ldscripts
  73.