@@ -2,8 +2,13 @@ export PATH := $(PWD)/t/build/sbin:$(PWD)/t/build/bin:$(PATH)
2
2
export PERL5LIB := $(PWD ) /t/build/lib/perl5
3
3
export UNBOUND_PID := $(PWD ) /t/build/etc/unbound/unbound.pid
4
4
5
- nginx =nginx-1.7.7
6
- nginx_url =http://nginx.org/download/$(nginx ) .tar.gz
5
+ unbound_version =1.4.22
6
+ lua_jit_version =2.0.3
7
+ lua_nginx_module_version =0.9.13rc1
8
+ lua_upstream_nginx_module_version =0.02
9
+ nginx_version =1.7.7
10
+ nginx_no_pool_version? =$(nginx_version )
11
+ nginx_url =http://nginx.org/download/nginx-$(nginx_version ) .tar.gz
7
12
8
13
clean :
9
14
rm -rf t/build t/servroot t/tmp
@@ -38,75 +43,78 @@ t/build/lib/perl5: t/tmp/cpanm
38
43
$< -L t/build --notest https://github.com/openresty/test-nginx/archive/8d5c8668364251cdae01ccf1ef933d80b642982d.tar.gz
39
44
touch $@
40
45
41
- t/tmp/unbound-1.4.22 .tar.gz : | t/tmp
42
- curl -o $@ " http://unbound.net/downloads/unbound-1.4.22 .tar.gz"
46
+ t/tmp/unbound-$( unbound_version ) .tar.gz : | t/tmp
47
+ curl -o $@ " http://unbound.net/downloads/unbound-$( unbound_version ) .tar.gz"
43
48
44
- t/tmp/unbound-1.4.22 : t/tmp/unbound-1.4.22 .tar.gz
49
+ t/tmp/unbound-$( unbound_version ) : t/tmp/unbound-$( unbound_version ) .tar.gz
45
50
tar -C t/tmp -xf $<
46
51
touch $@
47
52
48
- t/tmp/unbound-1.4.22 /Makefile : | t/tmp/unbound-1.4.22
49
- cd t/tmp/unbound-1.4.22 && ./configure --prefix=$(PWD ) /t/build
53
+ t/tmp/unbound-$( unbound_version ) /Makefile : | t/tmp/unbound-$( unbound_version )
54
+ cd t/tmp/unbound-$( unbound_version ) && ./configure --prefix=$(PWD ) /t/build
50
55
touch $@
51
56
52
- t/tmp/unbound-1.4.22 /unbound : t/tmp/unbound-1.4.22 /Makefile
53
- cd t/tmp/unbound-1.4.22 && make
57
+ t/tmp/unbound-$( unbound_version ) /unbound : t/tmp/unbound-$( unbound_version ) /Makefile
58
+ cd t/tmp/unbound-$( unbound_version ) && make
54
59
touch $@
55
60
56
- t/build/sbin/unbound : t/tmp/unbound-1.4.22 /unbound
57
- cd t/tmp/unbound-1.4.22 && make install
61
+ t/build/sbin/unbound : t/tmp/unbound-$( unbound_version ) /unbound
62
+ cd t/tmp/unbound-$( unbound_version ) && make install
58
63
touch $@
59
64
60
- t/tmp/LuaJIT-2.0.3 .tar.gz : | t/tmp
61
- curl -o $@ " http://luajit.org/download/LuaJIT-2.0.3 .tar.gz"
65
+ t/tmp/LuaJIT-$( lua_jit_version ) .tar.gz : | t/tmp
66
+ curl -o $@ " http://luajit.org/download/LuaJIT-$( lua_jit_version ) .tar.gz"
62
67
63
- t/tmp/LuaJIT-2.0.3 : t/tmp/LuaJIT-2.0.3 .tar.gz
68
+ t/tmp/LuaJIT-$( lua_jit_version ) : t/tmp/LuaJIT-$( lua_jit_version ) .tar.gz
64
69
tar -C t/tmp -xf $<
65
70
touch $@
66
71
67
- t/tmp/LuaJIT-2.0.3 /src/luajit : | t/tmp/LuaJIT-2.0.3
68
- cd t/tmp/LuaJIT-2.0.3 && make PREFIX=$(PWD ) /t/build
72
+ t/tmp/LuaJIT-$( lua_jit_version ) /src/luajit : | t/tmp/LuaJIT-$( lua_jit_version )
73
+ cd t/tmp/LuaJIT-$( lua_jit_version ) && make PREFIX=$(PWD ) /t/build
69
74
touch $@
70
75
71
- t/build/bin/luajit : t/tmp/LuaJIT-2.0.3 /src/luajit
72
- cd t/tmp/LuaJIT-2.0.3 && make install PREFIX=$(PWD ) /t/build
76
+ t/build/bin/luajit : t/tmp/LuaJIT-$( lua_jit_version ) /src/luajit
77
+ cd t/tmp/LuaJIT-$( lua_jit_version ) && make install PREFIX=$(PWD ) /t/build
73
78
touch $@
74
79
75
- t/tmp/lua-nginx-module-0.9.13rc1 .tar.gz : | t/tmp
76
- curl -Lo $@ " https://github.com/openresty/lua-nginx-module/archive/v0.9.13rc1 .tar.gz"
80
+ t/tmp/lua-nginx-module-$( lua_nginx_module_version ) .tar.gz : | t/tmp
81
+ curl -Lo $@ " https://github.com/openresty/lua-nginx-module/archive/v $( lua_nginx_module_version ) .tar.gz"
77
82
78
- t/tmp/lua-nginx-module-0.9.13rc1 : t/tmp/lua-nginx-module-0.9.13rc1 .tar.gz
83
+ t/tmp/lua-nginx-module-$( lua_nginx_module_version ) : t/tmp/lua-nginx-module-$( lua_nginx_module_version ) .tar.gz
79
84
tar -C t/tmp -xf $<
80
85
touch $@
81
86
82
- t/tmp/lua-upstream-nginx-module-0.02 .tar.gz : | t/tmp
83
- curl -Lo $@ " https://github.com/openresty/lua-upstream-nginx-module/archive/v0.02 .tar.gz"
87
+ t/tmp/lua-upstream-nginx-module-$( lua_upstream_nginx_module_version ) .tar.gz : | t/tmp
88
+ curl -Lo $@ " https://github.com/openresty/lua-upstream-nginx-module/archive/v $( lua_upstream_nginx_module_version ) .tar.gz"
84
89
85
- t/tmp/lua-upstream-nginx-module-0.02 : t/tmp/lua-upstream-nginx-module-0.02 .tar.gz
90
+ t/tmp/lua-upstream-nginx-module-$( lua_upstream_nginx_module_version ) : t/tmp/lua-upstream-nginx-module-$( lua_upstream_nginx_module_version ) .tar.gz
86
91
tar -C t/tmp -xf $<
87
92
touch $@
88
93
89
- t/tmp/$( nginx ) .tar.gz : | t/tmp
94
+ t/tmp/nginx- $( nginx_version ) .tar.gz : | t/tmp
90
95
curl -o $@ $(nginx_url )
91
96
92
- t/tmp/$( nginx ) : t/tmp/$( nginx ) .tar.gz
97
+ t/tmp/nginx- $( nginx_version ) : t/tmp/nginx- $( nginx_version ) .tar.gz
93
98
tar -C t/tmp -xf $<
94
99
touch $@
95
100
96
- t/tmp/$(nginx ) /.patches-applied : | t/tmp/$(nginx )
97
- curl https://raw.githubusercontent.com/openresty/no-pool-nginx/master/$(nginx ) -no_pool.patch | patch -d t/tmp/$(nginx ) -p1 --quiet
101
+ t/tmp/nginx-$(nginx_no_pool_version ) -no_pool.patch : | t/tmp
102
+ curl -o $@ https://raw.githubusercontent.com/openresty/no-pool-nginx/master/nginx-$(nginx_no_pool_version ) -no_pool.patch
103
+
104
+ t/tmp/nginx-$(nginx_version ) /.patches-applied : | t/tmp/nginx-$(nginx_version ) t/tmp/nginx-$(nginx_no_pool_version ) -no_pool.patch
105
+ cat t/tmp/nginx-$(nginx_no_pool_version ) -no_pool.patch | sed " s,.*nginx_version.*, ` cat t/tmp/nginx-$( nginx_version) /src/core/nginx.h | grep nginx_version` ," | sed ' s,"$(nginx_no_pool_version),"$(nginx_version),' | patch -d t/tmp/nginx-$(nginx_version ) -p1 --quiet
98
106
touch $@
99
107
100
- t/tmp/$( nginx ) /Makefile : config | t/tmp/$( nginx ) t/tmp/$( nginx ) /.patches-applied t/build/bin/luajit t/tmp/lua-nginx-module-0.9.13rc1 t/tmp/lua-upstream-nginx-module-0.02
101
- cd t/tmp/$( nginx ) && env \
108
+ t/tmp/nginx- $( nginx_version ) /Makefile : config | t/tmp/nginx- $( nginx_version ) t/tmp/nginx- $( nginx_version ) /.patches-applied t/build/bin/luajit t/tmp/lua-nginx-module-$( lua_nginx_module_version ) t/tmp/lua-upstream-nginx-module-$( lua_upstream_nginx_module_version )
109
+ cd t/tmp/nginx- $( nginx_version ) && env \
102
110
LUAJIT_LIB=$(PWD ) /t/build/lib \
103
111
LUAJIT_INC=$(PWD ) /t/build/include/luajit-2.0 \
104
112
./configure \
105
113
--prefix=$(PWD ) /t/build \
106
114
--with-debug \
107
115
--with-ipv6 \
108
- --add-module=$(PWD ) /t/tmp/lua-nginx-module-0.9.13rc1 \
109
- --add-module=$(PWD ) /t/tmp/lua-upstream-nginx-module-0.02 \
116
+ --add-module=$(PWD ) /t/tmp/lua-nginx-module-$( lua_nginx_module_version ) \
117
+ --add-module=$(PWD ) /t/tmp/lua-upstream-nginx-module-$( lua_upstream_nginx_module_version ) \
110
118
--add-module=$(PWD ) \
111
119
--without-http_charset_module \
112
120
--without-http_userid_module \
@@ -125,8 +133,8 @@ t/tmp/$(nginx)/Makefile: config | t/tmp/$(nginx) t/tmp/$(nginx)/.patches-applied
125
133
--without-http_browser_module \
126
134
--without-http_upstream_ip_hash_module
127
135
128
- t/tmp/$( nginx ) /objs/nginx : t/tmp/$( nginx ) /Makefile * .c
129
- cd t/tmp/$( nginx ) && make
136
+ t/tmp/nginx- $( nginx_version ) /objs/nginx : t/tmp/nginx- $( nginx_version ) /Makefile * .c
137
+ cd t/tmp/nginx- $( nginx_version ) && make
130
138
131
- t/build/sbin/nginx : t/tmp/$( nginx ) /objs/nginx
132
- cd t/tmp/$( nginx ) && make install
139
+ t/build/sbin/nginx : t/tmp/nginx- $( nginx_version ) /objs/nginx
140
+ cd t/tmp/nginx- $( nginx_version ) && make install
0 commit comments