Jens Geyer | f459868 | 2014-05-08 23:18:44 +0200 | [diff] [blame] | 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 | |
| 20 | THRIFT = $(top_srcdir)/compiler/cpp/thrift |
| 21 | THRIFTCMD = $(THRIFT) -out src/gen --gen go:thrift_import=thrift |
| 22 | THRIFTTEST = $(top_srcdir)/test/ThriftTest.thrift |
| 23 | |
| 24 | all: bin/testclient bin/testserver bin/stress |
| 25 | |
| 26 | ThriftTest.thrift: $(THRIFTTEST) |
| 27 | grep -v list.*map.*list.*map $(THRIFTTEST) > ThriftTest.thrift |
| 28 | |
| 29 | # Thrift for GO has problems with complex map keys: THRIFT-2063 |
jfarrell | 8fd8c63 | 2014-07-10 09:14:51 -0400 | [diff] [blame^] | 30 | gopath: $(THRIFT) ThriftTest.thrift |
Jens Geyer | a47cf90 | 2014-05-17 01:54:09 +0200 | [diff] [blame] | 31 | mkdir src/gen |
Jens Geyer | f459868 | 2014-05-08 23:18:44 +0200 | [diff] [blame] | 32 | $(THRIFTCMD) ThriftTest.thrift |
| 33 | $(THRIFTCMD) ../StressTest.thrift |
| 34 | ln -nfs ../../../lib/go/thrift src/thrift |
| 35 | GOPATH=`pwd` $(GO) get code.google.com/p/gomock/gomock |
| 36 | touch gopath |
| 37 | |
| 38 | bin/testclient: gopath |
| 39 | GOPATH=`pwd` $(GO) install bin/testclient |
| 40 | |
| 41 | bin/testserver: gopath |
| 42 | GOPATH=`pwd` $(GO) install bin/testserver |
| 43 | |
| 44 | bin/stress: gopath |
| 45 | GOPATH=`pwd` $(GO) install bin/stress |
| 46 | |
| 47 | clean-local: |
| 48 | $(RM) -r src/gen/* src/code.google.com src/thrift bin pkg gopath ThriftTest.thrift |
| 49 | |
| 50 | check: gopath |
| 51 | GOPATH=`pwd` $(GO) test -v common/... |
| 52 | |
| 53 | genmock: gopath |
| 54 | GOPATH=`pwd` $(GO) install code.google.com/p/gomock/mockgen |
| 55 | GOPATH=`pwd` bin/mockgen -destination=src/common/mock_handler.go -package=common gen/thrifttest ThriftTest |
| 56 | |
jfarrell | 8fd8c63 | 2014-07-10 09:14:51 -0400 | [diff] [blame^] | 57 | EXTRA_DIST = \ |
| 58 | src/bin \ |
| 59 | src/common |