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