blob: 6274f29bf4ea98bffb23de8421c4539e0688ec13 [file] [log] [blame]
Jens Geyerbd52f1a2014-07-28 01:25:30 +02001#
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
Jens Geyerbd52f1a2014-07-28 01:25:30 +020020THRIFTCMD = $(THRIFT) --gen haxe -r
21THRIFTTEST = $(top_srcdir)/test/ThriftTest.thrift
22
23BIN_CPP = bin/Main-debug
Jens Geyer1d20a372016-03-15 23:04:27 +020024BIN_PHP = bin/php/Main-debug.php
Oleksii Prudkyi39a09ac2016-05-19 16:55:11 +030025BIN_PHP_WEB = bin/php-web-server/Main-debug.php
Jens Geyerbd52f1a2014-07-28 01:25:30 +020026
Jens Geyerfea00ac2014-10-01 02:22:48 +020027gen-haxe/thrift/test/ThriftTest.hx: $(THRIFTTEST)
Jens Geyerbd52f1a2014-07-28 01:25:30 +020028 $(THRIFTCMD) $(THRIFTTEST)
Jens Geyerfea00ac2014-10-01 02:22:48 +020029
Oleksii Prudkyi39a09ac2016-05-19 16:55:11 +030030all-local: $(BIN_CPP) $(BIN_PHP) $(BIN_PHP_WEB)
Jens Geyerfea00ac2014-10-01 02:22:48 +020031
Jens Geyerbbd6fd72015-05-30 19:33:44 +020032$(BIN_CPP): \
33 src/*.hx \
34 ../../lib/haxe/src/org/apache/thrift/**/*.hx \
35 gen-haxe/thrift/test/ThriftTest.hx
Jens Geyerbd52f1a2014-07-28 01:25:30 +020036 $(HAXE) --cwd . cpp.hxml
Jens Geyer2dcefad2021-02-25 09:42:52 +010037
38# $(HAXE) --cwd . csharp
39# $(HAXE) --cwd . flash
40# $(HAXE) --cwd . java
41# $(HAXE) --cwd . javascript
42# $(HAXE) --cwd . neko
43# $(HAXE) --cwd . python
Jens Geyerbd52f1a2014-07-28 01:25:30 +020044
Jens Geyer1d20a372016-03-15 23:04:27 +020045$(BIN_PHP): \
46 src/*.hx \
47 ../../lib/haxe/src/org/apache/thrift/**/*.hx \
48 gen-haxe/thrift/test/ThriftTest.hx
49 $(HAXE) --cwd . php.hxml
50
Oleksii Prudkyi39a09ac2016-05-19 16:55:11 +030051$(BIN_PHP_WEB): \
52 src/*.hx \
53 ../../lib/haxe/src/org/apache/thrift/**/*.hx \
54 gen-haxe/thrift/test/ThriftTest.hx
55 $(HAXE) --cwd . php-web-server.hxml
Jens Geyer1d20a372016-03-15 23:04:27 +020056
57
Jens Geyerfea00ac2014-10-01 02:22:48 +020058
Jens Geyerbd52f1a2014-07-28 01:25:30 +020059clean-local:
60 $(RM) -r gen-haxe bin
61
Oleksii Prudkyi39a09ac2016-05-19 16:55:11 +030062.NOTPARALLEL:
63
64check: check_cpp \
65 check_php \
66 check_php_web
Jens Geyer1d20a372016-03-15 23:04:27 +020067
68check_cpp: $(BIN_CPP)
Oleksii Prudkyi39a09ac2016-05-19 16:55:11 +030069 timeout 20 $(BIN_CPP) server &
Jens Geyerbd52f1a2014-07-28 01:25:30 +020070 sleep 1
71 $(BIN_CPP) client
Jens Geyer8c8e9c62014-12-29 19:52:47 +010072 sleep 10
Jens Geyerbd52f1a2014-07-28 01:25:30 +020073
Jens Geyer1d20a372016-03-15 23:04:27 +020074check_php: $(BIN_PHP)
Oleksii Prudkyi39a09ac2016-05-19 16:55:11 +030075 timeout 20 php -f $(BIN_PHP) server &
Jens Geyer1d20a372016-03-15 23:04:27 +020076 sleep 1
77 php -f $(BIN_PHP) client
78 sleep 10
79
Oleksii Prudkyi39a09ac2016-05-19 16:55:11 +030080check_php_web: $(BIN_PHP_WEB) $(BIN_CPP)
81 timeout 20 php -S 127.0.0.1:9090 router.php &
82 sleep 1
83 $(BIN_CPP) client --transport http
84 sleep 10
85
Jens Geyer1d20a372016-03-15 23:04:27 +020086
Thomas63f04582024-03-21 22:51:07 +090087distdir:
88 $(MAKE) $(AM_MAKEFLAGS) distdir-am
89
Jens Geyer65e9bde2014-11-11 01:30:02 +010090EXTRA_DIST = \
Jens Geyerf3a29742017-11-30 22:30:03 +010091 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 router.php \
101 project.hide \
102 php-web-server.hxml \
103 TestClientServer.hxproj \
104 make_all.bat \
105 make_all.sh