X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=Makefile;h=29a33a824ee3f58cd14f5af69510c3c9232594c4;hb=d21eb59c4f7fe9844646bd60ac34aa1d3cbb792f;hp=948bad2ddb39d39dd0ba8d96b0fcbd92817caab9;hpb=06adae2e6dbded3c94651a8f4e2d1a949a9c6766;p=src%2Fxds%2Fxds-server.git diff --git a/Makefile b/Makefile index 948bad2..29a33a8 100644 --- a/Makefile +++ b/Makefile @@ -5,9 +5,7 @@ VERSION := 0.1.0 # Syncthing version to install SYNCTHING_VERSION = 0.14.28 -# FIXME: use master while waiting a release that include #164 -#SYNCTHING_INOTIFY_VERSION = 0.8.5 -SYNCTHING_INOTIFY_VERSION=master +SYNCTHING_INOTIFY_VERSION = 0.8.6 # Retrieve git tag/commit to set sub-version string @@ -54,7 +52,7 @@ mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST))) ROOT_SRCDIR := $(patsubst %/,%,$(dir $(mkfile_path))) ROOT_GOPRJ := $(abspath $(ROOT_SRCDIR)/../../../..) LOCAL_BINDIR := $(ROOT_SRCDIR)/bin -LOCAL_TOOLSDIR := $(ROOT_SRCDIR)/tools +LOCAL_TOOLSDIR := $(ROOT_SRCDIR)/tools/${HOST_GOOS} PACKAGE_DIR := $(ROOT_SRCDIR)/package @@ -111,7 +109,7 @@ clean: .PHONY: distclean distclean: clean - rm -rf $(LOCAL_BINDIR) $(LOCAL_TOOLSDIR) glide.lock vendor webapp/node_modules webapp/dist + rm -rf $(LOCAL_BINDIR) $(ROOT_SRCDIR)/tools glide.lock vendor webapp/node_modules webapp/dist webapp: webapp/install (cd webapp && gulp build) @@ -121,6 +119,7 @@ webapp/debug: webapp/install: (cd webapp && npm install) + @if [ -d ${DESTDIR}/usr/local/etc ]; then rm -rf ${DESTDIR}/usr; fi .PHONY: scripts scripts: @@ -131,7 +130,7 @@ conffile: cat config.json.in \ | sed -e s,"webapp/dist","$(DESTDIR_WWW)",g \ | sed -e s,"\./bin","",g \ - > $(PACKAGE_DIR)/xds-server/config.json + > $(DESTDIR)/config.json .PHONY: install install: @@ -145,8 +144,8 @@ install: .PHONY: package package: clean - DESTDIR=$(PACKAGE_DIR)/xds-server make -f $(ROOT_SRCDIR)/Makefile all install - DESTDIR=$(PACKAGE_DIR)/xds-server DESTDIR_WWW=www-xds-server make -f $(ROOT_SRCDIR)/Makefile conffile + make -f $(ROOT_SRCDIR)/Makefile all install DESTDIR=$(PACKAGE_DIR)/xds-server + make -f $(ROOT_SRCDIR)/Makefile conffile DESTDIR=$(PACKAGE_DIR)/xds-server DESTDIR_WWW=www-xds-server (cd $(PACKAGE_DIR) && zip -r $(ROOT_SRCDIR)/$(PACKAGE_ZIPFILE) ./xds-server) .PHONY: package-all @@ -159,10 +158,13 @@ package-all: vendor: tools/glide glide.yaml $(LOCAL_TOOLSDIR)/glide install --strip-vendor +.PHONY: tools/glide tools/glide: - @echo "Downloading glide" - mkdir -p $(LOCAL_TOOLSDIR) - curl --silent -L https://glide.sh/get | GOBIN=$(LOCAL_TOOLSDIR) sh + @test -f $(LOCAL_TOOLSDIR)/glide || { \ + echo "Downloading glide"; \ + mkdir -p $(LOCAL_TOOLSDIR); \ + curl --silent -L https://glide.sh/get | GOBIN=$(LOCAL_TOOLSDIR) sh; \ + } .PHONY: tools/syncthing tools/syncthing: