Archived
1
0

use separate gopath for gopherjs

This commit is contained in:
Jeff Becker 2018-02-22 07:56:28 -05:00
parent c3426871d2
commit ff4cb0a33a
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

View File

@ -20,7 +20,8 @@ GO=$(GOROOT)/bin/go
GOPHERJS_GOROOT ?= $(GOROOT) GOPHERJS_GOROOT ?= $(GOROOT)
GOPHERJS_GO = $(GOPHERJS_GOROOT)/bin/go GOPHERJS_GO = $(GOPHERJS_GOROOT)/bin/go
GOPHERJS=$(REPO_GOPATH)/bin/gopherjs GOPHERJS_GOPATH=$(REPO)/gopherjs_go
GOPHERJS=$(GOPHERJS_GOPATH)/bin/gopherjs
all: clean build all: clean build
@ -38,13 +39,13 @@ $(MINIFY):
GOPATH=$(REPO_GOPATH) $(GO) get -v github.com/tdewolff/minify/cmd/minify GOPATH=$(REPO_GOPATH) $(GO) get -v github.com/tdewolff/minify/cmd/minify
$(GOPHERJS): $(GOPHERJS):
GOPATH=$(REPO_GOPATH) $(GOPHERJS_GO) get -v github.com/gopherjs/gopherjs GOROOT=$(GOPHERJS_GOROOT) GOPATH=$(GOPHERJS_GOPATH) $(GOPHERJS_GO) get -v github.com/gopherjs/gopherjs
js-deps: $(MINIFY) $(MINER_JS) js-deps: $(MINIFY) $(MINER_JS)
$(MINER_JS): $(GOPHERJS) $(MINIFY) $(MINER_JS): $(GOPHERJS) $(MINIFY)
cp -rf $(SRND_DIR)/src/github.com $(REPO_GOPATH)/src/ cp -rf $(SRND_DIR)/src/github.com $(GOPHERJS_GOPATH)/src/
GOROOT=$(GOPHERJS_GOROOT) GOPATH=$(REPO_GOPATH) $(GOPHERJS) -m -v build github.com/ZiRo-/cuckgo/miner_js GOROOT=$(GOPHERJS_GOROOT) GOPATH=$(GOPHERJS_GOPATH) $(GOPHERJS) -m -v build github.com/ZiRo-/cuckgo/miner_js
$(MINIFY) --mime=text/javascript > $(STATIC_DIR)/miner-js.js < miner_js.js $(MINIFY) --mime=text/javascript > $(STATIC_DIR)/miner-js.js < miner_js.js
rm -f miner_js.js.map miner_js.js rm -f miner_js.js.map miner_js.js