hack: TIMEOUT (for controlling test timeout) and forwarding of BUILDFLAGS to binary/dynbinary.

BUILDFLAGS is automatically appended with ORIG_BUILDFLAGS (see comments) so you can just specify what you want. Removing parts of ORIG_BUILDFLAGS is an exercise for the reader.

Note that BUILDFLAGS=-race cannot be used with `make cross` reliably, so I don't use it there and forward ORIG_BUILDFLAGS instead.

already found a few races with BUILDFLAGS=-race. :)

/cc @tianon @tiborvass 
We don’t. That’s why it’s set up the way it is.

BUILDFLAGS=-race make binary # works
BUILDFLAGS=-race make cross # also works, because BUILDFLAGS is ignored here

On Sep 25, 2014, at 1:54 PM, Tibor Vass <notifications@github.com> wrote:

> In Makefile:
> 
> > @@ -12,7 +12,7 @@ DOCKER_IMAGE := docker$(if $(GIT_BRANCH),:$(GIT_BRANCH))
> >  DOCKER_DOCS_IMAGE := docker-docs$(if $(GIT_BRANCH),:$(GIT_BRANCH))
> >  DOCKER_MOUNT := $(if $(BINDDIR),-v "$(CURDIR)/$(BINDDIR):/go/src/github.com/docker/docker/$(BINDDIR)")
> >  
> > -DOCKER_RUN_DOCKER := docker run --rm -it --privileged -e TESTFLAGS -e TESTDIRS -e DOCKER_GRAPHDRIVER -e DOCKER_EXECDRIVER $(DOCKER_MOUNT) "$(DOCKER_IMAGE)"
> > +DOCKER_RUN_DOCKER := docker run --rm -it --privileged -e TIMEOUT -e ORIG_BUILDFLAGS -e BUILDFLAGS -e TESTFLAGS -e TESTDIRS -e DOCKER_GRAPHDRIVER -e DOCKER_EXECDRIVER $(DOCKER_MOUNT) "$(DOCKER_IMAGE)"
> Do we really need to customize buildflags for cross compiling?
> 
> —
> Reply to this email directly or view it on GitHub.
>