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
6 update ..
\bfd\hosts\go32.h sysdep.h
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
14 update ..
/bfd
/hosts
/go32.h sysdep.h
16 if exist config.sed
del config.sed
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
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
30 echo "/^SHELL *=/ d ">> config.sed
31 echo "s/$(SHELL)/sh.exe/g ">> config.sed
33 echo "s/'"/\\"/g ">> config.sed
34 echo "s/"'/\\"/g ">> config.sed
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
45 echo "s/^SHELL.*$/SHELL=sh.exe/ ">> config.sed
46 echo "s/genscripts.sh/genscripts.dos/g ">> config.sed
48 echo "s/^ldemul-list.h/not-ldemul-list.h/ ">> config.sed
50 sed -e "s/^\"//" -e "s/\"$//" -e "s/[ ]*$//" config.sed > config2.sed
51 sed -f config2.sed Makefile.in >> Makefile
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
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
67 update ldemul-list.h2 ldemul-list.h
69 if exist ldscripts\dostest goto ldscripts
71 dir > ldscripts\dostest