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