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 | |
Yuxuan 'fishy' Wang | e8353cb | 2022-10-28 10:29:25 -0700 | [diff] [blame] | 22 | GOBUILDEXTRA = -buildvcs=false |
Yuxuan 'fishy' Wang | 8045d82 | 2022-04-19 14:31:39 -0700 | [diff] [blame] | 23 | |
Yuxuan 'fishy' Wang | b71f11e | 2021-03-22 15:01:00 -0700 | [diff] [blame] | 24 | THRIFTCMD = $(THRIFT) -out src/gen --gen go:thrift_import=github.com/apache/thrift/lib/go/thrift,package_prefix=github.com/apache/thrift/test/go/src/gen/$(COMPILER_EXTRAFLAG) |
Yuxuan 'fishy' Wang | 2acfe0f | 2022-10-21 10:27:40 -0700 | [diff] [blame] | 25 | THRIFTTEST = $(top_srcdir)/test/ThriftTest.thrift |
Jens Geyer | f459868 | 2014-05-08 23:18:44 +0200 | [diff] [blame] | 26 | |
Roger Meier | 41ad434 | 2015-03-24 22:30:40 +0100 | [diff] [blame] | 27 | precross: bin/testclient bin/testserver |
Jens Geyer | f459868 | 2014-05-08 23:18:44 +0200 | [diff] [blame] | 28 | |
| 29 | ThriftTest.thrift: $(THRIFTTEST) |
Jens Geyer | 79f988c | 2014-10-03 20:42:54 +0200 | [diff] [blame] | 30 | grep -v list.*map.*list.*map $(THRIFTTEST) > ThriftTest.thrift |
Jens Geyer | f459868 | 2014-05-08 23:18:44 +0200 | [diff] [blame] | 31 | |
D. Can Celasun | 4f77ab8 | 2017-09-21 15:21:00 +0200 | [diff] [blame] | 32 | .PHONY: gopath |
| 33 | |
Jens Geyer | f459868 | 2014-05-08 23:18:44 +0200 | [diff] [blame] | 34 | # Thrift for GO has problems with complex map keys: THRIFT-2063 |
jfarrell | 8fd8c63 | 2014-07-10 09:14:51 -0400 | [diff] [blame] | 35 | gopath: $(THRIFT) ThriftTest.thrift |
Jens Geyer | 79f988c | 2014-10-03 20:42:54 +0200 | [diff] [blame] | 36 | mkdir -p src/gen |
| 37 | $(THRIFTCMD) ThriftTest.thrift |
| 38 | $(THRIFTCMD) ../StressTest.thrift |
Yuxuan 'fishy' Wang | 2acfe0f | 2022-10-21 10:27:40 -0700 | [diff] [blame] | 39 | $(THRIFTCMD) ../ConstantsDemo.thrift |
Jens Geyer | 79f988c | 2014-10-03 20:42:54 +0200 | [diff] [blame] | 40 | touch gopath |
Jens Geyer | f459868 | 2014-05-08 23:18:44 +0200 | [diff] [blame] | 41 | |
| 42 | bin/testclient: gopath |
Yuxuan 'fishy' Wang | e8353cb | 2022-10-28 10:29:25 -0700 | [diff] [blame] | 43 | $(GO) build $(GOBUILDEXTRA) -o bin/testclient ./src/bin/testclient |
Jens Geyer | f459868 | 2014-05-08 23:18:44 +0200 | [diff] [blame] | 44 | |
| 45 | bin/testserver: gopath |
Yuxuan 'fishy' Wang | e8353cb | 2022-10-28 10:29:25 -0700 | [diff] [blame] | 46 | $(GO) build $(GOBUILDEXTRA) -o bin/testserver ./src/bin/testserver |
Jens Geyer | f459868 | 2014-05-08 23:18:44 +0200 | [diff] [blame] | 47 | |
| 48 | bin/stress: gopath |
Yuxuan 'fishy' Wang | e8353cb | 2022-10-28 10:29:25 -0700 | [diff] [blame] | 49 | $(GO) build $(GOBUILDEXTRA) -o bin/stress ./src/bin/stress |
Jens Geyer | f459868 | 2014-05-08 23:18:44 +0200 | [diff] [blame] | 50 | |
| 51 | clean-local: |
Jens Geyer | 8b47002 | 2015-06-19 21:22:57 +0200 | [diff] [blame] | 52 | $(RM) -r src/gen src/github.com/golang src/thrift bin pkg gopath ThriftTest.thrift |
Jens Geyer | f459868 | 2014-05-08 23:18:44 +0200 | [diff] [blame] | 53 | |
Roger Meier | 41ad434 | 2015-03-24 22:30:40 +0100 | [diff] [blame] | 54 | check_PROGRAMS: bin/testclient bin/testserver bin/stress |
| 55 | |
taozle | 5c302e0 | 2017-07-23 15:21:44 +0200 | [diff] [blame] | 56 | check: gopath genmock |
Yuxuan 'fishy' Wang | e8353cb | 2022-10-28 10:29:25 -0700 | [diff] [blame] | 57 | $(GO) test -v ./src/common/... |
| 58 | $(GO) test -v ./src/gen/... |
Jens Geyer | f459868 | 2014-05-08 23:18:44 +0200 | [diff] [blame] | 59 | |
| 60 | genmock: gopath |
D. Can Celasun | e0e1a08 | 2019-05-10 09:18:11 +0200 | [diff] [blame] | 61 | sh genmock.sh |
Jens Geyer | f459868 | 2014-05-08 23:18:44 +0200 | [diff] [blame] | 62 | |
Thomas | 63f0458 | 2024-03-21 22:51:07 +0900 | [diff] [blame] | 63 | distdir: |
| 64 | $(MAKE) $(AM_MAKEFLAGS) distdir-am |
| 65 | |
jfarrell | 8fd8c63 | 2014-07-10 09:14:51 -0400 | [diff] [blame] | 66 | EXTRA_DIST = \ |
Jens Geyer | 79f988c | 2014-10-03 20:42:54 +0200 | [diff] [blame] | 67 | src/bin \ |
Jens Geyer | 2ef0113 | 2021-02-04 22:41:50 +0100 | [diff] [blame] | 68 | src/common \ |
Jens Geyer | 0d0ac75 | 2024-03-12 21:49:28 +0100 | [diff] [blame] | 69 | go.mod \ |
| 70 | go.sum \ |
Jens Geyer | 2ef0113 | 2021-02-04 22:41:50 +0100 | [diff] [blame] | 71 | genmock.sh |