Jens Geyer | bd52f1a | 2014-07-28 01:25:30 +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 | |
Roger Meier | 41ad434 | 2015-03-24 22:30:40 +0100 | [diff] [blame] | 20 | THRIFT = $(top_builddir)/compiler/cpp/thrift |
Jens Geyer | bd52f1a | 2014-07-28 01:25:30 +0200 | [diff] [blame] | 21 | THRIFTCMD = $(THRIFT) --gen haxe -r |
| 22 | THRIFTTEST = $(top_srcdir)/test/ThriftTest.thrift |
| 23 | |
| 24 | BIN_CPP = bin/Main-debug |
Jens Geyer | 1d20a37 | 2016-03-15 23:04:27 +0200 | [diff] [blame] | 25 | BIN_PHP = bin/php/Main-debug.php |
Oleksii Prudkyi | 39a09ac | 2016-05-19 16:55:11 +0300 | [diff] [blame] | 26 | BIN_PHP_WEB = bin/php-web-server/Main-debug.php |
Jens Geyer | bd52f1a | 2014-07-28 01:25:30 +0200 | [diff] [blame] | 27 | |
Jens Geyer | fea00ac | 2014-10-01 02:22:48 +0200 | [diff] [blame] | 28 | gen-haxe/thrift/test/ThriftTest.hx: $(THRIFTTEST) |
Jens Geyer | bd52f1a | 2014-07-28 01:25:30 +0200 | [diff] [blame] | 29 | $(THRIFTCMD) $(THRIFTTEST) |
Jens Geyer | fea00ac | 2014-10-01 02:22:48 +0200 | [diff] [blame] | 30 | |
Oleksii Prudkyi | 39a09ac | 2016-05-19 16:55:11 +0300 | [diff] [blame] | 31 | all-local: $(BIN_CPP) $(BIN_PHP) $(BIN_PHP_WEB) |
Jens Geyer | fea00ac | 2014-10-01 02:22:48 +0200 | [diff] [blame] | 32 | |
Jens Geyer | bbd6fd7 | 2015-05-30 19:33:44 +0200 | [diff] [blame] | 33 | $(BIN_CPP): \ |
| 34 | src/*.hx \ |
| 35 | ../../lib/haxe/src/org/apache/thrift/**/*.hx \ |
| 36 | gen-haxe/thrift/test/ThriftTest.hx |
Jens Geyer | bd52f1a | 2014-07-28 01:25:30 +0200 | [diff] [blame] | 37 | $(HAXE) --cwd . cpp.hxml |
| 38 | |
Jens Geyer | 1d20a37 | 2016-03-15 23:04:27 +0200 | [diff] [blame] | 39 | $(BIN_PHP): \ |
| 40 | src/*.hx \ |
| 41 | ../../lib/haxe/src/org/apache/thrift/**/*.hx \ |
| 42 | gen-haxe/thrift/test/ThriftTest.hx |
| 43 | $(HAXE) --cwd . php.hxml |
| 44 | |
Oleksii Prudkyi | 39a09ac | 2016-05-19 16:55:11 +0300 | [diff] [blame] | 45 | $(BIN_PHP_WEB): \ |
| 46 | src/*.hx \ |
| 47 | ../../lib/haxe/src/org/apache/thrift/**/*.hx \ |
| 48 | gen-haxe/thrift/test/ThriftTest.hx |
| 49 | $(HAXE) --cwd . php-web-server.hxml |
Jens Geyer | 1d20a37 | 2016-03-15 23:04:27 +0200 | [diff] [blame] | 50 | |
| 51 | |
Jens Geyer | fea00ac | 2014-10-01 02:22:48 +0200 | [diff] [blame] | 52 | |
Jens Geyer | bd52f1a | 2014-07-28 01:25:30 +0200 | [diff] [blame] | 53 | #TODO: other haxe targets |
Jens Geyer | fea00ac | 2014-10-01 02:22:48 +0200 | [diff] [blame] | 54 | # $(HAXE) --cwd . csharp |
| 55 | # $(HAXE) --cwd . flash |
| 56 | # $(HAXE) --cwd . java |
| 57 | # $(HAXE) --cwd . javascript |
| 58 | # $(HAXE) --cwd . neko |
Jens Geyer | bbd6fd7 | 2015-05-30 19:33:44 +0200 | [diff] [blame] | 59 | # $(HAXE) --cwd . python # needs Haxe 3.2.0 |
Jens Geyer | bd52f1a | 2014-07-28 01:25:30 +0200 | [diff] [blame] | 60 | |
| 61 | |
| 62 | clean-local: |
| 63 | $(RM) -r gen-haxe bin |
| 64 | |
Oleksii Prudkyi | 39a09ac | 2016-05-19 16:55:11 +0300 | [diff] [blame] | 65 | .NOTPARALLEL: |
| 66 | |
| 67 | check: check_cpp \ |
| 68 | check_php \ |
| 69 | check_php_web |
Jens Geyer | 1d20a37 | 2016-03-15 23:04:27 +0200 | [diff] [blame] | 70 | |
| 71 | check_cpp: $(BIN_CPP) |
Oleksii Prudkyi | 39a09ac | 2016-05-19 16:55:11 +0300 | [diff] [blame] | 72 | timeout 20 $(BIN_CPP) server & |
Jens Geyer | bd52f1a | 2014-07-28 01:25:30 +0200 | [diff] [blame] | 73 | sleep 1 |
| 74 | $(BIN_CPP) client |
Jens Geyer | 8c8e9c6 | 2014-12-29 19:52:47 +0100 | [diff] [blame] | 75 | sleep 10 |
Jens Geyer | bd52f1a | 2014-07-28 01:25:30 +0200 | [diff] [blame] | 76 | |
Jens Geyer | 1d20a37 | 2016-03-15 23:04:27 +0200 | [diff] [blame] | 77 | check_php: $(BIN_PHP) |
Oleksii Prudkyi | 39a09ac | 2016-05-19 16:55:11 +0300 | [diff] [blame] | 78 | timeout 20 php -f $(BIN_PHP) server & |
Jens Geyer | 1d20a37 | 2016-03-15 23:04:27 +0200 | [diff] [blame] | 79 | sleep 1 |
| 80 | php -f $(BIN_PHP) client |
| 81 | sleep 10 |
| 82 | |
Oleksii Prudkyi | 39a09ac | 2016-05-19 16:55:11 +0300 | [diff] [blame] | 83 | check_php_web: $(BIN_PHP_WEB) $(BIN_CPP) |
| 84 | timeout 20 php -S 127.0.0.1:9090 router.php & |
| 85 | sleep 1 |
| 86 | $(BIN_CPP) client --transport http |
| 87 | sleep 10 |
| 88 | |
Jens Geyer | 1d20a37 | 2016-03-15 23:04:27 +0200 | [diff] [blame] | 89 | |
Jens Geyer | 65e9bde | 2014-11-11 01:30:02 +0100 | [diff] [blame] | 90 | EXTRA_DIST = \ |
| 91 | src \ |
| 92 | cpp.hxml \ |
| 93 | csharp.hxml \ |
| 94 | flash.hxml \ |
| 95 | java.hxml \ |
| 96 | javascript.hxml \ |
| 97 | neko.hxml \ |
| 98 | php.hxml \ |
| 99 | python.hxml \ |
| 100 | project.hide \ |
| 101 | TestClientServer.hxproj \ |
| 102 | make_all.bat \ |
| 103 | make_all.sh |