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 | # |
| 19 | |
David Reiss | 9ff3b9d | 2008-02-15 01:10:23 +0000 | [diff] [blame] | 20 | THRIFT = $(top_srcdir)/compiler/cpp/thrift |
| 21 | |
Roger Meier | f4eec7a | 2011-09-11 18:16:21 +0000 | [diff] [blame] | 22 | py_unit_tests = RunClientServer.py |
David Reiss | 9ff3b9d | 2008-02-15 01:10:23 +0000 | [diff] [blame] | 23 | |
| 24 | thrift_gen = \ |
David Reiss | 8cee47c | 2009-02-07 02:37:05 +0000 | [diff] [blame] | 25 | gen-py/ThriftTest/__init__.py \ |
Roger Meier | f4eec7a | 2011-09-11 18:16:21 +0000 | [diff] [blame] | 26 | gen-py/DebugProtoTest/__init__.py \ |
| 27 | gen-py-default/ThriftTest/__init__.py \ |
| 28 | gen-py-default/DebugProtoTest/__init__.py \ |
| 29 | gen-py-slots/ThriftTest/__init__.py \ |
| 30 | gen-py-slots/DebugProtoTest/__init__.py \ |
| 31 | gen-py-newstyle/ThriftTest/__init__.py \ |
| 32 | gen-py-newstyle/DebugProtoTest/__init__.py \ |
| 33 | gen-py-newstyleslots/ThriftTest/__init__.py \ |
| 34 | gen-py-newstyleslots/DebugProtoTest/__init__.py \ |
| 35 | gen-py-dynamic/ThriftTest/__init__.py \ |
| 36 | gen-py-dynamic/DebugProtoTest/__init__.py \ |
| 37 | gen-py-dynamicslots/ThriftTest/__init__.py \ |
| 38 | gen-py-dynamicslots/DebugProtoTest/__init__.py |
David Reiss | 9ff3b9d | 2008-02-15 01:10:23 +0000 | [diff] [blame] | 39 | |
| 40 | helper_scripts= \ |
| 41 | TestClient.py \ |
| 42 | TestServer.py |
| 43 | |
| 44 | check_SCRIPTS= \ |
Roger Meier | f4eec7a | 2011-09-11 18:16:21 +0000 | [diff] [blame] | 45 | $(thrift_gen) \ |
David Reiss | 9ff3b9d | 2008-02-15 01:10:23 +0000 | [diff] [blame] | 46 | $(py_unit_tests) \ |
| 47 | $(helper_scripts) |
| 48 | |
| 49 | TESTS= $(py_unit_tests) |
| 50 | |
| 51 | |
David Reiss | 8cee47c | 2009-02-07 02:37:05 +0000 | [diff] [blame] | 52 | gen-py/%/__init__.py: ../%.thrift |
Roger Meier | f4eec7a | 2011-09-11 18:16:21 +0000 | [diff] [blame] | 53 | $(THRIFT) --gen py $< |
| 54 | test -d gen-py-default || mkdir gen-py-default |
| 55 | $(THRIFT) --gen py -out gen-py-default $< |
| 56 | |
| 57 | gen-py-slots/%/__init__.py: ../%.thrift |
| 58 | test -d gen-py-slots || mkdir gen-py-slots |
| 59 | $(THRIFT) --gen py:slots -out gen-py-slots $< |
| 60 | |
| 61 | gen-py-newstyle/%/__init__.py: ../%.thrift |
| 62 | test -d gen-py-newstyle || mkdir gen-py-newstyle |
| 63 | $(THRIFT) --gen py:new_style -out gen-py-newstyle $< |
| 64 | |
| 65 | gen-py-newstyleslots/%/__init__.py: ../%.thrift |
| 66 | test -d gen-py-newstyleslots || mkdir gen-py-newstyleslots |
| 67 | $(THRIFT) --gen py:new_style,slots -out gen-py-newstyleslots $< |
| 68 | |
| 69 | gen-py-dynamic/%/__init__.py: ../%.thrift |
| 70 | test -d gen-py-dynamic || mkdir gen-py-dynamic |
| 71 | $(THRIFT) --gen py:dynamic -out gen-py-dynamic $< |
| 72 | |
| 73 | gen-py-dynamicslots/%/__init__.py: ../%.thrift |
| 74 | test -d gen-py-dynamicslots || mkdir gen-py-dynamicslots |
| 75 | $(THRIFT) --gen py:dynamic,slots -out gen-py-dynamicslots $< |
David Reiss | 9ff3b9d | 2008-02-15 01:10:23 +0000 | [diff] [blame] | 76 | |
| 77 | clean-local: |
Roger Meier | f4eec7a | 2011-09-11 18:16:21 +0000 | [diff] [blame] | 78 | $(RM) -r gen-py gen-py-slots gen-py-default gen-py-newstyle gen-py-newstyleslots gen-py-dynamic gen-py-dynamicslots |