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 | |
| 20 | THRIFT = $(top_srcdir)/compiler/cpp/thrift |
| 21 | THRIFTTEST = $(top_srcdir)/test/ThriftTest.thrift |
| 22 | |
| 23 | # Thrift for GO has problems with complex map keys: THRIFT-2063 |
Jens Geyer | d1257de | 2013-07-31 13:03:26 +0200 | [diff] [blame^] | 24 | gopath: $(THRIFT) $(THRIFTTEST) IncludesTest.thrift NamespacedTest.thrift |
Jens Geyer | a7da488 | 2013-07-18 00:33:05 +0200 | [diff] [blame] | 25 | mkdir -p gopath/src |
| 26 | grep -v list.*map.*list.*map $(THRIFTTEST) > ThriftTest.thrift |
| 27 | $(THRIFT) --gen go:thrift_import=thrift -r IncludesTest.thrift |
| 28 | ln -nfs ../../gen-go/ThriftTest gopath/src/ThriftTest |
| 29 | ln -nfs ../../gen-go/IncludesTest gopath/src/IncludesTest |
Jens Geyer | d1257de | 2013-07-31 13:03:26 +0200 | [diff] [blame^] | 30 | ln -nfs ../../gen-go/lib gopath/src/lib |
Jens Geyer | a7da488 | 2013-07-18 00:33:05 +0200 | [diff] [blame] | 31 | ln -nfs ../../../thrift gopath/src/thrift |
| 32 | touch gopath |
| 33 | |
| 34 | check: gopath |
| 35 | GOPATH=`pwd`/gopath $(GO) build IncludesTest |
| 36 | |
| 37 | clean-local: |
| 38 | $(RM) -r gen-go gopath |
| 39 | |
| 40 | client: stubs |
| 41 | $(GO) run TestClient.go |