From: Russ Cox Date: Thu, 26 Aug 2010 22:47:34 +0000 (-0400) Subject: build: fix cgo with -j2 X-Git-Tag: weekly.2010-09-06~68 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=d3a2dcf5a88354ffcfe1f445caf0b579840b043a;p=gostls13.git build: fix cgo with -j2 a b: c expands to multiple rules, which then run in parallel. R=r, iant CC=golang-dev https://golang.org/cl/2007047 --- diff --git a/src/Make.pkg b/src/Make.pkg index 239820b152..1f5f2823b9 100644 --- a/src/Make.pkg +++ b/src/Make.pkg @@ -102,14 +102,11 @@ dir: # x.cgo2.c - C implementations compiled with gcc to create a dynamic library # -_cgo_defun.c _cgo_gotypes.go _cgo_export.c _cgo_export.h: $(CGOFILES) +_cgo_defun.c: $(CGOFILES) CGOPKGPATH=$(dir) cgo -- $(CGO_CFLAGS) $(CGOFILES) # Ugly but necessary -%.cgo1.go: _cgo_defun.c _cgo_gotypes.go - @true - -%.cgo2.c: _cgo_defun.c _cgo_gotypes.go +_cgo_gotypes.go _cgo_export.c _cgo_export.h %.cgo1.go %.cgo2.c: _cgo_defun.c @true %.cgo2.o: %.cgo2.c