GNUmakefile 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. VER = $(shell grep 'define NGINX_VERSION' src/core/nginx.h \
  2. | sed -e 's/^.*"\(.*\)".*/\1/')
  3. NGINX = nginx-$(VER)
  4. TEMP = tmp
  5. OBJS = objs.msvc8
  6. OPENSSL = openssl-1.0.1q
  7. ZLIB = zlib-1.2.8
  8. PCRE = pcre-8.38
  9. release: export
  10. mv $(TEMP)/$(NGINX)/auto/configure $(TEMP)/$(NGINX)
  11. # delete incomplete sources
  12. rm $(TEMP)/$(NGINX)/src/event/ngx_event_acceptex.c
  13. rm $(TEMP)/$(NGINX)/src/event/ngx_event_connectex.c
  14. rm $(TEMP)/$(NGINX)/src/event/modules/ngx_iocp_module.*
  15. rm -r $(TEMP)/$(NGINX)/src/os/win32
  16. rm -r $(TEMP)/$(NGINX)/src/mysql
  17. mv $(TEMP)/$(NGINX)/docs/text/LICENSE $(TEMP)/$(NGINX)
  18. mv $(TEMP)/$(NGINX)/docs/text/README $(TEMP)/$(NGINX)
  19. mv $(TEMP)/$(NGINX)/docs/html $(TEMP)/$(NGINX)
  20. mv $(TEMP)/$(NGINX)/docs/man $(TEMP)/$(NGINX)
  21. $(MAKE) -f docs/GNUmakefile changes
  22. rm -r $(TEMP)/$(NGINX)/docs
  23. rm -r $(TEMP)/$(NGINX)/misc
  24. tar -c -z -f $(NGINX).tar.gz --directory $(TEMP) $(NGINX)
  25. export:
  26. rm -rf $(TEMP)
  27. hg archive -X '.hg*' $(TEMP)/$(NGINX)
  28. RELEASE:
  29. hg ci -m nginx-$(VER)-RELEASE
  30. hg tag -m "release-$(VER) tag" release-$(VER)
  31. $(MAKE) -f misc/GNUmakefile release
  32. win32:
  33. ./auto/configure \
  34. --with-cc=cl \
  35. --builddir=$(OBJS) \
  36. --with-debug \
  37. --prefix= \
  38. --conf-path=conf/nginx.conf \
  39. --pid-path=logs/nginx.pid \
  40. --http-log-path=logs/access.log \
  41. --error-log-path=logs/error.log \
  42. --sbin-path=nginx.exe \
  43. --http-client-body-temp-path=temp/client_body_temp \
  44. --http-proxy-temp-path=temp/proxy_temp \
  45. --http-fastcgi-temp-path=temp/fastcgi_temp \
  46. --http-scgi-temp-path=temp/scgi_temp \
  47. --http-uwsgi-temp-path=temp/uwsgi_temp \
  48. --with-cc-opt=-DFD_SETSIZE=1024 \
  49. --with-pcre=$(OBJS)/lib/$(PCRE) \
  50. --with-zlib=$(OBJS)/lib/$(ZLIB) \
  51. --with-select_module \
  52. --with-http_realip_module \
  53. --with-http_addition_module \
  54. --with-http_sub_module \
  55. --with-http_dav_module \
  56. --with-http_stub_status_module \
  57. --with-http_flv_module \
  58. --with-http_mp4_module \
  59. --with-http_gunzip_module \
  60. --with-http_gzip_static_module \
  61. --with-http_auth_request_module \
  62. --with-http_random_index_module \
  63. --with-http_secure_link_module \
  64. --with-mail \
  65. --with-openssl=$(OBJS)/lib/$(OPENSSL) \
  66. --with-openssl-opt=enable-tlsext \
  67. --with-http_ssl_module \
  68. --with-mail_ssl_module \
  69. --with-ipv6
  70. zip: export
  71. rm -f $(NGINX).zip
  72. mkdir -p $(TEMP)/$(NGINX)/docs.new
  73. mkdir -p $(TEMP)/$(NGINX)/logs
  74. mkdir -p $(TEMP)/$(NGINX)/temp
  75. sed -i '' -e "s/$$/`printf '\r'`/" $(TEMP)/$(NGINX)/conf/*
  76. mv $(TEMP)/$(NGINX)/docs/text/LICENSE $(TEMP)/$(NGINX)/docs.new
  77. mv $(TEMP)/$(NGINX)/docs/text/README $(TEMP)/$(NGINX)/docs.new
  78. mv $(TEMP)/$(NGINX)/docs/html $(TEMP)/$(NGINX)
  79. rm -r $(TEMP)/$(NGINX)/docs
  80. mv $(TEMP)/$(NGINX)/docs.new $(TEMP)/$(NGINX)/docs
  81. cp -p $(OBJS)/nginx.exe $(TEMP)/$(NGINX)
  82. $(MAKE) -f docs/GNUmakefile changes
  83. mv $(TEMP)/$(NGINX)/CHANGES* $(TEMP)/$(NGINX)/docs/
  84. cp -p $(OBJS)/lib/$(OPENSSL)/LICENSE \
  85. $(TEMP)/$(NGINX)/docs/OpenSSL.LICENSE
  86. cp -p $(OBJS)/lib/$(PCRE)/LICENCE \
  87. $(TEMP)/$(NGINX)/docs/PCRE.LICENCE
  88. sed -ne '/^ (C) 1995-20/,/^ jloup@gzip\.org/p' \
  89. $(OBJS)/lib/$(ZLIB)/README \
  90. > $(TEMP)/$(NGINX)/docs/zlib.LICENSE
  91. touch -r $(OBJS)/lib/$(ZLIB)/README \
  92. $(TEMP)/$(NGINX)/docs/zlib.LICENSE
  93. rm -r $(TEMP)/$(NGINX)/auto
  94. rm -r $(TEMP)/$(NGINX)/misc
  95. rm -r $(TEMP)/$(NGINX)/src
  96. cd $(TEMP) && zip -r ../$(NGINX).zip $(NGINX)
  97. icons: src/os/win32/nginx.ico
  98. # 48x48, 32x32 and 16x16 icons
  99. src/os/win32/nginx.ico: src/os/win32/nginx_icon48.xpm \
  100. src/os/win32/nginx_icon32.xpm \
  101. src/os/win32/nginx_icon16.xpm
  102. test -d $(TEMP) || mkdir $(TEMP)
  103. xpmtoppm --alphaout=$(TEMP)/nginx48.pbm \
  104. src/os/win32/nginx_icon48.xpm > $(TEMP)/nginx48.ppm
  105. xpmtoppm --alphaout=$(TEMP)/nginx32.pbm \
  106. src/os/win32/nginx_icon32.xpm > $(TEMP)/nginx32.ppm
  107. xpmtoppm --alphaout=$(TEMP)/nginx16.pbm \
  108. src/os/win32/nginx_icon16.xpm > $(TEMP)/nginx16.ppm
  109. ppmtowinicon -output src/os/win32/nginx.ico -andpgms \
  110. $(TEMP)/nginx48.ppm $(TEMP)/nginx48.pbm \
  111. $(TEMP)/nginx32.ppm $(TEMP)/nginx32.pbm \
  112. $(TEMP)/nginx16.ppm $(TEMP)/nginx16.pbm