]> Cypherpunks repositories - gostls13.git/commitdiff
cgo: fix _cgo_run timestamp file order
authorGustavo Niemeyer <gustavo@niemeyer.net>
Thu, 3 Feb 2011 03:37:40 +0000 (22:37 -0500)
committerRuss Cox <rsc@golang.org>
Thu, 3 Feb 2011 03:37:40 +0000 (22:37 -0500)
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

src/Make.pkg

index 0ffab729454efe03c4593b85ecce6c6b4143089a..41124c828a69e8512a4269fb145fb251f74df3b2 100644 (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,