From 62be54a8c029a85bf06742a19bcdb5e86151559d Mon Sep 17 00:00:00 2001 From: Rob Pike Date: Tue, 26 Aug 2014 14:43:03 -0700 Subject: [PATCH] unicode: use go generate instead of make to create tables.go LGTM=mpvl, rsc R=mpvl, rsc CC=golang-codereviews https://golang.org/cl/135820043 --- src/pkg/unicode/Makefile | 15 --------------- src/pkg/unicode/letter.go | 3 +++ 2 files changed, 3 insertions(+), 15 deletions(-) delete mode 100644 src/pkg/unicode/Makefile diff --git a/src/pkg/unicode/Makefile b/src/pkg/unicode/Makefile deleted file mode 100644 index aba12a07102..00000000000 --- a/src/pkg/unicode/Makefile +++ /dev/null @@ -1,15 +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. - -maketables: maketables.go - go build maketables.go - -tables: maketables - ./maketables --tables=all -output tables.go - -# Downloads from www.unicode.org, so not part -# of standard test scripts. -testtables: maketables - @echo '***' Be sure to make tables and go install first - ./maketables -test diff --git a/src/pkg/unicode/letter.go b/src/pkg/unicode/letter.go index 977bd2b3b05..7fe4241eddf 100644 --- a/src/pkg/unicode/letter.go +++ b/src/pkg/unicode/letter.go @@ -6,6 +6,9 @@ // Unicode code points. package unicode +// Tables are regenerated each time we update the Unicode version. +//go:generate go run maketables.go -tables=all -output tables.go + const ( MaxRune = '\U0010FFFF' // Maximum valid Unicode code point. ReplacementChar = '\uFFFD' // Represents invalid code points.