1# 2# Licensed to the Apache Software Foundation (ASF) under one 3# or more contributor license agreements. See the NOTICE file 4# distributed with this work for additional information 5# regarding copyright ownership. The ASF licenses this file 6# to you under the Apache License, Version 2.0 (the 7# "License"); you may not use this file except in compliance 8# with the License. You may obtain a copy of the License at 9# 10# http://www.apache.org/licenses/LICENSE-2.0 11# 12# Unless required by applicable law or agreed to in writing, 13# software distributed under the License is distributed on an 14# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15# KIND, either express or implied. See the License for the 16# specific language governing permissions and limitations 17# under the License. 18# 19 20BUILT_SOURCES = gopath 21 22GOBUILDEXTRA = -buildvcs=false 23 24THRIFTCMD = $(THRIFT) -out src/gen --gen go:thrift_import=github.com/apache/thrift/lib/go/thrift,package_prefix=github.com/apache/thrift/test/go/src/gen/$(COMPILER_EXTRAFLAG) 25THRIFTTEST = $(top_srcdir)/test/ThriftTest.thrift 26 27precross: bin/testclient bin/testserver 28 29ThriftTest.thrift: $(THRIFTTEST) 30 grep -v list.*map.*list.*map $(THRIFTTEST) > ThriftTest.thrift 31 32.PHONY: gopath 33 34# Thrift for GO has problems with complex map keys: THRIFT-2063 35gopath: $(THRIFT) ThriftTest.thrift 36 mkdir -p src/gen 37 $(THRIFTCMD) ThriftTest.thrift 38 $(THRIFTCMD) ../StressTest.thrift 39 $(THRIFTCMD) ../ConstantsDemo.thrift 40 touch gopath 41 42bin/testclient: gopath 43 $(GO) build $(GOBUILDEXTRA) -o bin/testclient ./src/bin/testclient 44 45bin/testserver: gopath 46 $(GO) build $(GOBUILDEXTRA) -o bin/testserver ./src/bin/testserver 47 48bin/stress: gopath 49 $(GO) build $(GOBUILDEXTRA) -o bin/stress ./src/bin/stress 50 51clean-local: 52 $(RM) -r src/gen src/github.com/golang src/thrift bin pkg gopath ThriftTest.thrift 53 54check_PROGRAMS: bin/testclient bin/testserver bin/stress 55 56check: gopath genmock 57 $(GO) test -v ./src/common/... 58 $(GO) test -v ./src/gen/... 59 60genmock: gopath 61 sh genmock.sh 62 63EXTRA_DIST = \ 64 src/bin \ 65 src/common \ 66 genmock.sh 67