Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Carranza <pcarranza@gmail.com>2016-12-11 02:15:27 +0300
committerPablo Carranza <pcarranza@gmail.com>2016-12-11 02:27:42 +0300
commit687bc149929c45c258cea85e4ecf290b93594c7f (patch)
treefcfc460217a13deec0f71bfdc57df0ae3d0c854a
parentf4f65c0d1fcecf4866d896e1f52df8438cec48b1 (diff)
Add PHONY to makefile to force build on test
This is something I found happening in my host, since the file build target exists Make does not executes the build, which leads to not updating the compilation source code and forcing a clean build. I'm labeling the build target as PHONY so it is built always.
-rw-r--r--Makefile12
1 files changed, 9 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 08d99c8fb..ba461f596 100644
--- a/Makefile
+++ b/Makefile
@@ -1,13 +1,17 @@
PKG=gitlab.com/gitlab-org/git-access-daemon
-BUILD_DIR = $(shell pwd)
+BUILD_DIR=$(shell pwd)
+CLIENT_BIN=git-daemon-client
+SERVER_BIN=git-daemon-server
export GOPATH=${BUILD_DIR}/_build
+.PHONY: ${BUILD_DIR}/_build
+
all: test build
build:
- go build -o git-daemon-server cmd/server/main.go
- go build -o git-daemon-client cmd/client/main.go
+ go build -o ${SERVER_BIN} cmd/server/main.go
+ go build -o ${CLIENT_BIN} cmd/client/main.go
${BUILD_DIR}/_build:
mkdir -p $@/src/${PKG}
@@ -21,3 +25,5 @@ test: ${BUILD_DIR}/_build
clean:
rm -rf ${BUILD_DIR}/_build
rm -rf client/testdata
+ [ -f ${CLIENT_BIN} ] && rm ${CLIENT_BIN}
+ [ -f ${SERVER_BIN} ] && rm ${SERVER_BIN}