Skip to content

Commit

Permalink
Add make install_oss target. Set GOPATH if not set.
Browse files Browse the repository at this point in the history
  • Loading branch information
Javier Alvarado committed Jan 29, 2019
1 parent 9d44486 commit 553d76d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ SUBDIRS = dgraph

###############

.PHONY: $(SUBDIRS) all oss version install uninstall test help
.PHONY: $(SUBDIRS) all oss version install install_oss oss_install uninstall test help
all: $(SUBDIRS)

$(SUBDIRS):
Expand All @@ -45,14 +45,17 @@ install:
$(MAKE) -C $$i install; \
done)

install_oss oss_install:
$(MAKE) BUILD_TAGS=oss install

uninstall:
@(set -e;for i in $(SUBDIRS); do \
echo Uninstalling $$i ...; \
$(MAKE) -C $$i uninstall; \
done)

test:
@echo running ./test.sh
@echo Running ./test.sh
./test.sh

help:
Expand Down
5 changes: 3 additions & 2 deletions dgraph/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ BUILD_DATE ?= $(shell git log -1 --format=%ci)
BUILD_BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD)
BUILD_VERSION ?= $(shell git describe --always --tags)
BUILD_TAGS ?=
GOPATH ?= $(shell go env GOPATH)

# Build-time Go variables
dgraphVersion = github.com/dgraph-io/dgraph/x.dgraphVersion
Expand Down Expand Up @@ -50,6 +51,6 @@ uninstall:
@go clean -i -x

install:
@printf "%-8s: %s %s\n" "Old MD5" `md5sum $(GOPATH)/bin/$(BIN) 2>/dev/null | cut -c-32`
@echo "Old MD5:" `md5sum $(GOPATH)/bin/$(BIN) 2>/dev/null | cut -c-32`
@go install $(BUILD_FLAGS)
@printf "%-8s: %s %s\n" "New MD5" `md5sum $(GOPATH)/bin/$(BIN) 2>/dev/null | cut -c-32`
@echo "New MD5:" `md5sum $(GOPATH)/bin/$(BIN) 2>/dev/null | cut -c-32`

0 comments on commit 553d76d

Please sign in to comment.