aboutsummaryrefslogtreecommitdiff
path: root/gas/configure.bat
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@cygnus>1994-05-27 16:58:05 +0000
committerKen Raeburn <raeburn@cygnus>1994-05-27 16:58:05 +0000
commitc06e55d99ac38bd32492481f46b69ec62ee1e433 (patch)
tree7567d7ea926780a1d5242d47399b3a267283bb3a /gas/configure.bat
parent60e8a534070c8dc181b2fb4971b8199597a168f1 (diff)
downloadgdb-c06e55d99ac38bd32492481f46b69ec62ee1e433.zip
gdb-c06e55d99ac38bd32492481f46b69ec62ee1e433.tar.gz
gdb-c06e55d99ac38bd32492481f46b69ec62ee1e433.tar.bz2
changes from gas-2.3/binutils-2.4 dist (details in branch log msgs, changelogs)
Diffstat (limited to 'gas/configure.bat')
-rw-r--r--gas/configure.bat93
1 files changed, 65 insertions, 28 deletions
diff --git a/gas/configure.bat b/gas/configure.bat
index 5bccdba..784bae7 100644
--- a/gas/configure.bat
+++ b/gas/configure.bat
@@ -1,28 +1,65 @@
-@echo off
-if "%1" == "go32" goto h8300
-if "%1" == "h8/300" goto h8300
-echo Specify one of [ go32 h8/300 ] on command line
-goto exit
-
-:go32
-echo Configuring gas for go32
-copy config\i386.md md
-copy config\out-i386.c aux-output.c
-copy config\tm-i386gas.h tm.h
-copy config\float.h-ieee float.h
-copy config\xm-i386.h config.h
-copy Makefile.dos Makefile
-goto exit
-
-:h8300
-echo Configuring gas for H8/300
-copy config\ho-go32.h host.h
-copy config\tc-h8300.c targ-cpu.c
-copy config\tc-h8300.h targ-cpu.h
-copy config\te-generic.h targ-env.h
-copy config\objcoffbfd.h obj-format.h
-copy config\objcoffbfd.c obj-format.c
-copy config\atof-ieee.c atof-targ.c
-copy Makefile.dos Makefile
-
-:exit
+@echo off
+if "%1" == "h8/300" goto h8300
+
+echo Configuring gas for go32
+update config/ho-go32.h host.h
+update config/tc-i386.c targ-cpu.c
+update config/tc-i386.h targ-cpu.h
+update config/te-go32.h targ-env.h
+update config/obj-coff.h obj-format.h
+update config/obj-coff.c obj-format.c
+update config/atof-ieee.c atof-targ.c
+goto common
+
+:h8300
+echo Configuring gas for H8/300
+copy config\ho-go32.h host.h
+copy config\tc-h8300.c targ-cpu.c
+copy config\tc-h8300.h targ-cpu.h
+copy config\te-generic.h targ-env.h
+copy config\objcoffbfd.h obj-format.h
+copy config\objcoffbfd.c obj-format.c
+copy config\atof-ieee.c atof-targ.c
+
+:common
+
+echo # Makefile generated by "configure.bat"> Makefile
+echo all.dos : as.new>>Makefile
+
+if exist config.sed del config.sed
+
+echo "s/^ \$(srcdir)\/move-if-change/ update/ ">> config.sed
+echo "/\.o[ ]*:/ s/config.status// ">> config.sed
+echo "/^target=/ c\ ">> config.sed
+echo "target=go32 ">> config.sed
+echo "s/CC = cc/CC = gcc/ ">> config.sed
+echo "s/:\$/: \$/g ">> config.sed
+echo "s/^ \ *\.\// go32 / ">> config.sed
+echo "s/`echo \$(srcdir)\///g ">> config.sed
+echo "s/ | sed 's,\^\\\.\/,,'`//g ">> config.sed
+echo "s/^ cd \$(srcdir)[ ]*;// ">> config.sed
+
+echo "/^####/ i\ ">> config.sed
+echo "TDEFINES=-DMANY_SEGMENTS -DI386COFF \ ">> config.sed
+echo "LOCAL_LOADLIBES=../bfd/libbfd.a ">> config.sed
+
+echo "/^all[ ]*:/ a\ ">> config.sed
+echo "dummy: ">> config.sed
+
+echo "s/\/usr[^ ]*errno.h//g ">> config.sed
+
+echo "/^config.h[ ]*:/ d ">> config.sed
+
+sed -e "s/^\"//" -e "s/\"$//" -e "s/[ ]*$//" config.sed > config2.sed
+sed -f config2.sed Makefile.in >> Makefile.2
+update Makefile.2 Makefile
+del Makefile.2
+del config.sed
+del config2.sed
+
+echo > config-stamp
+echo #define TARGET_CPU "i386">config.h1
+echo #define TARGET_ALIAS "i386">>config.h1
+echo #define TARGET_CANONICAL "i386">>config.h1
+sed -n "/^VERSION=/p" Makefile.in | sed -e "s/VERSION=/#define GAS_VERSION \"/" -e "s/$/\"/">> config.h1
+update config.h1 config.h