David Reiss | ea2cba8 | 2009-03-30 21:35:00 +0000 | [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 | # |
Roger Meier | 81a1f99 | 2014-10-22 14:09:43 +0200 | [diff] [blame] | 19 | AUTOMAKE_OPTIONS = serial-tests |
| 20 | |
Roger Meier | f4eec7a | 2011-09-11 18:16:21 +0000 | [diff] [blame] | 21 | py_unit_tests = RunClientServer.py |
David Reiss | 9ff3b9d | 2008-02-15 01:10:23 +0000 | [diff] [blame] | 22 | |
| 23 | thrift_gen = \ |
David Reiss | 8cee47c | 2009-02-07 02:37:05 +0000 | [diff] [blame] | 24 | gen-py/ThriftTest/__init__.py \ |
Roger Meier | f4eec7a | 2011-09-11 18:16:21 +0000 | [diff] [blame] | 25 | gen-py/DebugProtoTest/__init__.py \ |
Ozan Can Altiok | e46419b | 2018-03-20 15:02:28 +0300 | [diff] [blame] | 26 | gen-py/DoubleConstantsTest/__init__.py \ |
Eric Conner | c34653f | 2017-06-21 03:34:12 +0200 | [diff] [blame] | 27 | gen-py/Recursive/__init__.py \ |
Roger Meier | f4eec7a | 2011-09-11 18:16:21 +0000 | [diff] [blame] | 28 | gen-py-default/ThriftTest/__init__.py \ |
| 29 | gen-py-default/DebugProtoTest/__init__.py \ |
Ozan Can Altiok | e46419b | 2018-03-20 15:02:28 +0300 | [diff] [blame] | 30 | gen-py-default/DoubleConstantsTest/__init__.py \ |
Eric Conner | c34653f | 2017-06-21 03:34:12 +0200 | [diff] [blame] | 31 | gen-py-default/Recursive/__init__.py \ |
Roger Meier | f4eec7a | 2011-09-11 18:16:21 +0000 | [diff] [blame] | 32 | gen-py-slots/ThriftTest/__init__.py \ |
| 33 | gen-py-slots/DebugProtoTest/__init__.py \ |
Ozan Can Altiok | e46419b | 2018-03-20 15:02:28 +0300 | [diff] [blame] | 34 | gen-py-slots/DoubleConstantsTest/__init__.py \ |
Eric Conner | c34653f | 2017-06-21 03:34:12 +0200 | [diff] [blame] | 35 | gen-py-slots/Recursive/__init__.py \ |
Nobuaki Sukegawa | b78d781 | 2015-12-24 00:01:26 +0900 | [diff] [blame] | 36 | gen-py-oldstyle/ThriftTest/__init__.py \ |
| 37 | gen-py-oldstyle/DebugProtoTest/__init__.py \ |
Ozan Can Altiok | e46419b | 2018-03-20 15:02:28 +0300 | [diff] [blame] | 38 | gen-py-oldstyle/DoubleConstantsTest/__init__.py \ |
Eric Conner | c34653f | 2017-06-21 03:34:12 +0200 | [diff] [blame] | 39 | gen-py-oldstyle/Recursive/__init__.py \ |
Nobuaki Sukegawa | a3b88a0 | 2016-01-06 20:44:17 +0900 | [diff] [blame] | 40 | gen-py-no_utf8strings/ThriftTest/__init__.py \ |
| 41 | gen-py-no_utf8strings/DebugProtoTest/__init__.py \ |
Ozan Can Altiok | e46419b | 2018-03-20 15:02:28 +0300 | [diff] [blame] | 42 | gen-py-no_utf8strings/DoubleConstantsTest/__init__.py \ |
Eric Conner | c34653f | 2017-06-21 03:34:12 +0200 | [diff] [blame] | 43 | gen-py-no_utf8strings/Recursive/__init__.py \ |
Roger Meier | f4eec7a | 2011-09-11 18:16:21 +0000 | [diff] [blame] | 44 | gen-py-dynamic/ThriftTest/__init__.py \ |
| 45 | gen-py-dynamic/DebugProtoTest/__init__.py \ |
Ozan Can Altiok | e46419b | 2018-03-20 15:02:28 +0300 | [diff] [blame] | 46 | gen-py-dynamic/DoubleConstantsTest/__init__.py \ |
Eric Conner | c34653f | 2017-06-21 03:34:12 +0200 | [diff] [blame] | 47 | gen-py-dynamic/Recursive/__init__.py \ |
Roger Meier | f4eec7a | 2011-09-11 18:16:21 +0000 | [diff] [blame] | 48 | gen-py-dynamicslots/ThriftTest/__init__.py \ |
Eric Conner | c34653f | 2017-06-21 03:34:12 +0200 | [diff] [blame] | 49 | gen-py-dynamicslots/DebugProtoTest/__init__.py \ |
Ozan Can Altiok | e46419b | 2018-03-20 15:02:28 +0300 | [diff] [blame] | 50 | gen-py-dynamicslots/DoubleConstantsTest/__init__.py \ |
Kevin Wojniak | b8920b0 | 2022-03-03 20:09:53 -0800 | [diff] [blame] | 51 | gen-py-dynamicslots/Recursive/__init__.py \ |
| 52 | gen-py-enum/ThriftTest/__init__.py \ |
| 53 | gen-py-enum/DebugProtoTest/__init__.py \ |
| 54 | gen-py-enum/DoubleConstantsTest/__init__.py \ |
| 55 | gen-py-enum/Recursive/__init__.py |
Eric Conner | c34653f | 2017-06-21 03:34:12 +0200 | [diff] [blame] | 56 | |
David Reiss | 9ff3b9d | 2008-02-15 01:10:23 +0000 | [diff] [blame] | 57 | |
Randy Abernethy | 983bf7d | 2015-10-09 12:28:57 -0700 | [diff] [blame] | 58 | precross: $(thrift_gen) |
Nobuaki Sukegawa | ef0a8fa | 2015-05-10 20:21:17 +0900 | [diff] [blame] | 59 | BUILT_SOURCES = $(thrift_gen) |
Roger Meier | 41ad434 | 2015-03-24 22:30:40 +0100 | [diff] [blame] | 60 | |
David Reiss | 9ff3b9d | 2008-02-15 01:10:23 +0000 | [diff] [blame] | 61 | helper_scripts= \ |
| 62 | TestClient.py \ |
| 63 | TestServer.py |
| 64 | |
| 65 | check_SCRIPTS= \ |
Roger Meier | f4eec7a | 2011-09-11 18:16:21 +0000 | [diff] [blame] | 66 | $(thrift_gen) \ |
David Reiss | 9ff3b9d | 2008-02-15 01:10:23 +0000 | [diff] [blame] | 67 | $(py_unit_tests) \ |
| 68 | $(helper_scripts) |
| 69 | |
| 70 | TESTS= $(py_unit_tests) |
| 71 | |
| 72 | |
Randy Abernethy | 983bf7d | 2015-10-09 12:28:57 -0700 | [diff] [blame] | 73 | gen-py/%/__init__.py: ../%.thrift $(THRIFT) |
Jens Geyer | f066d84 | 2022-06-13 23:37:25 +0200 | [diff] [blame] | 74 | test -f ../v0.16/$(notdir $<) \ |
| 75 | && $(THRIFT) --gen py ../v0.16/$(notdir $<) \ |
| 76 | || $(THRIFT) --gen py $< |
Roger Meier | 41ad434 | 2015-03-24 22:30:40 +0100 | [diff] [blame] | 77 | |
Randy Abernethy | 983bf7d | 2015-10-09 12:28:57 -0700 | [diff] [blame] | 78 | gen-py-default/%/__init__.py: ../%.thrift $(THRIFT) |
Roger Meier | 41ad434 | 2015-03-24 22:30:40 +0100 | [diff] [blame] | 79 | test -d gen-py-default || $(MKDIR_P) gen-py-default |
Jens Geyer | f066d84 | 2022-06-13 23:37:25 +0200 | [diff] [blame] | 80 | test -f ../v0.16/$(notdir $<) \ |
| 81 | && $(THRIFT) --gen py -out gen-py-default ../v0.16/$(notdir $<) \ |
| 82 | || $(THRIFT) --gen py -out gen-py-default $< |
Roger Meier | f4eec7a | 2011-09-11 18:16:21 +0000 | [diff] [blame] | 83 | |
Randy Abernethy | 983bf7d | 2015-10-09 12:28:57 -0700 | [diff] [blame] | 84 | gen-py-slots/%/__init__.py: ../%.thrift $(THRIFT) |
Roger Meier | 41ad434 | 2015-03-24 22:30:40 +0100 | [diff] [blame] | 85 | test -d gen-py-slots || $(MKDIR_P) gen-py-slots |
Jens Geyer | f066d84 | 2022-06-13 23:37:25 +0200 | [diff] [blame] | 86 | test ../v0.16/$(notdir $<) \ |
| 87 | && $(THRIFT) --gen py:slots -out gen-py-slots ../v0.16/$(notdir $<) \ |
| 88 | || $(THRIFT) --gen py:slots -out gen-py-slots $< |
Roger Meier | f4eec7a | 2011-09-11 18:16:21 +0000 | [diff] [blame] | 89 | |
Nobuaki Sukegawa | b78d781 | 2015-12-24 00:01:26 +0900 | [diff] [blame] | 90 | gen-py-oldstyle/%/__init__.py: ../%.thrift $(THRIFT) |
| 91 | test -d gen-py-oldstyle || $(MKDIR_P) gen-py-oldstyle |
Jens Geyer | f066d84 | 2022-06-13 23:37:25 +0200 | [diff] [blame] | 92 | test ../v0.16/$(notdir $<) \ |
| 93 | && $(THRIFT) --gen py:old_style -out gen-py-oldstyle ../v0.16/$(notdir $<) \ |
| 94 | || $(THRIFT) --gen py:old_style -out gen-py-oldstyle $< |
Roger Meier | f4eec7a | 2011-09-11 18:16:21 +0000 | [diff] [blame] | 95 | |
Nobuaki Sukegawa | a3b88a0 | 2016-01-06 20:44:17 +0900 | [diff] [blame] | 96 | gen-py-no_utf8strings/%/__init__.py: ../%.thrift $(THRIFT) |
| 97 | test -d gen-py-no_utf8strings || $(MKDIR_P) gen-py-no_utf8strings |
Jens Geyer | f066d84 | 2022-06-13 23:37:25 +0200 | [diff] [blame] | 98 | test ../v0.16/$(notdir $<) \ |
| 99 | && $(THRIFT) --gen py:no_utf8strings -out gen-py-no_utf8strings ../v0.16/$(notdir $<) \ |
| 100 | || $(THRIFT) --gen py:no_utf8strings -out gen-py-no_utf8strings $< |
Roger Meier | f4eec7a | 2011-09-11 18:16:21 +0000 | [diff] [blame] | 101 | |
Randy Abernethy | 983bf7d | 2015-10-09 12:28:57 -0700 | [diff] [blame] | 102 | gen-py-dynamic/%/__init__.py: ../%.thrift $(THRIFT) |
Roger Meier | 41ad434 | 2015-03-24 22:30:40 +0100 | [diff] [blame] | 103 | test -d gen-py-dynamic || $(MKDIR_P) gen-py-dynamic |
Jens Geyer | f066d84 | 2022-06-13 23:37:25 +0200 | [diff] [blame] | 104 | test ../v0.16/$(notdir $<) \ |
| 105 | && $(THRIFT) --gen py:dynamic -out gen-py-dynamic ../v0.16/$(notdir $<) \ |
| 106 | || $(THRIFT) --gen py:dynamic -out gen-py-dynamic $< |
Roger Meier | f4eec7a | 2011-09-11 18:16:21 +0000 | [diff] [blame] | 107 | |
Randy Abernethy | 983bf7d | 2015-10-09 12:28:57 -0700 | [diff] [blame] | 108 | gen-py-dynamicslots/%/__init__.py: ../%.thrift $(THRIFT) |
Roger Meier | 41ad434 | 2015-03-24 22:30:40 +0100 | [diff] [blame] | 109 | test -d gen-py-dynamicslots || $(MKDIR_P) gen-py-dynamicslots |
Jens Geyer | f066d84 | 2022-06-13 23:37:25 +0200 | [diff] [blame] | 110 | test ../v0.16/$(notdir $<) \ |
| 111 | && $(THRIFT) --gen py:dynamic,slots -out gen-py-dynamicslots ../v0.16/$(notdir $<) \ |
| 112 | || $(THRIFT) --gen py:dynamic,slots -out gen-py-dynamicslots $< |
David Reiss | 9ff3b9d | 2008-02-15 01:10:23 +0000 | [diff] [blame] | 113 | |
Kevin Wojniak | b8920b0 | 2022-03-03 20:09:53 -0800 | [diff] [blame] | 114 | gen-py-enum/%/__init__.py: ../%.thrift $(THRIFT) |
| 115 | test -d gen-py-enum || $(MKDIR_P) gen-py-enum |
Jens Geyer | f066d84 | 2022-06-13 23:37:25 +0200 | [diff] [blame] | 116 | test ../v0.16/$(notdir $<) \ |
| 117 | && $(THRIFT) --gen py:enum -out gen-py-enum ../v0.16/$(notdir $<) \ |
| 118 | || $(THRIFT) --gen py:enum -out gen-py-enum $< |
Kevin Wojniak | b8920b0 | 2022-03-03 20:09:53 -0800 | [diff] [blame] | 119 | |
David Reiss | 9ff3b9d | 2008-02-15 01:10:23 +0000 | [diff] [blame] | 120 | clean-local: |
James E. King III | b96c438 | 2019-01-24 17:45:07 -0500 | [diff] [blame] | 121 | $(RM) -r build |
| 122 | find . -type f \( -iname "*.pyc" \) | xargs rm -f |
| 123 | find . -type d \( -iname "__pycache__" -or -iname "_trial_temp" \) | xargs rm -rf |
| 124 | $(RM) -r gen-py*/ |
| 125 | |
| 126 | dist-hook: |
| 127 | find $(distdir) -type f \( -iname "*.pyc" \) | xargs rm -f |
| 128 | find $(distdir) -type d \( -iname "__pycache__" -or -iname "_trial_temp" \) | xargs rm -rf |
| 129 | $(RM) -r $(distdir)/gen-py*/ |