aboutsummaryrefslogtreecommitdiff
path: root/gas/configure.bat
blob: 784bae75c4f8824477bf1c23d55b21e368efa24e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
@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