summaryrefslogtreecommitdiff
path: root/tutorial/go/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'tutorial/go/Makefile.am')
-rw-r--r--tutorial/go/Makefile.am24
1 files changed, 9 insertions, 15 deletions
diff --git a/tutorial/go/Makefile.am b/tutorial/go/Makefile.am
index bd57d656f..ed108fd32 100644
--- a/tutorial/go/Makefile.am
+++ b/tutorial/go/Makefile.am
@@ -18,36 +18,30 @@
#
gen-go/tutorial/calculator.go gen-go/shared/shared_service.go: $(top_srcdir)/tutorial/tutorial.thrift
- $(THRIFT) --gen go$(COMPILER_EXTRAFLAG) -r $<
+ $(THRIFT) --gen go:thrift_import=github.com/apache/thrift/lib/go/thrift,package_prefix=github.com/apache/thrift/tutorial/go/gen-go/$(COMPILER_EXTRAFLAG) -r $<
all-local: gen-go/tutorial/calculator.go
-check: src/github.com/apache/thrift/lib/go/thrift thirdparty-dep
- $(THRIFT) -r --gen go$(COMPILER_EXTRAFLAG) $(top_srcdir)/tutorial/tutorial.thrift
- cp -r gen-go/* src/
- GOPATH=`pwd` $(GO) build -o go-tutorial ./src
- GOPATH=`pwd` $(GO) build -o calculator-remote src/tutorial/calculator-remote/calculator-remote.go
-
-src/github.com/apache/thrift/lib/go/thrift:
- mkdir -p src/github.com/apache/thrift/lib/go
- ln -sf $(realpath $(top_srcdir)/lib/go/thrift) src/github.com/apache/thrift/lib/go/thrift
+check: thirdparty-dep all
+ $(GO) build -mod=mod -o go-tutorial ./src
+ $(GO) build -mod=mod -o calculator-remote ./gen-go/tutorial/calculator-remote/calculator-remote.go
thirdparty-dep:
tutorialserver: all
- GOPATH=`pwd` $(GO) run src/*.go -server=true
+ $(GO) run -mod=mod src/*.go -server=true
tutorialclient: all
- GOPATH=`pwd` $(GO) run src/*.go
+ $(GO) run -mod=mod src/*.go
tutorialsecureserver: all
- GOPATH=`pwd` $(GO) run src/*.go -server=true -secure=true
+ $(GO) run -mod=mod src/*.go -server=true -secure=true
tutorialsecureclient: all
- GOPATH=`pwd` $(GO) run src/*.go -secure=true
+ $(GO) run -mod=mod src/*.go -secure=true
clean-local:
- $(RM) -r gen-* src/shared src/tutorial src/git.apache.org go-tutorial calculator-remote
+ $(RM) -r gen-* go-tutorial calculator-remote
EXTRA_DIST = \
src/client.go \