mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Makefile improvements
+ Convenience rules: srcrelease, deps - Separate dependency vendoring from building the binary (re-download dependencies with 'make deps')
This commit is contained in:
parent
8b8c8bf7cb
commit
b3ab0b561e
1 changed files with 7 additions and 2 deletions
9
Makefile
9
Makefile
|
@ -27,24 +27,29 @@ DOCKER_MAIN := $(DOCKER_DIR)/docker
|
||||||
DOCKER_BIN_RELATIVE := bin/docker
|
DOCKER_BIN_RELATIVE := bin/docker
|
||||||
DOCKER_BIN := $(CURDIR)/$(DOCKER_BIN_RELATIVE)
|
DOCKER_BIN := $(CURDIR)/$(DOCKER_BIN_RELATIVE)
|
||||||
|
|
||||||
.PHONY: all clean test hack release $(BINRELEASE) $(SRCRELEASE)
|
.PHONY: all clean test hack release srcrelease $(BINRELEASE) $(SRCRELEASE) $(DOCKER_BIN) $(DOCKER_DIR)
|
||||||
|
|
||||||
all: $(DOCKER_BIN)
|
all: $(DOCKER_BIN)
|
||||||
|
|
||||||
$(DOCKER_BIN): $(DOCKER_DIR)
|
$(DOCKER_BIN): $(DOCKER_DIR)
|
||||||
@mkdir -p $(dir $@)
|
@mkdir -p $(dir $@)
|
||||||
@(cd $(DOCKER_MAIN); go get $(GO_OPTIONS); go build $(GO_OPTIONS) $(BUILD_OPTIONS) -o $@)
|
@(cd $(DOCKER_MAIN); go build $(GO_OPTIONS) $(BUILD_OPTIONS) -o $@)
|
||||||
@echo $(DOCKER_BIN_RELATIVE) is created.
|
@echo $(DOCKER_BIN_RELATIVE) is created.
|
||||||
|
|
||||||
$(DOCKER_DIR):
|
$(DOCKER_DIR):
|
||||||
@mkdir -p $(dir $@)
|
@mkdir -p $(dir $@)
|
||||||
|
@rm -f $@
|
||||||
@ln -sf $(CURDIR)/ $@
|
@ln -sf $(CURDIR)/ $@
|
||||||
|
@(cd $(DOCKER_MAIN); go get $(GO_OPTIONS))
|
||||||
|
|
||||||
whichrelease:
|
whichrelease:
|
||||||
echo $(RELEASE_VERSION)
|
echo $(RELEASE_VERSION)
|
||||||
|
|
||||||
release: $(BINRELEASE)
|
release: $(BINRELEASE)
|
||||||
|
srcrelease: $(SRCRELEASE)
|
||||||
|
deps: $(DOCKER_DIR)
|
||||||
|
|
||||||
|
# A clean checkout of $RELEASE_VERSION, with vendored dependencies
|
||||||
$(SRCRELEASE):
|
$(SRCRELEASE):
|
||||||
rm -fr $(SRCRELEASE)
|
rm -fr $(SRCRELEASE)
|
||||||
git clone $(GIT_ROOT) $(SRCRELEASE)
|
git clone $(GIT_ROOT) $(SRCRELEASE)
|
||||||
|
|
Loading…
Reference in a new issue