VERSION := $(firstword $(subst -, ,$(SUB_VERSION)))
SUB_VERSION := $(word 2,$(subst -, ,$(SUB_VERSION)))
else
VERSION := $(firstword $(subst -, ,$(SUB_VERSION)))
SUB_VERSION := $(word 2,$(subst -, ,$(SUB_VERSION)))
else
ROOT_SRCDIR := $(patsubst %/,%,$(dir $(mkfile_path)))
ROOT_GOPRJ := $(abspath $(ROOT_SRCDIR)/../../../..)
LOCAL_BINDIR := $(ROOT_SRCDIR)/bin
ROOT_SRCDIR := $(patsubst %/,%,$(dir $(mkfile_path)))
ROOT_GOPRJ := $(abspath $(ROOT_SRCDIR)/../../../..)
LOCAL_BINDIR := $(ROOT_SRCDIR)/bin
-xds:vendor scripts tools/syncthing/copytobin
- @echo "### Build XDS server (version $(VERSION), subversion $(SUB_VERSION))";
+xds: scripts tools/syncthing/copytobin
+ @echo "### Build XDS server (version $(VERSION), subversion $(SUB_VERSION), $(BUILD_MODE))";
cat config.json.in \
| sed -e s,"webapp/dist","$(DESTDIR_WWW)",g \
| sed -e s,"\./bin","",g \
cat config.json.in \
| sed -e s,"webapp/dist","$(DESTDIR_WWW)",g \
| sed -e s,"\./bin","",g \
- 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
- @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; \
+ }