Commit 5a863a4e authored by Russ Cox's avatar Russ Cox

convert lib to a Makefile,

mainly for "make bufio.install".

R=r
DELTA=144  (80 added, 62 deleted, 2 changed)
OCL=19760
CL=19799
parent 130e6f42
......@@ -7,7 +7,7 @@ for i in lib9 libbio libmach_amd64 libregexp cmd runtime lib
do
cd $i
case $i in
cmd | lib)
cmd)
bash clean.bash
;;
*)
......
# 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.
all: install
GC=6g
DIRS=\
container/array\
fmt\
http\
math\
net\
os\
reflect\
regexp\
strconv\
time\
FILES=\
bignum\
bufio\
vector\
flag\
io\
once\
rand\
sort\
strings\
testing\
clean.dirs: $(addsuffix .dirclean, $(DIRS))
install.dirs: $(addsuffix .dirinstall, $(DIRS))
install.files: $(addsuffix .install, $(FILES))
nuke.dirs: $(addsuffix .dirnuke, $(DIRS))
%.6: container/%.go
$(GC) container/$*.go
%.6: %.go
$(GC) $*.go
%.clean:
rm -f $*.6
%.install: %.6
cp $*.6 $(GOROOT)/pkg/$*.6
%.dirclean:
+cd $* && make clean
%.dirinstall:
+cd $* && make install
%.dirnuke:
+cd $* && make nuke
clean.files:
rm -f 6.out *.6
clean: clean.dirs clean.files
install: install.dirs install.files
nuke: nuke.dirs clean.files
rm -f $(GOROOT)/pkg/*
# dependencies - should auto-generate
bignum.6: fmt.dirinstall
bufio.6: io.install os.dirinstall
flag.6: fmt.dirinstall
io.6: os.dirinstall syscall.dirinstall
testing.6: flag.install fmt.dirinstall
fmt.dirinstall: io.install reflect.dirinstall strconv.dirinstall
http.dirinstall: bufio.install io.install net.dirinstall os.dirinstall strings.install
net.dirinstall: once.install os.dirinstall strconv.dirinstall
os.dirinstall: syscall.dirinstall
regexp.dirinstall: os.dirinstall
reflect.dirinstall: strconv.dirinstall
strconv.dirinstall: os.dirinstall
time.dirinstall: once.install os.dirinstall
# 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.
#!/bin/bash
rm -f $GOROOT/pkg/*
for i in syscall math os strconv container/array reflect fmt tabwriter net time http regexp
do
(cd $i; make nuke)
done
# 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.
#!/bin/bash
function buildfiles() {
rm -f *.6
for i
do
base=$(basename $i .go)
echo 6g -o $GOROOT/pkg/$base.6 $i
6g -o $GOROOT/pkg/$base.6 $i
done
}
function builddirs() {
for i
do
echo; echo; echo %%%% making lib/$i %%%%; echo
(cd $i; make install)
done
}
set -e
rm -f *.6
# Don't sort the elements of the lists - some of the orderings matter.
buildfiles strings.go
builddirs syscall\
math\
os\
strconv\
container/array\
reflect\
buildfiles io.go
builddirs fmt\
tabwriter\
buildfiles flag.go\
container/vector.go\
rand.go\
sort.go\
bufio.go\
once.go\
bignum.go\
testing.go\
builddirs net\
time\
http\
regexp\
......@@ -23,7 +23,7 @@ do
echo; echo; echo %%%% making $i %%%%; echo
cd $i
case $i in
cmd | lib)
cmd)
bash make.bash
;;
*)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment