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 
It’s in the description; I need it for the cross target, which cannot use BUILDFLAGS if -race, et al are in there.

On Sep 25, 2014, at 1:48 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)"
> why do you expose ORIG_BUILDFLAGS?
> 
> —
> Reply to this email directly or view it on GitHub.
>