--- /dev/null
+@echo off\r
+echo Configuring GCC for go32\r
+rem This batch file assumes a unix-type "sed" program\r
+\r
+if not exist config\msdos\configure.bat chdir ..\..\r
+\r
+update config\i386\xm-dos.h config.h\r
+update config\i386\xm-dos.h hconfig.h\r
+update config\i386\xm-dos.h tconfig.h\r
+update config\i386\go32.h tm.h\r
+update config\i386\i386.md md\r
+update config\i386\i386.c aux-output.c\r
+\r
+echo # Makefile generated by "configure.bat"> Makefile\r
+echo all.dos: cccp cc1 cc1obj xgcc s-objlist >> Makefile\r
+sed -f config/msdos/top.sed Makefile.in >> Makefile\r
+\r
+set LANG=\r
+\r
+if not exist cp\make-lang.in goto no_cp\r
+sed -f config/msdos/top.sed cp\make-lang.in >> Makefile\r
+sed -f config/msdos/top.sed cp\makefile.in > cp\Makefile\r
+set LANG=%LANG% c++.& \r
+:no_cp\r
+\r
+echo lang.mostlyclean: %LANG% | sed "s/&/mostlyclean/g" >> Makefile\r
+echo lang.clean: %LANG% | sed "s/&/clean/g" >> Makefile\r
+echo lang.distclean: %LANG% | sed "s/&/distclean/g" >> Makefile\r
+echo lang.realclean: %LANG% | sed "s/&/realclean/g" >> Makefile\r
+\r
+echo #define MULTILIB_SELECT ". ;" > multilib.h1\r
+update multilib.h1 multilib.h\r
+del multilib.h1\r
--- /dev/null
+/\.o[ ]*:/ s/config.status//
+/^multilib.h/ s/multilib/not-multilib/
+/^target=/ c\
+target=go32
+/^xmake_file=/ d
+/^tmake_file=/ d
+/^version=/ c\
+version=2.6.0
+s/CC = cc/CC = gcc/
+s/:\$/: \$/g
+s/^ \ *\.\// go32 /
+s/<\ *\$(srcdir)\//< $(srcdir)\\/g
+s/^ \$(srcdir)\/move-if-change/ update/
+s/^USE_/# USE_/
+s/`echo \$(srcdir)\///g
+s/ | sed 's,\^\\\.\/,,'`//g
+s/^ cd \$(srcdir)[ ]*;/ /
+/^# USE_HOST_OBSTACK/ i\
+USE_HOST_OBSTACK=obstack.o
+/^stamp-attrtab/,/update/ {
+ /\\/d
+ /fi/d
+ /update/ i\
+ go32 genattrtab md > t-attrtab.c
+}
+/^enquire[ ]*:/ s/\$(GCC_PARTS)//g
+/^enquire.o[ ]*:/ s/\$(GCC_PASSES)//g
+/^GCC_FOR_TARGET =/ c\
+GCC_FOR_TARGET = gcc
+s/; *@true//
+s/stamp-/s-/g
+s/tmp-/t-/g
+/> *s-objlist/ c\
+ echo.exe -o s-objlist $(addprefix ../,$(OBJS) $(BC_OBJS))
+/^OBJS.*s-objlist/ s?`cat ../s-objlist`?@../s-objlist?
+s/^\(SUBDIR_OBSTACK *=\).*$/\1 ..\/obstack.o/
+s/^\(SUBDIR_USE_ALLOCA *=\).*$/\1/
+s/^\(SUBDIR_MALLOC *=\).*$/\1/
-@echo off
-echo Configuring GCC for go32
-rem This batch file assumes a unix-type "sed" program
-
-update config\i386\xm-dos.h config.h
-update config\i386\xm-dos.h hconfig.h
-update config\i386\xm-dos.h tconfig.h
-update config\i386\go32.h tm.h
-update config\i386\i386.md md
-update config\i386\i386.c aux-output.c
-
-echo # Makefile generated by "configure.bat"> Makefile
-echo all.dos: cccp cc1 cc1plus cc1obj xgcc>> Makefile
-
-if exist config.sed del config.sed
-
-echo "/\.o[ ]*:/ s/config.status// ">> config.sed
-echo "/^target=/ c\ ">> config.sed
-echo "target=go32 ">> config.sed
-echo "/^version=/ c\ ">> config.sed
-sed -e "s/.*\"\([^ \"]*\)[ \"].*/version=\1/" version.c >> config.sed
-echo "s/CC = cc/CC = gcc/ ">> config.sed
-echo "s/:\$/: \$/g ">> config.sed
-echo "s/^ \ *\.\// go32 / ">> config.sed
-echo "s/<\ *\$(srcdir)\//< $(srcdir)\\/g ">> config.sed
-echo "s/^ \$(srcdir)\/move-if-change/ update/ ">> config.sed
-echo "s/^USE_/# USE_/ ">> config.sed
-echo "s/`echo \$(srcdir)\///g ">> config.sed
-echo "s/ | sed 's,\^\\\.\/,,'`//g ">> config.sed
-echo "s/^ cd \$(srcdir)[ ]*;/ / ">> config.sed
-
-echo "/^# USE_HOST_OBSTACK/ i\ ">> config.sed
-echo "USE_HOST_OBSTACK=obstack.o ">> config.sed
-
-echo "/^stamp-attrtab/,/update/ { ">> config.sed
-echo " /\\/d ">> config.sed
-echo " /fi/d ">> config.sed
-echo " /update/ i\ ">> config.sed
-echo " go32 genattrtab md > t-attrtab.c ">> config.sed
-echo "} ">> config.sed
-
-echo "/^enquire[ ]*:/ s/\$(GCC_PARTS)//g ">> config.sed
-echo "/^enquire.o[ ]*:/ s/\$(GCC_PASSES)//g ">> config.sed
-echo "/^GCC_FOR_TARGET =/ c\ ">> config.sed
-echo "GCC_FOR_TARGET = gcc ">> config.sed
-
-echo "s/; *@true// ">> config.sed
-echo "s/stamp-/s-/g ">> config.sed
-echo "s/tmp-/t-/g ">> config.sed
-
-sed -e "s/^\"//" -e "s/\"$//" -e "s/[ ]*$//" config.sed > config2.sed
-sed -f config2.sed Makefile.in >> Makefile
-del config.sed
-del config2.sed
+@echo off\r
+config\msdos\configure %1 %2 %3 %4\r
#ifndef OS2
#ifdef __MSDOS__
-/* Declare these to avoid compilation error. They won't be called. */
-int execv(const char *a, const char **b){}
-int execvp(const char *a, const char **b){}
-
+#include <process.h>
static int
pexecute (search_flag, program, argv, not_last)
int search_flag;
char *argv[];
int not_last;
{
+#ifdef __GO32__
+ int i = (search_flag ? spawnv : spawnvp) (1, program, argv);
+#else
char *scmd, *rf;
FILE *argfile;
int i, el = search_flag ? 0 : 4;
i = system (scmd);
remove (rf);
+#endif
if (i == -1)
{
perror_exec (program);
return MIN_FATAL_STATUS << 8;
}
-
return i << 8;
}