X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=Makefile;h=e4973ad74201be7fe5e425180120887a09e6e36d;hb=3c4defb289a37002a924f12632426c5aab6a4f81;hp=8c5855592c0a921715684aebfcf0510a787bec0f;hpb=60974e66c57cacdc2483d74718c4bb0a993d2183;p=src%2Fxds%2Fxds-gdb.git diff --git a/Makefile b/Makefile index 8c58555..e4973ad 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ # Makefile used to build xds-gdb commands # Application Version -VERSION := 0.0.1 +VERSION := 0.1.0 # Retrieve git tag/commit to set sub-version string @@ -10,7 +10,8 @@ ifeq ($(origin SUB_VERSION), undefined) ifneq ($(SUB_VERSION), ) VERSION := $(firstword $(subst -, ,$(SUB_VERSION))) SUB_VERSION := $(word 2,$(subst -, ,$(SUB_VERSION))) - else + endif + ifeq ($(SUB_VERSION), ) SUB_VERSION := $(shell git rev-parse --short HEAD) ifeq ($(SUB_VERSION), ) SUB_VERSION := unknown-dev @@ -58,7 +59,6 @@ build: $(TARGET) xds-gdb: vendor @echo "### Build $@ (version $(VERSION), subversion $(SUB_VERSION)) - $(BUILD_MODE)"; @cd $(ROOT_SRCDIR); $(BUILD_ENV_FLAGS) go build $(VERBOSE_$(V)) -i -o $(BINDIR)/$@$(EXT) -ldflags "$(GORELEASE) -X main.AppVersion=$(VERSION) -X main.AppSubVersion=$(SUB_VERSION)" . - @([ "$(HOST_GOOS)" = "linux" ] && { cd $(BINDIR) && ln -sf $@ $(subst xds-,,$@); } || { true; } ) test: tools/glide go test --race $(shell ./tools/glide novendor) @@ -94,6 +94,7 @@ package-all: @echo " WARNING: build on Windows not supported for now." @echo "# Build darwin amd64..." GOOS=darwin GOARCH=amd64 RELEASE=1 make -f $(ROOT_SRCDIR)/Makefile package + make -f $(ROOT_SRCDIR)/Makefile clean vendor: tools/glide glide.yaml ./tools/glide install --strip-vendor