1
0
mirror of https://github.com/golang/go synced 2024-11-22 01:24:42 -07:00

convert from mk to make

phew.

SVN=122266
This commit is contained in:
Rob Pike 2008-06-11 17:50:07 -07:00
parent 32aa0d9198
commit 461d1b7987
9 changed files with 267 additions and 10 deletions

42
src/cmd/6a/Makefile Normal file
View File

@ -0,0 +1,42 @@
# Copyright 2009 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
YFLAGS=-d
CFLAGS=-I/home/r/plan9/include -I$(GOROOT)/include
BIN=$(HOME)/bin
O=o
TARG=\
6a\
HFILES=\
a.h\
y.tab.h\
../6l/6.out.h\
compat.h\
OFILES=\
y.tab.$O\
lex.$O\
compat.$O\
../6l/enam.$O\
YFILES=\
a.y\
$(TARG): $(OFILES)
cc -o $(TARG) -L/home/r/plan9/lib $(OFILES) -lbio -l9
$(OFILES): $(HFILES)
lex.$O: ../cc/macbody ../cc/lexbody
y.tab.c: $(YFILES)
yacc $(YFLAGS) $(YFILES)
clean:
rm -f $(OFILES) $(TARG) *.6 enam.c 6.out a.out y.tab.h y.tab.c
install: $(TARG)
cp $(TARG) $(BIN)/$(TARG)

43
src/cmd/6c/Makefile Normal file
View File

@ -0,0 +1,43 @@
# Copyright 2009 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
CFLAGS=-I/home/r/plan9/include -I$(GOROOT)/include
BIN=$(HOME)/bin
O=o
TARG=\
6c\
HFILES=\
gc.h\
../6l/6.out.h\
../cc/cc.h\
OFILES=\
cgen.$O\
list.$O\
sgen.$O\
swt.$O\
txt.$O\
pgen.$O\
pswt.$O\
div.$O\
mul.$O\
reg.$O\
peep.$O\
../6l/enam.$O\
LIB=\
../cc/cc.a$O
$(TARG): $(OFILES)
cc -o $(TARG) -L/home/r/plan9/lib $(OFILES) $(LIB) -lbio -l9
$(OFILES): $(HFILES)
clean:
rm -f $(OFILES) $(TARG) *.6 enam.c 6.out a.out
install: $(TARG)
cp $(TARG) $(BIN)/$(TARG)

View File

@ -333,7 +333,7 @@ cgen(Node *n, Node *nn)
c = r->vconst;
if(c < 0)
c = -c;
v = log2(c);
v = xlog2(c);
if(v < 0)
break;
/* fall thru */
@ -640,7 +640,7 @@ cgen(Node *n, Node *nn)
c = r->vconst;
if(c < 0)
c = -c;
v = log2(c);
v = xlog2(c);
if(v < 0)
break;
/* fall thru */

38
src/cmd/6g/Makefile Normal file
View File

@ -0,0 +1,38 @@
# Copyright 2009 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
CFLAGS=-I/home/r/plan9/include -I$(GOROOT)/include
BIN=$(HOME)/bin
O=o
TARG=\
6g
HFILES=\
../gc/go.h\
../6l/6.out.h\
gg.h\
OFILES=\
list.$O\
align.$O\
gen.$O\
cgen.$O\
gsubr.$O\
obj.$O\
../6l/enam.$O\
LIB=\
../gc/gc.a$O
$(TARG): $(OFILES)
cc -o $(TARG) -L/home/r/plan9/lib $(OFILES) $(LIB) -lbio -l9
$(OFILES): $(HFILES)
clean:
rm -f $(OFILES) $(TARG) *.6 enam.c 6.out a.out
install: $(TARG)
cp $(TARG) $(BIN)/$(TARG)

39
src/cmd/6l/Makefile Normal file
View File

@ -0,0 +1,39 @@
# Copyright 2009 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
CFLAGS=-I/home/r/plan9/include -I$(GOROOT)/include
BIN=$(HOME)/bin
O=o
TARG=\
6l\
OFILES=\
asm.$O\
obj.$O\
optab.$O\
pass.$O\
span.$O\
list.$O\
compat.$O\
enam.$O\
HFILES=\
l.h\
../6l/6.out.h\
$(TARG): $(OFILES)
cc -o $(TARG) -L/home/r/plan9/lib $(OFILES) -lbio -l9
$(OFILES): $(HFILES)
enam.c: 6.out.h
sh mkenam
clean:
rm -f $(OFILES) $(TARG) *.6 enam.c 6.out a.out
install: $(TARG)
cp $(TARG) $(BIN)/$(TARG)

50
src/cmd/cc/Makefile Normal file
View File

@ -0,0 +1,50 @@
# Copyright 2009 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
YFLAGS=-d
CFLAGS=-I/home/r/plan9/include -I$(GOROOT)/include
BIN=$(HOME)/bin
O=o
LIB=\
cc.a$O\
HFILES=\
cc.h\
y.tab.h\
compat.h\
YFILES=\
cc.y\
OFILES=\
y.tab.$O\
lex.$O\
mac.$O\
dcl.$O\
acid.$O\
pickle.$O\
bits.$O\
com.$O\
scon.$O\
funct.$O\
sub.$O\
com64.$O\
compat.$O\
dpchk.$O\
omachcap.$O\
compat.$O\
$(LIB): $(OFILES)
9ar rsc $(LIB) $(OFILES)
$(OFILES): $(HFILES)
y.tab.c: $(YFILES)
yacc $(YFLAGS) $(YFILES)
clean:
rm -f $(OFILES) $(TARG) *.6 enam.c 6.out a.out y.tab.h y.tab.c $(LIB)
install: $(LIB)

View File

@ -6,6 +6,6 @@
for i in 6l 6a 6c 6g gc cc
do
cd $i
mk clean
make clean
cd ..
done

45
src/cmd/gc/Makefile Normal file
View File

@ -0,0 +1,45 @@
# Copyright 2009 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
YFLAGS=-d
CFLAGS=-I/home/r/plan9/include -I$(GOROOT)/include
BIN=$(HOME)/bin
O=o
LIB=\
gc.a$O\
HFILES=\
go.h\
y.tab.h\
YFILES=\
go.y\
OFILES=\
y.tab.$O\
lex.$O\
subr.$O\
dcl.$O\
export.$O\
walk.$O\
const.$O\
mpatof.$O\
sysimport.$O\
$(LIB): $(OFILES)
9ar rsc $(LIB) $(OFILES)
$(OFILES): $(HFILES)
y.tab.c: $(YFILES)
yacc $(YFLAGS) $(YFILES)
sysimport.c: sys.go mksys.bash
bash mksys.bash
clean:
rm -f $(OFILES) $(TARG) *.6 enam.c 6.out a.out y.tab.h y.tab.c $(LIB)
install: $(LIB)

View File

@ -8,35 +8,35 @@ bash clean.bash
cd 6l
bash mkenam
mk enam.o
make enam.o
cd ..
echo; echo; echo %%%% making cc %%%%; echo
cd cc
mk install
make install
cd ..
echo; echo; echo %%%% making 6l %%%%; echo
cd 6l
mk install
make install
cd ..
echo; echo; echo %%%% making 6a %%%%; echo
cd 6a
mk install
make install
cd ..
echo; echo; echo %%%% making 6c %%%%; echo
cd 6c
mk install
make install
cd ..
echo; echo; echo %%%% making gc %%%%; echo
cd gc
mk install
make install
cd ..
echo; echo; echo %%%% making 6g %%%%; echo
cd 6g
mk install
make install
cd ..