diff options
author | Max Romanov <max.romanov@nginx.com> | 2017-08-02 13:01:54 +0300 |
---|---|---|
committer | Max Romanov <max.romanov@nginx.com> | 2017-08-02 13:01:54 +0300 |
commit | a7ef8481fcda2f2dc5b0b84a93e66bce62c83918 (patch) | |
tree | b19c3362e0cd305de13905f2f04bea99a0606ebf /auto/modules | |
parent | 83d7ab38acb2ecf917fc66e6aefddff7cb5f7169 (diff) | |
download | unit-a7ef8481fcda2f2dc5b0b84a93e66bce62c83918.tar.gz unit-a7ef8481fcda2f2dc5b0b84a93e66bce62c83918.tar.bz2 |
Added make target 'golang-nginext-install' to install precompiled go package.
Diffstat (limited to '')
-rw-r--r-- | auto/modules/go/make | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/auto/modules/go/make b/auto/modules/go/make index aa93d3d6..ebacf0df 100644 --- a/auto/modules/go/make +++ b/auto/modules/go/make @@ -22,3 +22,23 @@ $NXT_BUILD_DIR/$nxt_obj: $nxt_src END done + +cat << END >> $NXT_MAKEFILE +.PHONY: golang-nginext-install + +NXT_ROOT = \$(shell pwd) + +GOPATH = \$(shell go env GOPATH) +GOOS = \$(shell go env GOOS) +GOARCH = \$(shell go env GOARCH) + +golang-nginext-install: + install -d \$(GOPATH)/src/nginext + install -p ./src/nginext/*.c ./src/nginext/*.h ./src/nginext/*.go \$(GOPATH)/src/nginext/ + CGO_CFLAGS="-I\$(NXT_ROOT)/build -I\$(NXT_ROOT)/src" CGO_LDFLAGS="-L\$(NXT_ROOT)/build" go install -v nginext + +golang-nginext-uninstall: + rm -rf \$(GOPATH)/src/nginext + rm -f \$(GOPATH)/pkg/\$(GOOS)_\$(GOARCH)/nginext.a + +END |