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 
Ah gotcha. My misunderstanding, fix incoming.

On Sep 25, 2014, at 1:57 PM, Tianon Gravi <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)"
> Right, but we don't need "-e ORIG_BUILDFLAGS" here for that, because it'll get overwritten in hack/make.sh anyhow.
> —
> Reply to this email directly or view it on GitHub.
>