-
Notifications
You must be signed in to change notification settings - Fork 18
/
Makefile
28 lines (24 loc) · 1.32 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
NGX_OPTS = \
--with-compat --with-threads --with-http_addition_module --with-http_v2_module \
--with-http_auth_request_module --with-http_gunzip_module --with-http_gzip_static_module \
--with-http_random_index_module --with-http_realip_module --with-http_secure_link_module \
--with-http_slice_module --with-http_stub_status_module --with-http_sub_module \
--with-stream --with-stream_realip_module --with-stream_ssl_preread_module \
--with-file-aio --with-http_ssl_module --with-stream_ssl_module \
--with-cc-opt='-g -fstack-protector-strong -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fPIC' \
--with-ld-opt='-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -pie'
prepare-nginx:
curl -o $(OUT_DIR)/nginx.tar.gz http://nginx.org/download/nginx-$(NGINX_VERSION).tar.gz
mkdir -p $(OUT_DIR)/nginx
tar -C $(OUT_DIR)/nginx -xzf $(OUT_DIR)/nginx.tar.gz --strip-components 1
rm $(OUT_DIR)/nginx.tar.gz
cd $(OUT_DIR)/nginx && ./configure $(NGX_OPTS)
prepare-nginx-local:
cd $(NGINX_PATH) && auto/configure $(NGX_OPTS)
doc:
rm -rf target/doc
RUSTFLAGS=-Awarnings cargo doc --no-deps --quiet -j`nproc`
echo "<meta http-equiv=refresh content=0;url=nginx/index.html>" > target/doc/index.html
publish-doc: doc
ghp-import -n target/doc
git push -fq https://${GITHUB_TOKEN}@github.com/arvancloud/nginx-rs.git gh-pages