Commit 84523402 authored by Rob Pike's avatar Rob Pike

Make regexp build and install officially

R=rsc
DELTA=335  (172 added, 156 deleted, 7 changed)
OCL=17167
CL=17180
parent 151c0de8
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
rm -f $GOROOT/pkg/* rm -f $GOROOT/pkg/*
for i in syscall os math net time for i in syscall os math net time http regexp
do do
cd $i cd $i
make nuke make nuke
......
...@@ -56,6 +56,10 @@ func (v *Vector) Remove(i int) Element { ...@@ -56,6 +56,10 @@ func (v *Vector) Remove(i int) Element {
} }
func (v *Vector) Reset() {
v.elem = v.elem[0:0];
}
func (v *Vector) Insert(i int, e Element) { func (v *Vector) Insert(i int, e Element) {
n := v.Len(); n := v.Len();
// range check unnecessary - done by runtime // range check unnecessary - done by runtime
......
...@@ -33,7 +33,7 @@ do ...@@ -33,7 +33,7 @@ do
6g -o $GOROOT/pkg/$base.6 $i 6g -o $GOROOT/pkg/$base.6 $i
done done
for i in net time http for i in net time http regexp
do do
echo; echo; echo %%%% making lib/$i %%%%; echo echo; echo; echo %%%% making lib/$i %%%%; echo
cd $i cd $i
......
...@@ -5,16 +5,22 @@ ...@@ -5,16 +5,22 @@
A=6 A=6
G=$(A)g G=$(A)g
L=$(A)l L=$(A)l
PKG=$(GOROOT)/pkg/regexp.$A
all: main test: main.$A test.$A
$L -o test test.$A
./test
main: main.6 install: regexp.$A
$L -o main main.6 cp regexp.$A $(PKG)
main.6: regexp.6 main: main.$A
$L -o main main.$A
main.$A: regexp.$A
clean: clean:
rm -f *.6 main rm -f *.6 test
%.6: %.go %.6: %.go
$G $< $G $<
...@@ -10,6 +10,12 @@ xcd() { ...@@ -10,6 +10,12 @@ xcd() {
echo --- cd $1 echo --- cd $1
} }
(xcd lib/regexp
make clean
time make
make test
)
(xcd ../usr/gri/gosrc (xcd ../usr/gri/gosrc
make clean make clean
time make time make
......
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