aboutsummaryrefslogtreecommitdiff
path: root/binutils/configure.bat
blob: f7d70f1150bc6e9c931a75fc5a43b06e635a32e4 (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
@echo off
if "%1" == "h8/300" goto h8300

echo Configuring binutils for go32
update ../bfd/hosts/go32.h sysdep.h
goto common

:h8300
echo Configuring binutils for H8/300
update ..\bfd\hosts\h-go32.h sysdep.h

:common

echo # Makefile generated by "configure.bat"> Makefile

if exist config.sed del config.sed

sed -n "/^VERSION=/ p" Makefile.in | sed -e "s/^/s^/" -e "s/=/^\"/" -e "s/$/\"^/" > config.sed
sed -f config.sed version.c > version2.c

if exist config.sed del config.sed

echo "s/version\./version2\./g				">> config.sed
echo "s/-DVERSION=[^ ]* //				">> config.sed

echo "s/^	\$(srcdir)\/move-if-change/	update/	">> config.sed
echo "/^###$/ i\					">> config.sed
echo "CC = gcc						">> config.sed
echo "s/:\([^ 	]\)/: \1/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 "/^arparse\.c/ i\					">> config.sed
echo "arparse.o: arparse.c\				">> config.sed
echo "	$(CC) -c $(CFLAGS) $(INCLUDES) $(HDEFINES) $(TDEFINES) arparse.c ">> config.sed
echo "/\$(BISON)/ c\					">> config.sed
echo "	bison $(BISONFLAGS) -o $@ arparse.y		">> config.sed
echo "/y\.tab\./ d					">> config.sed

echo "/^arlex.c/ {					">> config.sed
echo " i\						">> config.sed
echo "arlex.o: arlex.c					">> config.sed
echo " i\						">> config.sed
echo "	$(CC) -c $(CFLAGS) $(INCLUDES) $(HDEFINES) $(TDEFINES) arlex.c ">> config.sed
echo "}							">> config.sed
echo "/\$(LEX)/ c\					">> config.sed
echo "	flex $(LEX_OPTIONS) arlex.l			">> config.sed
echo "s/lex\.yy\./lexyy./g				">> config.sed

echo "s/'"/\\"/g					">> config.sed
echo "s/"'/\\"/g					">> config.sed

echo "s/c++filt/cxxfilt/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 int prepends_underscore = 1; > underscore.c