blob: e02607758bd92620391432dcbee86fa35fb9dd09 [file] [log] [blame]
David Reissea2cba82009-03-30 21:35:00 +00001#
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 Meier81a1f992014-10-22 14:09:43 +020019AUTOMAKE_OPTIONS = serial-tests
20
Roger Meierf4eec7a2011-09-11 18:16:21 +000021py_unit_tests = RunClientServer.py
David Reiss9ff3b9d2008-02-15 01:10:23 +000022
23thrift_gen = \
David Reiss8cee47c2009-02-07 02:37:05 +000024 gen-py/ThriftTest/__init__.py \
Roger Meierf4eec7a2011-09-11 18:16:21 +000025 gen-py/DebugProtoTest/__init__.py \
Ozan Can Altioke46419b2018-03-20 15:02:28 +030026 gen-py/DoubleConstantsTest/__init__.py \
Eric Connerc34653f2017-06-21 03:34:12 +020027 gen-py/Recursive/__init__.py \
Roger Meierf4eec7a2011-09-11 18:16:21 +000028 gen-py-default/ThriftTest/__init__.py \
29 gen-py-default/DebugProtoTest/__init__.py \
Ozan Can Altioke46419b2018-03-20 15:02:28 +030030 gen-py-default/DoubleConstantsTest/__init__.py \
Eric Connerc34653f2017-06-21 03:34:12 +020031 gen-py-default/Recursive/__init__.py \
Roger Meierf4eec7a2011-09-11 18:16:21 +000032 gen-py-slots/ThriftTest/__init__.py \
33 gen-py-slots/DebugProtoTest/__init__.py \
Ozan Can Altioke46419b2018-03-20 15:02:28 +030034 gen-py-slots/DoubleConstantsTest/__init__.py \
Eric Connerc34653f2017-06-21 03:34:12 +020035 gen-py-slots/Recursive/__init__.py \
Nobuaki Sukegawab78d7812015-12-24 00:01:26 +090036 gen-py-oldstyle/ThriftTest/__init__.py \
37 gen-py-oldstyle/DebugProtoTest/__init__.py \
Ozan Can Altioke46419b2018-03-20 15:02:28 +030038 gen-py-oldstyle/DoubleConstantsTest/__init__.py \
Eric Connerc34653f2017-06-21 03:34:12 +020039 gen-py-oldstyle/Recursive/__init__.py \
Nobuaki Sukegawaa3b88a02016-01-06 20:44:17 +090040 gen-py-no_utf8strings/ThriftTest/__init__.py \
41 gen-py-no_utf8strings/DebugProtoTest/__init__.py \
Ozan Can Altioke46419b2018-03-20 15:02:28 +030042 gen-py-no_utf8strings/DoubleConstantsTest/__init__.py \
Eric Connerc34653f2017-06-21 03:34:12 +020043 gen-py-no_utf8strings/Recursive/__init__.py \
Roger Meierf4eec7a2011-09-11 18:16:21 +000044 gen-py-dynamic/ThriftTest/__init__.py \
45 gen-py-dynamic/DebugProtoTest/__init__.py \
Ozan Can Altioke46419b2018-03-20 15:02:28 +030046 gen-py-dynamic/DoubleConstantsTest/__init__.py \
Eric Connerc34653f2017-06-21 03:34:12 +020047 gen-py-dynamic/Recursive/__init__.py \
Roger Meierf4eec7a2011-09-11 18:16:21 +000048 gen-py-dynamicslots/ThriftTest/__init__.py \
Eric Connerc34653f2017-06-21 03:34:12 +020049 gen-py-dynamicslots/DebugProtoTest/__init__.py \
Ozan Can Altioke46419b2018-03-20 15:02:28 +030050 gen-py-dynamicslots/DoubleConstantsTest/__init__.py \
Kevin Wojniakb8920b02022-03-03 20:09:53 -080051 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 Connerc34653f2017-06-21 03:34:12 +020056
Thomas63f04582024-03-21 22:51:07 +090057distdir:
58 $(MAKE) $(AM_MAKEFLAGS) distdir-am
David Reiss9ff3b9d2008-02-15 01:10:23 +000059
Randy Abernethy983bf7d2015-10-09 12:28:57 -070060precross: $(thrift_gen)
Nobuaki Sukegawaef0a8fa2015-05-10 20:21:17 +090061BUILT_SOURCES = $(thrift_gen)
Roger Meier41ad4342015-03-24 22:30:40 +010062
David Reiss9ff3b9d2008-02-15 01:10:23 +000063helper_scripts= \
64 TestClient.py \
65 TestServer.py
66
67check_SCRIPTS= \
Roger Meierf4eec7a2011-09-11 18:16:21 +000068 $(thrift_gen) \
David Reiss9ff3b9d2008-02-15 01:10:23 +000069 $(py_unit_tests) \
70 $(helper_scripts)
71
72TESTS= $(py_unit_tests)
73
74
Randy Abernethy983bf7d2015-10-09 12:28:57 -070075gen-py/%/__init__.py: ../%.thrift $(THRIFT)
Jens Geyerf066d842022-06-13 23:37:25 +020076 test -f ../v0.16/$(notdir $<) \
77 && $(THRIFT) --gen py ../v0.16/$(notdir $<) \
78 || $(THRIFT) --gen py $<
Roger Meier41ad4342015-03-24 22:30:40 +010079
Randy Abernethy983bf7d2015-10-09 12:28:57 -070080gen-py-default/%/__init__.py: ../%.thrift $(THRIFT)
Roger Meier41ad4342015-03-24 22:30:40 +010081 test -d gen-py-default || $(MKDIR_P) gen-py-default
Jens Geyerf066d842022-06-13 23:37:25 +020082 test -f ../v0.16/$(notdir $<) \
83 && $(THRIFT) --gen py -out gen-py-default ../v0.16/$(notdir $<) \
84 || $(THRIFT) --gen py -out gen-py-default $<
Roger Meierf4eec7a2011-09-11 18:16:21 +000085
Randy Abernethy983bf7d2015-10-09 12:28:57 -070086gen-py-slots/%/__init__.py: ../%.thrift $(THRIFT)
Roger Meier41ad4342015-03-24 22:30:40 +010087 test -d gen-py-slots || $(MKDIR_P) gen-py-slots
Jens Geyerf066d842022-06-13 23:37:25 +020088 test ../v0.16/$(notdir $<) \
89 && $(THRIFT) --gen py:slots -out gen-py-slots ../v0.16/$(notdir $<) \
90 || $(THRIFT) --gen py:slots -out gen-py-slots $<
Roger Meierf4eec7a2011-09-11 18:16:21 +000091
Nobuaki Sukegawab78d7812015-12-24 00:01:26 +090092gen-py-oldstyle/%/__init__.py: ../%.thrift $(THRIFT)
93 test -d gen-py-oldstyle || $(MKDIR_P) gen-py-oldstyle
Jens Geyerf066d842022-06-13 23:37:25 +020094 test ../v0.16/$(notdir $<) \
95 && $(THRIFT) --gen py:old_style -out gen-py-oldstyle ../v0.16/$(notdir $<) \
96 || $(THRIFT) --gen py:old_style -out gen-py-oldstyle $<
Roger Meierf4eec7a2011-09-11 18:16:21 +000097
Nobuaki Sukegawaa3b88a02016-01-06 20:44:17 +090098gen-py-no_utf8strings/%/__init__.py: ../%.thrift $(THRIFT)
99 test -d gen-py-no_utf8strings || $(MKDIR_P) gen-py-no_utf8strings
Jens Geyerf066d842022-06-13 23:37:25 +0200100 test ../v0.16/$(notdir $<) \
101 && $(THRIFT) --gen py:no_utf8strings -out gen-py-no_utf8strings ../v0.16/$(notdir $<) \
102 || $(THRIFT) --gen py:no_utf8strings -out gen-py-no_utf8strings $<
Roger Meierf4eec7a2011-09-11 18:16:21 +0000103
Randy Abernethy983bf7d2015-10-09 12:28:57 -0700104gen-py-dynamic/%/__init__.py: ../%.thrift $(THRIFT)
Roger Meier41ad4342015-03-24 22:30:40 +0100105 test -d gen-py-dynamic || $(MKDIR_P) gen-py-dynamic
Jens Geyerf066d842022-06-13 23:37:25 +0200106 test ../v0.16/$(notdir $<) \
107 && $(THRIFT) --gen py:dynamic -out gen-py-dynamic ../v0.16/$(notdir $<) \
108 || $(THRIFT) --gen py:dynamic -out gen-py-dynamic $<
Roger Meierf4eec7a2011-09-11 18:16:21 +0000109
Randy Abernethy983bf7d2015-10-09 12:28:57 -0700110gen-py-dynamicslots/%/__init__.py: ../%.thrift $(THRIFT)
Roger Meier41ad4342015-03-24 22:30:40 +0100111 test -d gen-py-dynamicslots || $(MKDIR_P) gen-py-dynamicslots
Jens Geyerf066d842022-06-13 23:37:25 +0200112 test ../v0.16/$(notdir $<) \
113 && $(THRIFT) --gen py:dynamic,slots -out gen-py-dynamicslots ../v0.16/$(notdir $<) \
114 || $(THRIFT) --gen py:dynamic,slots -out gen-py-dynamicslots $<
David Reiss9ff3b9d2008-02-15 01:10:23 +0000115
Kevin Wojniakb8920b02022-03-03 20:09:53 -0800116gen-py-enum/%/__init__.py: ../%.thrift $(THRIFT)
117 test -d gen-py-enum || $(MKDIR_P) gen-py-enum
Jens Geyerf066d842022-06-13 23:37:25 +0200118 test ../v0.16/$(notdir $<) \
119 && $(THRIFT) --gen py:enum -out gen-py-enum ../v0.16/$(notdir $<) \
120 || $(THRIFT) --gen py:enum -out gen-py-enum $<
Kevin Wojniakb8920b02022-03-03 20:09:53 -0800121
David Reiss9ff3b9d2008-02-15 01:10:23 +0000122clean-local:
James E. King IIIb96c4382019-01-24 17:45:07 -0500123 $(RM) -r build
124 find . -type f \( -iname "*.pyc" \) | xargs rm -f
125 find . -type d \( -iname "__pycache__" -or -iname "_trial_temp" \) | xargs rm -rf
126 $(RM) -r gen-py*/
127
128dist-hook:
129 find $(distdir) -type f \( -iname "*.pyc" \) | xargs rm -f
130 find $(distdir) -type d \( -iname "__pycache__" -or -iname "_trial_temp" \) | xargs rm -rf
131 $(RM) -r $(distdir)/gen-py*/