Browse code

allow for verbose output from go tools

Mikhail Sobolev authored on 2013/03/26 15:28:35
Showing 2 changed files
... ...
@@ -5,6 +5,11 @@ BUILD_DIR := $(CURDIR)/.gopath
5 5
 GOPATH ?= $(BUILD_DIR)
6 6
 export GOPATH
7 7
 
8
+GO_OPTIONS ?=
9
+ifeq ($(VERBOSE), 1)
10
+GO_OPTIONS += -v
11
+endif
12
+
8 13
 SRC_DIR := $(GOPATH)/src
9 14
 
10 15
 DOCKER_DIR := $(SRC_DIR)/$(DOCKER_PACKAGE)
... ...
@@ -18,7 +23,7 @@ all: $(DOCKER_BIN)
18 18
 
19 19
 $(DOCKER_BIN): $(DOCKER_DIR)
20 20
 	@mkdir -p  $(dir $@)
21
-	@(cd $(DOCKER_MAIN); go get; go build -o $@)
21
+	@(cd $(DOCKER_MAIN); go get $(GO_OPTIONS); go build $(GO_OPTIONS) -o $@)
22 22
 
23 23
 $(DOCKER_DIR):
24 24
 	@mkdir -p $(dir $@)
... ...
@@ -33,4 +38,4 @@ else ifneq ($(DOCKER_DIR), $(realpath $(DOCKER_DIR)))
33 33
 endif
34 34
 
35 35
 test: all
36
-	@(cd $(DOCKER_DIR); sudo -E go test)
36
+	@(cd $(DOCKER_DIR); sudo -E go test $(GO_OPTIONS))
... ...
@@ -70,6 +70,13 @@ Building from source
70 70
    This command will install all necessary dependencies and build the
71 71
    executable that you can find in ``bin/docker``
72 72
 
73
+3. Should you like to see what's happening, run ``make`` with ``VERBOSE=1`` parameter:
74
+
75
+    ```bash
76
+
77
+    $ make VERBOSE=1
78
+    ```
79
+
73 80
 Installing on Ubuntu 12.04 and 12.10
74 81
 ------------------------------------
75 82