Jens Geyer | a7da488 | 2013-07-18 00:33:05 +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 | |
Jens Geyer | 4568792 | 2014-04-07 21:20:16 +0200 | [diff] [blame] | 20 | THRIFT = $(top_srcdir)/compiler/cpp/thrift -out gopath/src/ --gen go:thrift_import=thrift |
Jens Geyer | a7da488 | 2013-07-18 00:33:05 +0200 | [diff] [blame] | 21 | THRIFTTEST = $(top_srcdir)/test/ThriftTest.thrift |
| 22 | |
| 23 | # Thrift for GO has problems with complex map keys: THRIFT-2063 |
Jens Geyer | 20bcf38 | 2014-04-16 00:27:31 +0200 | [diff] [blame^] | 24 | gopath: $(top_srcdir)/compiler/cpp/thrift $(THRIFTTEST) \ |
| 25 | IncludesTest.thrift \ |
| 26 | NamespacedTest.thrift \ |
| 27 | OnewayTest.thrift |
Jens Geyer | a7da488 | 2013-07-18 00:33:05 +0200 | [diff] [blame] | 28 | mkdir -p gopath/src |
| 29 | grep -v list.*map.*list.*map $(THRIFTTEST) > ThriftTest.thrift |
Jens Geyer | 4568792 | 2014-04-07 21:20:16 +0200 | [diff] [blame] | 30 | $(THRIFT) -r IncludesTest.thrift |
| 31 | $(THRIFT) BinaryKeyTest.thrift |
Jens Geyer | c2ccca8 | 2014-04-14 22:36:50 +0200 | [diff] [blame] | 32 | $(THRIFT) OnewayTest.thrift |
Jens Geyer | a7da488 | 2013-07-18 00:33:05 +0200 | [diff] [blame] | 33 | ln -nfs ../../../thrift gopath/src/thrift |
Jens Geyer | 4568792 | 2014-04-07 21:20:16 +0200 | [diff] [blame] | 34 | ln -nfs ../../tests gopath/src/tests |
Jens Geyer | a7da488 | 2013-07-18 00:33:05 +0200 | [diff] [blame] | 35 | touch gopath |
| 36 | |
| 37 | check: gopath |
Jens Geyer | 4568792 | 2014-04-07 21:20:16 +0200 | [diff] [blame] | 38 | GOPATH=`pwd`/gopath $(GO) build IncludesTest BinaryKeyTest |
| 39 | GOPATH=`pwd`/gopath $(GO) test thrift tests |
Jens Geyer | a7da488 | 2013-07-18 00:33:05 +0200 | [diff] [blame] | 40 | |
| 41 | clean-local: |
Jens Geyer | 4568792 | 2014-04-07 21:20:16 +0200 | [diff] [blame] | 42 | $(RM) -r gopath ThriftTest.thrift |
Jens Geyer | a7da488 | 2013-07-18 00:33:05 +0200 | [diff] [blame] | 43 | |
| 44 | client: stubs |
| 45 | $(GO) run TestClient.go |
jfarrell | 32d323e | 2013-08-15 20:39:58 -0400 | [diff] [blame] | 46 | |
| 47 | EXTRA_DIST = \ |
| 48 | IncludesTest.thrift \ |
| 49 | NamespacedTest.thrift |