1
0
mirror of https://github.com/golang/go synced 2024-11-21 18:14:42 -07:00

cgo: fix _cgo_run timestamp file order

The timestamp file is being created before cgo
runs, which means errors will not prevent it
from being created and thus will cause the
build to break by rendering the rule up-to-date
when it isn't.

R=rsc
CC=golang-dev
https://golang.org/cl/4001049
This commit is contained in:
Gustavo Niemeyer 2011-02-02 22:37:40 -05:00 committed by Russ Cox
parent cf63e34b1d
commit 34336bd9f3

View File

@ -113,8 +113,8 @@ dir:
ifdef CGOFILES
_cgo_run: $(CGOFILES)
@touch _cgo_run
CGOPKGPATH=$(dir) cgo -- $(CGO_CFLAGS) $(CGOFILES)
touch _cgo_run
# _CGO_CFLAGS and _CGO_LDFLAGS are defined via the evaluation of _cgo_flags.
# The include happens before the commands in the recipe run,