2014-05-08 21:18:44 +00:00
|
|
|
#
|
|
|
|
# Licensed to the Apache Software Foundation (ASF) under one
|
|
|
|
# or more contributor license agreements. See the NOTICE file
|
|
|
|
# distributed with this work for additional information
|
|
|
|
# regarding copyright ownership. The ASF licenses this file
|
|
|
|
# to you under the Apache License, Version 2.0 (the
|
|
|
|
# "License"); you may not use this file except in compliance
|
|
|
|
# with the License. You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing,
|
|
|
|
# software distributed under the License is distributed on an
|
|
|
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
|
|
# KIND, either express or implied. See the License for the
|
|
|
|
# specific language governing permissions and limitations
|
|
|
|
# under the License.
|
|
|
|
#
|
|
|
|
|
2015-05-10 11:21:17 +00:00
|
|
|
BUILT_SOURCES = gopath
|
|
|
|
|
2015-03-24 21:30:40 +00:00
|
|
|
THRIFT = $(top_builddir)/compiler/cpp/thrift
|
2014-05-08 21:18:44 +00:00
|
|
|
THRIFTCMD = $(THRIFT) -out src/gen --gen go:thrift_import=thrift
|
|
|
|
THRIFTTEST = $(top_srcdir)/test/ThriftTest.thrift
|
|
|
|
|
2015-03-24 21:30:40 +00:00
|
|
|
precross: bin/testclient bin/testserver
|
2014-05-08 21:18:44 +00:00
|
|
|
|
|
|
|
ThriftTest.thrift: $(THRIFTTEST)
|
2014-10-03 18:42:54 +00:00
|
|
|
grep -v list.*map.*list.*map $(THRIFTTEST) > ThriftTest.thrift
|
2014-05-08 21:18:44 +00:00
|
|
|
|
|
|
|
# Thrift for GO has problems with complex map keys: THRIFT-2063
|
2014-07-10 13:14:51 +00:00
|
|
|
gopath: $(THRIFT) ThriftTest.thrift
|
2014-10-03 18:42:54 +00:00
|
|
|
mkdir -p src/gen
|
|
|
|
$(THRIFTCMD) ThriftTest.thrift
|
|
|
|
$(THRIFTCMD) ../StressTest.thrift
|
|
|
|
ln -nfs ../../../lib/go/thrift src/thrift
|
2015-06-17 20:21:27 +00:00
|
|
|
GOPATH=`pwd` $(GO) get github.com/golang/mock/gomock
|
2014-10-03 18:42:54 +00:00
|
|
|
touch gopath
|
2014-05-08 21:18:44 +00:00
|
|
|
|
|
|
|
bin/testclient: gopath
|
2014-10-03 18:42:54 +00:00
|
|
|
GOPATH=`pwd` $(GO) install bin/testclient
|
2014-05-08 21:18:44 +00:00
|
|
|
|
|
|
|
bin/testserver: gopath
|
2014-10-03 18:42:54 +00:00
|
|
|
GOPATH=`pwd` $(GO) install bin/testserver
|
2014-05-08 21:18:44 +00:00
|
|
|
|
|
|
|
bin/stress: gopath
|
2014-10-03 18:42:54 +00:00
|
|
|
GOPATH=`pwd` $(GO) install bin/stress
|
2014-05-08 21:18:44 +00:00
|
|
|
|
|
|
|
clean-local:
|
2015-06-19 19:22:57 +00:00
|
|
|
$(RM) -r src/gen src/github.com/golang src/thrift bin pkg gopath ThriftTest.thrift
|
2014-05-08 21:18:44 +00:00
|
|
|
|
2015-03-24 21:30:40 +00:00
|
|
|
check_PROGRAMS: bin/testclient bin/testserver bin/stress
|
|
|
|
|
2014-05-08 21:18:44 +00:00
|
|
|
check: gopath
|
2014-10-03 18:42:54 +00:00
|
|
|
GOPATH=`pwd` $(GO) test -v common/...
|
2014-05-08 21:18:44 +00:00
|
|
|
|
|
|
|
genmock: gopath
|
2015-06-19 19:22:57 +00:00
|
|
|
GOPATH=`pwd` $(GO) install github.com/golang/mock/mockgen
|
2014-10-03 18:42:54 +00:00
|
|
|
GOPATH=`pwd` bin/mockgen -destination=src/common/mock_handler.go -package=common gen/thrifttest ThriftTest
|
2014-05-08 21:18:44 +00:00
|
|
|
|
2014-07-10 13:14:51 +00:00
|
|
|
EXTRA_DIST = \
|
2014-10-03 18:42:54 +00:00
|
|
|
src/bin \
|
|
|
|
src/common
|