github.com/hbdrawn/golang@v0.0.0-20141214014649-6b835209aba2/src/cmd/gc/Makefile (about) 1 # Copyright 2012 The Go Authors. All rights reserved. 2 # Use of this source code is governed by a BSD-style 3 # license that can be found in the LICENSE file. 4 5 include ../../Make.dist 6 7 install: y.tab.h builtin.c 8 9 y.tab.h: go.y go.errors bisonerrors 10 bison -v -y -d go.y 11 # make yystate global, yytname mutable 12 cat y.tab.c | sed '/ int yystate;/d; s/int yychar;/int yychar, yystate;/; s/static const char \*const yytname/const char *yytname/; s/char const \*yymsgp/char *yymsgp/' >y1.tab.c 13 mv y1.tab.c y.tab.c 14 awk -f bisonerrors y.output go.errors >yerr.h 15 16 builtin.c: runtime.go unsafe.go 17 ./mkbuiltin