summaryrefslogtreecommitdiff
path: root/src/Make.pkg
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2011-02-18 09:50:58 +0100
committerOndřej Surý <ondrej@sury.org>2011-02-18 09:50:58 +0100
commitc072558b90f1bbedc2022b0f30c8b1ac4712538e (patch)
tree67767591619e4bd8111fb05fac185cde94fb7378 /src/Make.pkg
parent5859517b767c99749a45651c15d4bae5520ebae8 (diff)
downloadgolang-upstream/2011.02.15.tar.gz
Imported Upstream version 2011.02.15upstream/2011.02.15
Diffstat (limited to 'src/Make.pkg')
-rw-r--r--src/Make.pkg8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Make.pkg b/src/Make.pkg
index 0ffab7294..ca0fa9ee2 100644
--- a/src/Make.pkg
+++ b/src/Make.pkg
@@ -113,20 +113,20 @@ 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,
# so it cannot be done in the same recipe that runs cgo.
-_cgo_flags: _cgo_run
+_load_cgo_flags: _cgo_run
$(eval include _cgo_flags)
# Include any previous flags in case cgo files are up to date.
-include _cgo_flags
# Ugly but necessary - cgo writes these files too.
-_cgo_gotypes.go _cgo_export.c _cgo_export.h _cgo_main.c _cgo_defun.c: _cgo_flags
+_cgo_gotypes.go _cgo_export.c _cgo_export.h _cgo_main.c _cgo_defun.c: _load_cgo_flags
@true
%.cgo1.go %.cgo2.c: _cgo_defun.c
@@ -167,7 +167,7 @@ _CGO_LDFLAGS_darwin=-dynamiclib -Wl,-undefined,dynamic_lookup
_CGO_LDFLAGS_windows=-shared -lm -mthreads
# Have to compile the runtime header.
-RUNTIME_CFLAGS=-I"$(pkgdir)"
+RUNTIME_CFLAGS=-I$(pkgdir)
# Compile _cgo_defun.c with 6c; needs access to the runtime headers.
_cgo_defun.$O: _cgo_defun.c