blob: eb6cbf0b3e2022d8c238403fe425b7b2686df302 [file] [log] [blame]
Igor Sysoevda173ab2006-08-30 10:39:17 +00001
Igor Sysoevbd919992009-04-20 06:08:47 +00002VER = $(shell grep 'define NGINX_VERSION' src/core/nginx.h \
Ruslan Ermilovf24f5f12013-03-28 08:47:25 +00003 | sed -e 's/^.*"\(.*\)".*/\1/')
Igor Sysoevbd919992009-04-20 06:08:47 +00004NGINX = nginx-$(VER)
5TEMP = tmp
6
7OBJS = objs.msvc8
Maxim Douninbec74152014-06-17 11:38:55 +04008OPENSSL = openssl-1.0.1h
Maxim Dounine5817132013-06-04 16:16:51 +04009ZLIB = zlib-1.2.8
Maxim Dounin31c17152014-07-04 22:34:03 +040010PCRE = pcre-8.35
Igor Sysoevda173ab2006-08-30 10:39:17 +000011
12
Maxim Dounin66f9c0f2013-03-22 15:47:18 +000013release: export
Igor Sysoevda173ab2006-08-30 10:39:17 +000014
15 mv $(TEMP)/$(NGINX)/auto/configure $(TEMP)/$(NGINX)
16
17 # delete incomplete sources
18 rm $(TEMP)/$(NGINX)/src/event/ngx_event_acceptex.c
19 rm $(TEMP)/$(NGINX)/src/event/ngx_event_connectex.c
20 rm $(TEMP)/$(NGINX)/src/event/modules/ngx_iocp_module.*
21 rm -r $(TEMP)/$(NGINX)/src/os/win32
22
Igor Sysoevda173ab2006-08-30 10:39:17 +000023 rm -r $(TEMP)/$(NGINX)/src/mysql
24
Igor Sysoevda173ab2006-08-30 10:39:17 +000025 mv $(TEMP)/$(NGINX)/docs/text/LICENSE $(TEMP)/$(NGINX)
26 mv $(TEMP)/$(NGINX)/docs/text/README $(TEMP)/$(NGINX)
27 mv $(TEMP)/$(NGINX)/docs/html $(TEMP)/$(NGINX)
Igor Sysoev71948cc2010-11-29 15:23:06 +000028 mv $(TEMP)/$(NGINX)/docs/man $(TEMP)/$(NGINX)
Igor Sysoevda173ab2006-08-30 10:39:17 +000029
30 $(MAKE) -f docs/GNUmakefile changes
31
32 rm -r $(TEMP)/$(NGINX)/docs
33 rm -r $(TEMP)/$(NGINX)/misc
34
Igor Sysoev648cb682006-09-18 12:42:53 +000035 tar -c -z -f $(NGINX).tar.gz --directory $(TEMP) $(NGINX)
36
Igor Sysoev993b9da2006-09-18 12:26:31 +000037
Maxim Dounin66f9c0f2013-03-22 15:47:18 +000038export:
39 rm -rf $(TEMP)
Ruslan Ermilov1f415d62013-04-25 17:41:45 +040040 hg archive -X '.hg*' $(TEMP)/$(NGINX)
Maxim Dounin66f9c0f2013-03-22 15:47:18 +000041
42
Igor Sysoev79dce682011-10-17 15:09:34 +000043RELEASE:
Maxim Dounin66f9c0f2013-03-22 15:47:18 +000044 hg ci -m nginx-$(VER)-RELEASE
45 hg tag -m "release-$(VER) tag" release-$(VER)
46
Ruslan Ermilov1f415d62013-04-25 17:41:45 +040047 $(MAKE) -f misc/GNUmakefile release
Igor Sysoev79dce682011-10-17 15:09:34 +000048
Igor Sysoev79dce682011-10-17 15:09:34 +000049
Maxim Douninf5e90ce2012-09-11 13:17:31 +000050win32:
51 ./auto/configure \
52 --with-cc=cl \
Maxim Dounind310eee2012-10-30 11:09:38 +000053 --builddir=$(OBJS) \
Maxim Douninf5e90ce2012-09-11 13:17:31 +000054 --with-debug \
55 --prefix= \
56 --conf-path=conf/nginx.conf \
57 --pid-path=logs/nginx.pid \
58 --http-log-path=logs/access.log \
59 --error-log-path=logs/error.log \
60 --sbin-path=nginx.exe \
61 --http-client-body-temp-path=temp/client_body_temp \
62 --http-proxy-temp-path=temp/proxy_temp \
63 --http-fastcgi-temp-path=temp/fastcgi_temp \
64 --http-scgi-temp-path=temp/scgi_temp \
65 --http-uwsgi-temp-path=temp/uwsgi_temp \
66 --with-cc-opt=-DFD_SETSIZE=1024 \
Maxim Dounind310eee2012-10-30 11:09:38 +000067 --with-pcre=$(OBJS)/lib/$(PCRE) \
68 --with-zlib=$(OBJS)/lib/$(ZLIB) \
Maxim Douninf5e90ce2012-09-11 13:17:31 +000069 --with-select_module \
70 --with-http_realip_module \
71 --with-http_addition_module \
72 --with-http_sub_module \
73 --with-http_dav_module \
74 --with-http_stub_status_module \
75 --with-http_flv_module \
76 --with-http_mp4_module \
77 --with-http_gunzip_module \
78 --with-http_gzip_static_module \
Maxim Dounin33029f72013-08-21 20:46:10 +040079 --with-http_auth_request_module \
Maxim Douninf5e90ce2012-09-11 13:17:31 +000080 --with-http_random_index_module \
81 --with-http_secure_link_module \
82 --with-mail \
Maxim Dounind310eee2012-10-30 11:09:38 +000083 --with-openssl=$(OBJS)/lib/$(OPENSSL) \
Maxim Douninf5e90ce2012-09-11 13:17:31 +000084 --with-openssl-opt=enable-tlsext \
85 --with-http_ssl_module \
86 --with-mail_ssl_module \
87 --with-ipv6
Igor Sysoevda173ab2006-08-30 10:39:17 +000088
Igor Sysoevbd919992009-04-20 06:08:47 +000089
Maxim Dounin66f9c0f2013-03-22 15:47:18 +000090zip: export
91 rm -f $(NGINX).zip
Maxim Dounin50bd6322013-03-22 15:14:07 +000092
93 mkdir -p $(TEMP)/$(NGINX)/docs.new
Igor Sysoevbd919992009-04-20 06:08:47 +000094 mkdir -p $(TEMP)/$(NGINX)/logs
95 mkdir -p $(TEMP)/$(NGINX)/temp
96
Ruslan Ermilov49e6d2c2012-08-02 14:58:36 +000097 sed -i '' -e "s/$$/`printf '\r'`/" $(TEMP)/$(NGINX)/conf/*
Igor Sysoevbd919992009-04-20 06:08:47 +000098
Maxim Dounin50bd6322013-03-22 15:14:07 +000099 mv $(TEMP)/$(NGINX)/docs/text/LICENSE $(TEMP)/$(NGINX)/docs.new
100 mv $(TEMP)/$(NGINX)/docs/text/README $(TEMP)/$(NGINX)/docs.new
101 mv $(TEMP)/$(NGINX)/docs/html $(TEMP)/$(NGINX)
Igor Sysoevbd919992009-04-20 06:08:47 +0000102
Maxim Dounin50bd6322013-03-22 15:14:07 +0000103 rm -r $(TEMP)/$(NGINX)/docs
104 mv $(TEMP)/$(NGINX)/docs.new $(TEMP)/$(NGINX)/docs
Igor Sysoevbd919992009-04-20 06:08:47 +0000105
106 cp -p $(OBJS)/nginx.exe $(TEMP)/$(NGINX)
107
Maxim Dounin50bd6322013-03-22 15:14:07 +0000108 $(MAKE) -f docs/GNUmakefile changes
Igor Sysoevbd919992009-04-20 06:08:47 +0000109 mv $(TEMP)/$(NGINX)/CHANGES* $(TEMP)/$(NGINX)/docs/
110
111 cp -p $(OBJS)/lib/$(OPENSSL)/LICENSE \
112 $(TEMP)/$(NGINX)/docs/OpenSSL.LICENSE
113
Igor Sysoev96161302009-05-18 16:50:05 +0000114 cp -p $(OBJS)/lib/$(PCRE)/LICENCE \
115 $(TEMP)/$(NGINX)/docs/PCRE.LICENCE
Igor Sysoevbd919992009-04-20 06:08:47 +0000116
Ruslan Ermilov49e6d2c2012-08-02 14:58:36 +0000117 sed -ne '/^ (C) 1995-20/,/^ jloup@gzip\.org/p' \
Igor Sysoevbd919992009-04-20 06:08:47 +0000118 $(OBJS)/lib/$(ZLIB)/README \
119 > $(TEMP)/$(NGINX)/docs/zlib.LICENSE
120
121 touch -r $(OBJS)/lib/$(ZLIB)/README \
122 $(TEMP)/$(NGINX)/docs/zlib.LICENSE
123
Maxim Dounin50bd6322013-03-22 15:14:07 +0000124 rm -r $(TEMP)/$(NGINX)/auto
125 rm -r $(TEMP)/$(NGINX)/misc
126 rm -r $(TEMP)/$(NGINX)/src
127
Igor Sysoevbd919992009-04-20 06:08:47 +0000128 cd $(TEMP) && zip -r ../$(NGINX).zip $(NGINX)
129
130
131icons: src/os/win32/nginx.ico
Igor Sysoevda173ab2006-08-30 10:39:17 +0000132
Igor Sysoeve980a682009-04-21 15:44:39 +0000133# 48x48, 32x32 and 16x16 icons
Igor Sysoevda173ab2006-08-30 10:39:17 +0000134
Igor Sysoeve980a682009-04-21 15:44:39 +0000135src/os/win32/nginx.ico: src/os/win32/nginx_icon48.xpm \
136 src/os/win32/nginx_icon32.xpm \
Igor Sysoevda173ab2006-08-30 10:39:17 +0000137 src/os/win32/nginx_icon16.xpm
138
139 test -d $(TEMP) || mkdir $(TEMP)
140
Igor Sysoeve980a682009-04-21 15:44:39 +0000141 xpmtoppm --alphaout=$(TEMP)/nginx48.pbm \
142 src/os/win32/nginx_icon48.xpm > $(TEMP)/nginx48.ppm
143
Igor Sysoevda173ab2006-08-30 10:39:17 +0000144 xpmtoppm --alphaout=$(TEMP)/nginx32.pbm \
145 src/os/win32/nginx_icon32.xpm > $(TEMP)/nginx32.ppm
146
147 xpmtoppm --alphaout=$(TEMP)/nginx16.pbm \
148 src/os/win32/nginx_icon16.xpm > $(TEMP)/nginx16.ppm
149
150 ppmtowinicon -output src/os/win32/nginx.ico -andpgms \
Igor Sysoeve980a682009-04-21 15:44:39 +0000151 $(TEMP)/nginx48.ppm $(TEMP)/nginx48.pbm \
Igor Sysoevda173ab2006-08-30 10:39:17 +0000152 $(TEMP)/nginx32.ppm $(TEMP)/nginx32.pbm \
153 $(TEMP)/nginx16.ppm $(TEMP)/nginx16.pbm