blob: ca8fa6402f29a3588d9444e901a3c0ee7bb8fb5e [file] [log] [blame]
Jens Geyera7da4882013-07-18 00:33:05 +02001#
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 Geyer45687922014-04-07 21:20:16 +020020THRIFT = $(top_srcdir)/compiler/cpp/thrift -out gopath/src/ --gen go:thrift_import=thrift
Jens Geyera7da4882013-07-18 00:33:05 +020021THRIFTTEST = $(top_srcdir)/test/ThriftTest.thrift
22
23# Thrift for GO has problems with complex map keys: THRIFT-2063
Jens Geyer20bcf382014-04-16 00:27:31 +020024gopath: $(top_srcdir)/compiler/cpp/thrift $(THRIFTTEST) \
25 IncludesTest.thrift \
26 NamespacedTest.thrift \
Jens Geyer751c97c2014-04-22 23:36:27 +020027 MultiplexedProtocolTest.thrift \
Jens Geyer20bcf382014-04-16 00:27:31 +020028 OnewayTest.thrift
Jens Geyera7da4882013-07-18 00:33:05 +020029 mkdir -p gopath/src
30 grep -v list.*map.*list.*map $(THRIFTTEST) > ThriftTest.thrift
Jens Geyer45687922014-04-07 21:20:16 +020031 $(THRIFT) -r IncludesTest.thrift
32 $(THRIFT) BinaryKeyTest.thrift
Jens Geyer751c97c2014-04-22 23:36:27 +020033 $(THRIFT) MultiplexedProtocolTest.thrift
Jens Geyerc2ccca82014-04-14 22:36:50 +020034 $(THRIFT) OnewayTest.thrift
Jens Geyera7da4882013-07-18 00:33:05 +020035 ln -nfs ../../../thrift gopath/src/thrift
Jens Geyer45687922014-04-07 21:20:16 +020036 ln -nfs ../../tests gopath/src/tests
Jens Geyera7da4882013-07-18 00:33:05 +020037 touch gopath
38
39check: gopath
Jens Geyer45687922014-04-07 21:20:16 +020040 GOPATH=`pwd`/gopath $(GO) build IncludesTest BinaryKeyTest
41 GOPATH=`pwd`/gopath $(GO) test thrift tests
Jens Geyera7da4882013-07-18 00:33:05 +020042
43clean-local:
Jens Geyer45687922014-04-07 21:20:16 +020044 $(RM) -r gopath ThriftTest.thrift
Jens Geyera7da4882013-07-18 00:33:05 +020045
46client: stubs
47 $(GO) run TestClient.go
jfarrell32d323e2013-08-15 20:39:58 -040048
49EXTRA_DIST = \
50 IncludesTest.thrift \
51 NamespacedTest.thrift