Skip to content
This repository has been archived by the owner on Mar 26, 2020. It is now read-only.

Commit

Permalink
Merge pull request #780 from phlogistonjohn/jjm-make-generated
Browse files Browse the repository at this point in the history
makefile: support generating sources via a standalone target
  • Loading branch information
aravindavk authored May 23, 2018
2 parents 59798e8 + 3039019 commit 7dd66b8
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ DEPENV ?=
PLUGINS ?= yes
FASTBUILD ?= yes

.PHONY: all build check check-go check-reqs install vendor-update vendor-install verify release check-protoc $(GD2_BIN) $(GD2_BUILD) $(CLI_BIN) $(CLI_BUILD) cli $(GD2_CONF) gd2conf test dist dist-vendor functest
.PHONY: all build check check-go check-reqs install vendor-update vendor-install verify release check-protoc $(GD2_BIN) $(GD2_BUILD) $(CLI_BIN) $(CLI_BUILD) cli $(GD2_CONF) gd2conf test dist dist-vendor functest generated

all: build

Expand All @@ -49,12 +49,16 @@ check-reqs:
@./scripts/check-reqs.sh
@echo

$(GD2_BIN): $(GD2_BUILD) gd2conf
$(GD2_BUILD):
generated:
@echo "Generating sources..."
@PREFIX=$(PREFIX) BASE_PREFIX=$(BASE_PREFIX) EXEC_PREFIX=$(EXEC_PREFIX) \
BINDIR=$(BINDIR) SBINDIR=$(SBINDIR) DATADIR=$(DATADIR) \
LOCALSTATEDIR=$(LOCALSTATEDIR) LOGDIR=$(LOGDIR) \
SYSCONFDIR=$(SYSCONFDIR) ./scripts/prepare_path_config.sh glusterd2


$(GD2_BIN): $(GD2_BUILD) gd2conf generated
$(GD2_BUILD): generated
@PLUGINS=$(PLUGINS) FASTBUILD=$(FASTBUILD) ./scripts/build.sh glusterd2
@echo

Expand Down Expand Up @@ -86,10 +90,10 @@ vendor-install:
@$(DEPENV) dep ensure
@echo

test: check-reqs
test: check-reqs generated
@./test.sh $(TESTOPTIONS)

functest: check-reqs
functest: check-reqs generated
@go test ./e2e -v -functest

release: build
Expand Down

0 comments on commit 7dd66b8

Please sign in to comment.