]>
Commit | Line | Data |
---|---|---|
1b6aa90b | 1 | @echo off |
9029f44d | 2 | echo Configuring GCC for go32 |
603cccba | 3 | rem This batch file assumes a unix-type "sed" program |
1b6aa90b | 4 | |
969f50b9 JVA |
5 | update config\i386\xm-dos.h config.h |
6 | update config\i386\xm-dos.h hconfig.h | |
d9daaee8 | 7 | update config\i386\go32.h tm.h |
969f50b9 JVA |
8 | update config\i386\i386.md md |
9 | update config\i386\i386.c aux-output.c | |
1b6aa90b | 10 | |
603cccba | 11 | echo # Makefile generated by "configure.bat"> Makefile |
eef80fde | 12 | echo all.dos: cccp cc1 cc1plus cc1obj xgcc>> Makefile |
603cccba RS |
13 | |
14 | if exist config.sed del config.sed | |
15 | ||
d9daaee8 | 16 | echo "/\.o[ ]*:/ s/config.status// ">> config.sed |
603cccba RS |
17 | echo "/^target=/ c\ ">> config.sed |
18 | echo "target=go32 ">> config.sed | |
19 | echo "/^version=/ c\ ">> config.sed | |
d9daaee8 | 20 | sed -e "s/[^\"]*\"/version=/" -e "s/\ .*//" version.c >> config.sed |
603cccba RS |
21 | echo "s/CC = cc/CC = gcc/ ">> config.sed |
22 | echo "s/:\$/: \$/g ">> config.sed | |
d9daaee8 | 23 | echo "s/^ \ *\.\// go32 / ">> config.sed |
603cccba RS |
24 | echo "s/^ \$(srcdir)\/move-if-change/ update/ ">> config.sed |
25 | echo "s/^USE_/# USE_/ ">> config.sed | |
26 | echo "s/`echo \$(srcdir)\///g ">> config.sed | |
27 | echo "s/ | sed 's,\^\\\.\/,,'`//g ">> config.sed | |
28 | echo "s/^ cd \$(srcdir)[ ]*;// ">> config.sed | |
29 | ||
d9daaee8 RS |
30 | echo "/^stamp-attrtab/,/update/ { ">> config.sed |
31 | echo " /\\/d ">> config.sed | |
32 | echo " /fi/d ">> config.sed | |
33 | echo " /update/ i\ ">> config.sed | |
34 | echo " go32 genattrtab md > t-attrtab.c ">> config.sed | |
35 | echo "} ">> config.sed | |
36 | ||
603cccba RS |
37 | echo "/^cccp.o[ ]*:/,/-c/ { ">> config.sed |
38 | echo " s/ \$(CC)/ >cccp_o.rf/ ">> config.sed | |
39 | echo " /-c/ a\ ">> config.sed | |
40 | echo " $(CC) @cccp_o.rf ">> config.sed | |
41 | echo "} ">> config.sed | |
42 | ||
43 | echo "/^gcc.o[ ]*:/,/-c/ { ">> config.sed | |
44 | echo " s/ \$(CC)/ >gcc_o.rf/ ">> config.sed | |
45 | echo " /-c/ a\ ">> config.sed | |
46 | echo " $(CC) @gcc_o.rf ">> config.sed | |
47 | echo "} ">> config.sed | |
48 | ||
49 | echo "/^gcc[ ]*:/,/-o/ { ">> config.sed | |
50 | echo " s/ \$(CC)/ >gcc.rf/ ">> config.sed | |
51 | echo " /-o/ a\ ">> config.sed | |
52 | echo " $(CC) @gcc.rf ">> config.sed | |
53 | echo "} ">> config.sed | |
54 | ||
55 | echo "/^cc1[ ]*:/,/-o/ { ">> config.sed | |
56 | echo " s/ \$(CC)/ >cc1.rf/ ">> config.sed | |
57 | echo " /-o/ a\ ">> config.sed | |
58 | echo " $(CC) @cc1.rf ">> config.sed | |
59 | echo "} ">> config.sed | |
60 | ||
61 | echo "/^cc1plus[ ]*:/,/-o/ { ">> config.sed | |
62 | echo " s/ \$(CC)/ >cc1plus.rf/ ">> config.sed | |
63 | echo " /-o/ a\ ">> config.sed | |
64 | echo " $(CC) @cc1plus.rf ">> config.sed | |
65 | echo "} ">> config.sed | |
66 | ||
67 | echo "/^cc1obj[ ]*:/,/-o/ { ">> config.sed | |
68 | echo " s/ \$(CC)/ >cc1obj.rf/ ">> config.sed | |
69 | echo " /-o/ a\ ">> config.sed | |
70 | echo " $(CC) @cc1obj.rf ">> config.sed | |
71 | echo "} ">> config.sed | |
72 | ||
73 | echo "/^enquire[ ]*:/ s/\$(GCC_PARTS)//g ">> config.sed | |
74 | echo "/^enquire.o[ ]*:/ s/\$(GCC_PASSES)//g ">> config.sed | |
75 | echo "/^GCC_FOR_TARGET =/ c\ ">> config.sed | |
76 | echo "GCC_FOR_TARGET = gcc ">> config.sed | |
77 | ||
d9daaee8 RS |
78 | echo "s/; *@true// ">> config.sed |
79 | echo "s/stamp-/s-/g ">> config.sed | |
80 | echo "s/tmp-/t-/g ">> config.sed | |
81 | ||
603cccba RS |
82 | sed -e "s/^\"//" -e "s/\"$//" -e "s/[ ]*$//" config.sed > config2.sed |
83 | sed -f config2.sed Makefile.in >> Makefile | |
84 | del config.sed | |
85 | del config2.sed |