summaryrefslogtreecommitdiff
path: root/src/lib/regexp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/regexp')
-rw-r--r--src/lib/regexp/Makefile16
-rw-r--r--src/lib/regexp/test.go (renamed from src/lib/regexp/main.go)2
2 files changed, 12 insertions, 6 deletions
diff --git a/src/lib/regexp/Makefile b/src/lib/regexp/Makefile
index ac466a0f1..86c1680f3 100644
--- a/src/lib/regexp/Makefile
+++ b/src/lib/regexp/Makefile
@@ -5,16 +5,22 @@
A=6
G=$(A)g
L=$(A)l
+PKG=$(GOROOT)/pkg/regexp.$A
-all: main
+test: main.$A test.$A
+ $L -o test test.$A
+ ./test
-main: main.6
- $L -o main main.6
+install: regexp.$A
+ cp regexp.$A $(PKG)
-main.6: regexp.6
+main: main.$A
+ $L -o main main.$A
+
+main.$A: regexp.$A
clean:
- rm -f *.6 main
+ rm -f *.6 test
%.6: %.go
$G $<
diff --git a/src/lib/regexp/main.go b/src/lib/regexp/test.go
index c89f9b557..223064c07 100644
--- a/src/lib/regexp/main.go
+++ b/src/lib/regexp/test.go
@@ -34,7 +34,7 @@ type StringError struct {
err *os.Error;
}
var bad_re = []StringError{
- StringError{ `*`, regexp.ErrBareClosure },
+ StringError{ `*`, regexp.ErrBareClosure },
StringError{ `(abc`, regexp.ErrUnmatchedLpar },
StringError{ `abc)`, regexp.ErrUnmatchedRpar },
StringError{ `x[a-z`, regexp.ErrUnmatchedLbkt },