mirror of
https://github.com/golang/go
synced 2024-11-22 21:10:03 -07:00
convert lib to a Makefile,
mainly for "make bufio.install". R=r DELTA=144 (80 added, 62 deleted, 2 changed) OCL=19760 CL=19799
This commit is contained in:
parent
130e6f42f1
commit
5a863a4ece
@ -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
|
||||
;;
|
||||
*)
|
||||
|
84
src/lib/Makefile
Normal file
84
src/lib/Makefile
Normal file
@ -0,0 +1,84 @@
|
||||
# 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
|
@ -1,13 +0,0 @@
|
||||
# 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
|
||||
|
@ -1,56 +0,0 @@
|
||||
# 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
|
||||
;;
|
||||
*)
|
||||
|
Loading…
Reference in New Issue
Block a user