summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2017-06-16 16:27:10 +0200
committerSebastien Douheret <sebastien.douheret@iot.bzh>2017-06-16 16:27:10 +0200
commitabb904e0e250ff4a77e789a887d331f45a6d8410 (patch)
treef7ebd1f414be0a155ad7a1942b1fd23a6972754b
parent78e365c8ce495fcb556828fdab7a71f8b301c42d (diff)
Fix package generation.
-rw-r--r--Makefile11
1 files changed, 6 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index e371581..bd4fe0f 100644
--- a/Makefile
+++ b/Makefile
@@ -54,7 +54,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 +111,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 +121,7 @@ webapp/debug:
webapp/install:
(cd webapp && npm install)
+ @test -d ${DESTDIR}/usr/local/etc && rm -rf ${DESTDIR}/usr
.PHONY: scripts
scripts:
@@ -131,7 +132,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 +146,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