Skip to content

Commit 430e59f

Browse files
committed
1 parent 44733d2 commit 430e59f

File tree

9 files changed

+2036
-30
lines changed

9 files changed

+2036
-30
lines changed

.gitmodules

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
[submodule "third_party/tarantool-c"]
2-
path = third_party/tarantool-c
3-
url = https://github.com/tarantool/tarantool-c.git
41
[submodule "third_party/yajl"]
52
path = third_party/yajl
63
url = https://github.com/lloyd/yajl.git
4+
[submodule "third_party/msgpuck"]
5+
path = third_party/msgpuck
6+
url = https://github.com/rtsisyk/msgpuck.git

Makefile

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
CUR_PATH = $(shell pwd)
22
YAJL_PATH = $(CUR_PATH)/third_party/yajl
3-
TNTC_PATH = $(CUR_PATH)/third_party/tarantool-c
43

54
NGX_PATH = nginx
65
MODULE_PATH = $(CUR_PATH)
76
PREFIX_PATH = $(CUR_PATH)/test-root
87
INC_FLAGS = -I$(CUR_PATH)/third_party
9-
INC_FLAGS += -I$(TNTC_PATH)/src/msgpuck
10-
INC_FLAGS += -I$(YAJL_PATH)/build/yajl-2.1.0/include/
11-
YAJL_LIB = $(YAJL_PATH)/build/yajl-2.1.0/lib/libyajl_s.a
12-
LDFLAGS = -L$(YAJL_PATH)/build/yajl-2.1.0/lib/
8+
INC_FLAGS += -I$(YAJL_PATH)/build/yajl-2.1.0/include
9+
INC_FLAGS += -I$(CUR_PATH)/third_party/msgpuck
10+
YAJL_LIB = $(YAJL_PATH)/build/yajl-2.1.0/lib/libyajl_s.a
11+
LDFLAGS = -L$(YAJL_PATH)/build/yajl-2.1.0/lib
1312

14-
CFLAGS += -ggdb3 -O0 -Wall -Werror
13+
DEV_CFLAGS += -ggdb3 -O0 -Wall -Werror
1514

1615
.PHONY: all build
1716
all: build
@@ -21,20 +20,16 @@ yajl:
2120
ln -sf src third_party/yajl/yajl
2221
cd $(YAJL_PATH); ./configure; make distro
2322

24-
tarantool-c:
25-
cd $(TNTC_PATH)
26-
git submodule init
27-
git submodule update --recursive
28-
2923
build: utils
3024
$(MAKE) -C $(NGX_PATH)
3125

3226
configure-debug:
3327
cd $(NGX_PATH) && \
34-
CFLAGS=" -DMY_DEBUG -Wall -Werror -ggdb3 $(INC_FLAGS)" ./configure \
28+
CFLAGS=" -DMY_DEBUG -Wall -Werror -ggdb3 $(INC_FLAGS)" ./auto/configure \
3529
--prefix=$(PREFIX_PATH) \
3630
--add-module=$(MODULE_PATH) \
37-
--with-debug --with-ld-opt='$(LDFLAGS)'
31+
--with-debug \
32+
--with-ld-opt='$(LDFLAGS)'
3833
mkdir -p $(PREFIX_PATH)/conf $(PREFIX_PATH)/logs
3934
unlink $(PREFIX_PATH)/conf/nginx.conf > /dev/null || echo "pass"
4035
cp -Rf $(NGX_PATH)/conf/* $(PREFIX_PATH)/conf
@@ -43,19 +38,20 @@ configure-debug:
4338

4439
configure:
4540
cd $(NGX_PATH) && \
46-
./configure --with-cc-opt='$(INC_FLAGS)'\
41+
./auto/configure \
42+
--with-cc-opt='$(INC_FLAGS)'\
4743
--add-module='$(MODULE_PATH)'\
4844
--with-ld-opt='$(LDFLAGS)'
4945

5046
json2tp:
51-
$(CC) $(CFLAGS) $(INC_FLAGS) $(LDFLAGS) -I$(CUR_PATH) \
47+
$(CC) $(CFLAGS) $(DEV_CFLAGS) $(INC_FLAGS) $(LDFLAGS) -I$(CUR_PATH) \
5248
$(CUR_PATH)/misc/json2tp.c \
5349
tp_transcode.c \
5450
-o misc/json2tp \
5551
-lyajl_s
5652

5753
tp_dump:
58-
$(CC) $(CFLAGS) $(INC_FLAGS) $(LDFLAGS) -I$(CUR_PATH) \
54+
$(CC) $(CFLAGS) $(DEV_CFLAGS) $(INC_FLAGS) $(LDFLAGS) -I$(CUR_PATH) \
5955
$(CUR_PATH)/misc/tp_dump.c \
6056
tp_transcode.c \
6157
-o misc/tp_dump \
@@ -70,8 +66,8 @@ clean:
7066
rm -f misc/tp_{send,dump} misc/json2tp
7167

7268
utils: json2tp tp_dump
73-
build-all: yajl tarantool-c configure build utils
74-
build-all-debug: yajl tarantool-c configure-debug build utils
69+
build-all: yajl configure build utils
70+
build-all-debug: yajl configure-debug build utils
7571

7672
TAG = $(shell git describe --abbrev=0)
7773

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,7 @@ Gamma/Stable.
147147

148148
$ git clone https://github.com/tarantool/nginx_upstream_module.git nginx_upstream_module
149149
$ cd nginx_upstream_module
150-
$ git submodule init
151-
$ git submodule update --recursive
150+
$ git submodule update --init --recursive
152151
$ git clone https://github.com/nginx/nginx.git nginx
153152
$ make build-all # build-all-debug i.e. debug version
154153

config

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ CORE_INCS="$CORE_INCS $ngx_feature_path \
44
"
55

66
CORE_LIBS="$CORE_LIBS $ngx_feature_libs \
7-
$ngx_addon_dir/third_party/yajl/build/yajl-2.1.0/lib/libyajl_s.a"
7+
$ngx_addon_dir/third_party/yajl/build/yajl-2.1.0/lib/libyajl_s.a \
8+
"
89

910
HTTP_MODULES="$HTTP_MODULES \
1011
ngx_http_tnt_module \
@@ -15,6 +16,9 @@ NGX_ADDON_SRCS="$NGX_ADDON_SRCS \
1516
$ngx_addon_dir/tp_transcode.c \
1617
"
1718

18-
19-
CFLAGS="$CFLAGS -I$ngx_addon_dir -I$ngx_addon_dir/third_party \
20-
-I$ngx_addon_dir/third_party/yajl/build/yajl-2.1.0/include"
19+
CFLAGS="$CFLAGS \
20+
-I$ngx_addon_dir \
21+
-I$ngx_addon_dir/third_party \
22+
-I$ngx_addon_dir/third_party/msgpuck \
23+
-I$ngx_addon_dir/third_party/yajl/build/yajl-2.1.0/include \
24+
"

misc/tp_dump.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
#include <stdlib.h>
66
#include <getopt.h>
77

8-
#include <tarantool-c/src/tp.h>
8+
#define TP_H_AUTH_OFF 1
9+
#include "tp.h"
910
#include "tp_transcode.h"
1011

1112
void

third_party/msgpuck

Submodule msgpuck added at a3a1964

third_party/tarantool-c

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)