blob: d3f0a7da1428e576b24333fdaf7c01d907c2b7e9 [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 Meier41ad4342015-03-24 22:30:40 +010021THRIFT = $(top_builddir)/compiler/cpp/thrift
David Reiss9ff3b9d2008-02-15 01:10:23 +000022
Roger Meierf4eec7a2011-09-11 18:16:21 +000023py_unit_tests = RunClientServer.py
David Reiss9ff3b9d2008-02-15 01:10:23 +000024
25thrift_gen = \
David Reiss8cee47c2009-02-07 02:37:05 +000026 gen-py/ThriftTest/__init__.py \
Roger Meierf4eec7a2011-09-11 18:16:21 +000027 gen-py/DebugProtoTest/__init__.py \
28 gen-py-default/ThriftTest/__init__.py \
29 gen-py-default/DebugProtoTest/__init__.py \
30 gen-py-slots/ThriftTest/__init__.py \
31 gen-py-slots/DebugProtoTest/__init__.py \
32 gen-py-newstyle/ThriftTest/__init__.py \
33 gen-py-newstyle/DebugProtoTest/__init__.py \
34 gen-py-newstyleslots/ThriftTest/__init__.py \
35 gen-py-newstyleslots/DebugProtoTest/__init__.py \
36 gen-py-dynamic/ThriftTest/__init__.py \
37 gen-py-dynamic/DebugProtoTest/__init__.py \
38 gen-py-dynamicslots/ThriftTest/__init__.py \
39 gen-py-dynamicslots/DebugProtoTest/__init__.py
David Reiss9ff3b9d2008-02-15 01:10:23 +000040
Roger Meier41ad4342015-03-24 22:30:40 +010041precross: $(THRIFT) $(thrift_gen)
Nobuaki Sukegawaef0a8fa2015-05-10 20:21:17 +090042BUILT_SOURCES = $(thrift_gen)
Roger Meier41ad4342015-03-24 22:30:40 +010043
David Reiss9ff3b9d2008-02-15 01:10:23 +000044helper_scripts= \
45 TestClient.py \
46 TestServer.py
47
48check_SCRIPTS= \
Roger Meierf4eec7a2011-09-11 18:16:21 +000049 $(thrift_gen) \
David Reiss9ff3b9d2008-02-15 01:10:23 +000050 $(py_unit_tests) \
51 $(helper_scripts)
52
53TESTS= $(py_unit_tests)
54
55
David Reiss8cee47c2009-02-07 02:37:05 +000056gen-py/%/__init__.py: ../%.thrift
Jens Geyer79f988c2014-10-03 20:42:54 +020057 $(THRIFT) --gen py $<
Roger Meier41ad4342015-03-24 22:30:40 +010058
59gen-py-default/%/__init__.py: ../%.thrift
60 test -d gen-py-default || $(MKDIR_P) gen-py-default
Jens Geyer79f988c2014-10-03 20:42:54 +020061 $(THRIFT) --gen py -out gen-py-default $<
Roger Meierf4eec7a2011-09-11 18:16:21 +000062
63gen-py-slots/%/__init__.py: ../%.thrift
Roger Meier41ad4342015-03-24 22:30:40 +010064 test -d gen-py-slots || $(MKDIR_P) gen-py-slots
Jens Geyer79f988c2014-10-03 20:42:54 +020065 $(THRIFT) --gen py:slots -out gen-py-slots $<
Roger Meierf4eec7a2011-09-11 18:16:21 +000066
67gen-py-newstyle/%/__init__.py: ../%.thrift
Roger Meier41ad4342015-03-24 22:30:40 +010068 test -d gen-py-newstyle || $(MKDIR_P) gen-py-newstyle
Jens Geyer79f988c2014-10-03 20:42:54 +020069 $(THRIFT) --gen py:new_style -out gen-py-newstyle $<
Roger Meierf4eec7a2011-09-11 18:16:21 +000070
71gen-py-newstyleslots/%/__init__.py: ../%.thrift
Roger Meier41ad4342015-03-24 22:30:40 +010072 test -d gen-py-newstyleslots || $(MKDIR_P) gen-py-newstyleslots
Jens Geyer79f988c2014-10-03 20:42:54 +020073 $(THRIFT) --gen py:new_style,slots -out gen-py-newstyleslots $<
Roger Meierf4eec7a2011-09-11 18:16:21 +000074
75gen-py-dynamic/%/__init__.py: ../%.thrift
Roger Meier41ad4342015-03-24 22:30:40 +010076 test -d gen-py-dynamic || $(MKDIR_P) gen-py-dynamic
Jens Geyer79f988c2014-10-03 20:42:54 +020077 $(THRIFT) --gen py:dynamic -out gen-py-dynamic $<
Roger Meierf4eec7a2011-09-11 18:16:21 +000078
79gen-py-dynamicslots/%/__init__.py: ../%.thrift
Roger Meier41ad4342015-03-24 22:30:40 +010080 test -d gen-py-dynamicslots || $(MKDIR_P) gen-py-dynamicslots
Jens Geyer79f988c2014-10-03 20:42:54 +020081 $(THRIFT) --gen py:dynamic,slots -out gen-py-dynamicslots $<
David Reiss9ff3b9d2008-02-15 01:10:23 +000082
83clean-local:
Jens Geyer79f988c2014-10-03 20:42:54 +020084 $(RM) -r gen-py gen-py-slots gen-py-default gen-py-newstyle gen-py-newstyleslots gen-py-dynamic gen-py-dynamicslots