2006-08-30 18:39:17 +08:00
|
|
|
|
2009-04-20 14:08:47 +08:00
|
|
|
VER = $(shell grep 'define NGINX_VERSION' src/core/nginx.h \
|
|
|
|
| sed -e 's/^.*\"\(.*\)\"/\1/')
|
|
|
|
NGINX = nginx-$(VER)
|
|
|
|
TEMP = tmp
|
2011-11-30 15:36:09 +08:00
|
|
|
REPO = $(shell svn info | sed -n 's/^Repository Root: //p')
|
2009-04-20 14:08:47 +08:00
|
|
|
|
|
|
|
OBJS = objs.msvc8
|
2012-05-15 22:20:06 +08:00
|
|
|
OPENSSL = openssl-1.0.1c
|
2012-09-11 21:36:34 +08:00
|
|
|
ZLIB = zlib-1.2.7
|
2013-01-10 19:38:14 +08:00
|
|
|
PCRE = pcre-8.32
|
2006-08-30 18:39:17 +08:00
|
|
|
|
|
|
|
|
|
|
|
release:
|
|
|
|
rm -rf $(TEMP)
|
|
|
|
|
|
|
|
svn export -rHEAD . $(TEMP)/$(NGINX)
|
|
|
|
|
|
|
|
mv $(TEMP)/$(NGINX)/auto/configure $(TEMP)/$(NGINX)
|
|
|
|
|
|
|
|
# delete incomplete sources
|
|
|
|
rm $(TEMP)/$(NGINX)/src/event/ngx_event_acceptex.c
|
|
|
|
rm $(TEMP)/$(NGINX)/src/event/ngx_event_connectex.c
|
|
|
|
rm $(TEMP)/$(NGINX)/src/event/modules/ngx_iocp_module.*
|
|
|
|
rm -r $(TEMP)/$(NGINX)/src/os/win32
|
|
|
|
|
|
|
|
rm -r $(TEMP)/$(NGINX)/src/mysql
|
|
|
|
|
|
|
|
mv $(TEMP)/$(NGINX)/docs/text/LICENSE $(TEMP)/$(NGINX)
|
|
|
|
mv $(TEMP)/$(NGINX)/docs/text/README $(TEMP)/$(NGINX)
|
|
|
|
mv $(TEMP)/$(NGINX)/docs/html $(TEMP)/$(NGINX)
|
2010-11-29 23:23:06 +08:00
|
|
|
mv $(TEMP)/$(NGINX)/docs/man $(TEMP)/$(NGINX)
|
2006-08-30 18:39:17 +08:00
|
|
|
|
|
|
|
$(MAKE) -f docs/GNUmakefile changes
|
2006-09-18 20:26:31 +08:00
|
|
|
|
|
|
|
rm -r $(TEMP)/$(NGINX)/docs
|
|
|
|
rm -r $(TEMP)/$(NGINX)/misc
|
|
|
|
|
2006-09-18 20:42:53 +08:00
|
|
|
tar -c -z -f $(NGINX).tar.gz --directory $(TEMP) $(NGINX)
|
|
|
|
|
2006-09-18 20:26:31 +08:00
|
|
|
|
2011-10-17 23:09:34 +08:00
|
|
|
RELEASE:
|
|
|
|
test -d $(TEMP) || mkdir -p $(TEMP)
|
|
|
|
|
|
|
|
echo "nginx-$(VER)-RELEASE" > $(TEMP)/message
|
|
|
|
svn ci -F $(TEMP)/message
|
|
|
|
|
|
|
|
echo "release-$(VER) tag" > $(TEMP)/message
|
2011-11-30 15:36:09 +08:00
|
|
|
svn copy $(REPO)/trunk $(REPO)/tags/release-$(VER) \
|
2011-10-17 23:09:34 +08:00
|
|
|
-F $(TEMP)/message
|
|
|
|
|
|
|
|
svn up
|
|
|
|
|
2011-12-12 20:39:19 +08:00
|
|
|
$(MAKE) -f misc/GNUmakefile release
|
2011-10-17 23:09:34 +08:00
|
|
|
|
|
|
|
|
2006-09-18 20:26:31 +08:00
|
|
|
snapshot:
|
|
|
|
rm -rf $(TEMP)
|
|
|
|
|
|
|
|
mkdir -p $(TEMP)
|
|
|
|
svn export . $(TEMP)/$(NGINX)
|
|
|
|
|
|
|
|
mv $(TEMP)/$(NGINX)/auto/configure $(TEMP)/$(NGINX)
|
|
|
|
|
|
|
|
# delete incomplete sources
|
|
|
|
rm $(TEMP)/$(NGINX)/src/event/ngx_event_acceptex.c
|
|
|
|
rm $(TEMP)/$(NGINX)/src/event/ngx_event_connectex.c
|
|
|
|
rm $(TEMP)/$(NGINX)/src/event/modules/ngx_iocp_module.*
|
|
|
|
rm -r $(TEMP)/$(NGINX)/src/os/win32
|
|
|
|
|
|
|
|
rm -r $(TEMP)/$(NGINX)/src/mysql
|
|
|
|
|
|
|
|
mv $(TEMP)/$(NGINX)/docs/text/LICENSE $(TEMP)/$(NGINX)
|
|
|
|
mv $(TEMP)/$(NGINX)/docs/text/README $(TEMP)/$(NGINX)
|
|
|
|
mv $(TEMP)/$(NGINX)/docs/html $(TEMP)/$(NGINX)
|
2010-11-29 23:23:06 +08:00
|
|
|
mv $(TEMP)/$(NGINX)/docs/man $(TEMP)/$(NGINX)
|
2006-09-18 20:26:31 +08:00
|
|
|
|
|
|
|
$(MAKE) -f docs/GNUmakefile changes
|
2006-08-30 18:39:17 +08:00
|
|
|
|
|
|
|
rm -r $(TEMP)/$(NGINX)/docs
|
|
|
|
rm -r $(TEMP)/$(NGINX)/misc
|
|
|
|
|
|
|
|
tar -c -z -f $(NGINX).tar.gz --directory $(TEMP) $(NGINX)
|
|
|
|
|
2012-09-11 21:17:31 +08:00
|
|
|
win32:
|
|
|
|
./auto/configure \
|
|
|
|
--with-cc=cl \
|
2012-10-30 19:09:38 +08:00
|
|
|
--builddir=$(OBJS) \
|
2012-09-11 21:17:31 +08:00
|
|
|
--with-debug \
|
|
|
|
--prefix= \
|
|
|
|
--conf-path=conf/nginx.conf \
|
|
|
|
--pid-path=logs/nginx.pid \
|
|
|
|
--http-log-path=logs/access.log \
|
|
|
|
--error-log-path=logs/error.log \
|
|
|
|
--sbin-path=nginx.exe \
|
|
|
|
--http-client-body-temp-path=temp/client_body_temp \
|
|
|
|
--http-proxy-temp-path=temp/proxy_temp \
|
|
|
|
--http-fastcgi-temp-path=temp/fastcgi_temp \
|
|
|
|
--http-scgi-temp-path=temp/scgi_temp \
|
|
|
|
--http-uwsgi-temp-path=temp/uwsgi_temp \
|
|
|
|
--with-cc-opt=-DFD_SETSIZE=1024 \
|
2012-10-30 19:09:38 +08:00
|
|
|
--with-pcre=$(OBJS)/lib/$(PCRE) \
|
|
|
|
--with-zlib=$(OBJS)/lib/$(ZLIB) \
|
2012-09-11 21:17:31 +08:00
|
|
|
--with-select_module \
|
|
|
|
--with-http_realip_module \
|
|
|
|
--with-http_addition_module \
|
|
|
|
--with-http_sub_module \
|
|
|
|
--with-http_dav_module \
|
|
|
|
--with-http_stub_status_module \
|
|
|
|
--with-http_flv_module \
|
|
|
|
--with-http_mp4_module \
|
|
|
|
--with-http_gunzip_module \
|
|
|
|
--with-http_gzip_static_module \
|
|
|
|
--with-http_random_index_module \
|
|
|
|
--with-http_secure_link_module \
|
|
|
|
--with-mail \
|
2012-10-30 19:09:38 +08:00
|
|
|
--with-openssl=$(OBJS)/lib/$(OPENSSL) \
|
2012-09-11 21:17:31 +08:00
|
|
|
--with-openssl-opt=enable-tlsext \
|
|
|
|
--with-http_ssl_module \
|
|
|
|
--with-mail_ssl_module \
|
|
|
|
--with-ipv6
|
2006-08-30 18:39:17 +08:00
|
|
|
|
2009-04-20 14:08:47 +08:00
|
|
|
zip:
|
|
|
|
rm -rf $(TEMP)
|
|
|
|
rm -f $(NGINX).zip
|
|
|
|
|
|
|
|
mkdir -p $(TEMP)/$(NGINX)/docs
|
|
|
|
mkdir -p $(TEMP)/$(NGINX)/logs
|
|
|
|
mkdir -p $(TEMP)/$(NGINX)/temp
|
|
|
|
|
|
|
|
svn export -rHEAD conf $(TEMP)/$(NGINX)/conf/
|
2012-08-02 22:58:36 +08:00
|
|
|
sed -i '' -e "s/$$/`printf '\r'`/" $(TEMP)/$(NGINX)/conf/*
|
2009-04-20 14:08:47 +08:00
|
|
|
|
|
|
|
svn export -rHEAD contrib $(TEMP)/$(NGINX)/contrib/
|
|
|
|
svn export -rHEAD docs/html $(TEMP)/$(NGINX)/html/
|
|
|
|
|
|
|
|
$(MAKE) -f docs/GNUmakefile changes
|
|
|
|
|
|
|
|
cp -p $(OBJS)/nginx.exe $(TEMP)/$(NGINX)
|
|
|
|
|
|
|
|
cp -p docs/text/LICENSE $(TEMP)/$(NGINX)/docs/
|
|
|
|
cp -p docs/text/README $(TEMP)/$(NGINX)/docs/
|
|
|
|
mv $(TEMP)/$(NGINX)/CHANGES* $(TEMP)/$(NGINX)/docs/
|
|
|
|
|
|
|
|
cp -p $(OBJS)/lib/$(OPENSSL)/LICENSE \
|
|
|
|
$(TEMP)/$(NGINX)/docs/OpenSSL.LICENSE
|
|
|
|
|
2009-05-19 00:50:05 +08:00
|
|
|
cp -p $(OBJS)/lib/$(PCRE)/LICENCE \
|
|
|
|
$(TEMP)/$(NGINX)/docs/PCRE.LICENCE
|
2009-04-20 14:08:47 +08:00
|
|
|
|
2012-08-02 22:58:36 +08:00
|
|
|
sed -ne '/^ (C) 1995-20/,/^ jloup@gzip\.org/p' \
|
2009-04-20 14:08:47 +08:00
|
|
|
$(OBJS)/lib/$(ZLIB)/README \
|
|
|
|
> $(TEMP)/$(NGINX)/docs/zlib.LICENSE
|
|
|
|
|
|
|
|
touch -r $(OBJS)/lib/$(ZLIB)/README \
|
|
|
|
$(TEMP)/$(NGINX)/docs/zlib.LICENSE
|
|
|
|
|
|
|
|
cd $(TEMP) && zip -r ../$(NGINX).zip $(NGINX)
|
|
|
|
|
|
|
|
|
|
|
|
icons: src/os/win32/nginx.ico
|
2006-08-30 18:39:17 +08:00
|
|
|
|
2009-04-21 23:44:39 +08:00
|
|
|
# 48x48, 32x32 and 16x16 icons
|
2006-08-30 18:39:17 +08:00
|
|
|
|
2009-04-21 23:44:39 +08:00
|
|
|
src/os/win32/nginx.ico: src/os/win32/nginx_icon48.xpm \
|
|
|
|
src/os/win32/nginx_icon32.xpm \
|
2006-08-30 18:39:17 +08:00
|
|
|
src/os/win32/nginx_icon16.xpm
|
|
|
|
|
|
|
|
test -d $(TEMP) || mkdir $(TEMP)
|
|
|
|
|
2009-04-21 23:44:39 +08:00
|
|
|
xpmtoppm --alphaout=$(TEMP)/nginx48.pbm \
|
|
|
|
src/os/win32/nginx_icon48.xpm > $(TEMP)/nginx48.ppm
|
|
|
|
|
2006-08-30 18:39:17 +08:00
|
|
|
xpmtoppm --alphaout=$(TEMP)/nginx32.pbm \
|
|
|
|
src/os/win32/nginx_icon32.xpm > $(TEMP)/nginx32.ppm
|
|
|
|
|
|
|
|
xpmtoppm --alphaout=$(TEMP)/nginx16.pbm \
|
|
|
|
src/os/win32/nginx_icon16.xpm > $(TEMP)/nginx16.ppm
|
|
|
|
|
|
|
|
ppmtowinicon -output src/os/win32/nginx.ico -andpgms \
|
2009-04-21 23:44:39 +08:00
|
|
|
$(TEMP)/nginx48.ppm $(TEMP)/nginx48.pbm \
|
2006-08-30 18:39:17 +08:00
|
|
|
$(TEMP)/nginx32.ppm $(TEMP)/nginx32.pbm \
|
|
|
|
$(TEMP)/nginx16.ppm $(TEMP)/nginx16.pbm
|