GNUmakefile 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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-0.9.8r
  7. ZLIB = zlib-1.2.3
  8. PCRE = pcre-7.9
  9. release:
  10. rm -rf $(TEMP)
  11. svn export -rHEAD . $(TEMP)/$(NGINX)
  12. mv $(TEMP)/$(NGINX)/auto/configure $(TEMP)/$(NGINX)
  13. # delete incomplete sources
  14. rm $(TEMP)/$(NGINX)/src/event/ngx_event_acceptex.c
  15. rm $(TEMP)/$(NGINX)/src/event/ngx_event_connectex.c
  16. rm $(TEMP)/$(NGINX)/src/event/modules/ngx_iocp_module.*
  17. rm -r $(TEMP)/$(NGINX)/src/os/win32
  18. rm -r $(TEMP)/$(NGINX)/src/mysql
  19. rm $(TEMP)/$(NGINX)/src/http/modules/ngx_http_status_module.c
  20. mv $(TEMP)/$(NGINX)/docs/text/LICENSE $(TEMP)/$(NGINX)
  21. mv $(TEMP)/$(NGINX)/docs/text/README $(TEMP)/$(NGINX)
  22. mv $(TEMP)/$(NGINX)/docs/html $(TEMP)/$(NGINX)
  23. $(MAKE) -f docs/GNUmakefile changes
  24. rm -r $(TEMP)/$(NGINX)/docs
  25. rm -r $(TEMP)/$(NGINX)/misc
  26. tar -c -z -f $(NGINX).tar.gz --directory $(TEMP) $(NGINX)
  27. snapshot:
  28. rm -rf $(TEMP)
  29. mkdir -p $(TEMP)
  30. svn export . $(TEMP)/$(NGINX)
  31. mv $(TEMP)/$(NGINX)/auto/configure $(TEMP)/$(NGINX)
  32. # delete incomplete sources
  33. rm $(TEMP)/$(NGINX)/src/event/ngx_event_acceptex.c
  34. rm $(TEMP)/$(NGINX)/src/event/ngx_event_connectex.c
  35. rm $(TEMP)/$(NGINX)/src/event/modules/ngx_iocp_module.*
  36. rm -r $(TEMP)/$(NGINX)/src/os/win32
  37. rm -r $(TEMP)/$(NGINX)/src/mysql
  38. rm $(TEMP)/$(NGINX)/src/http/modules/ngx_http_status_module.c
  39. mv $(TEMP)/$(NGINX)/docs/text/LICENSE $(TEMP)/$(NGINX)
  40. mv $(TEMP)/$(NGINX)/docs/text/README $(TEMP)/$(NGINX)
  41. mv $(TEMP)/$(NGINX)/docs/html $(TEMP)/$(NGINX)
  42. $(MAKE) -f docs/GNUmakefile changes
  43. rm -r $(TEMP)/$(NGINX)/docs
  44. rm -r $(TEMP)/$(NGINX)/misc
  45. tar -c -z -f $(NGINX).tar.gz --directory $(TEMP) $(NGINX)
  46. zip:
  47. rm -rf $(TEMP)
  48. rm -f $(NGINX).zip
  49. mkdir -p $(TEMP)/$(NGINX)/docs
  50. mkdir -p $(TEMP)/$(NGINX)/logs
  51. mkdir -p $(TEMP)/$(NGINX)/temp
  52. svn export -rHEAD conf $(TEMP)/$(NGINX)/conf/
  53. perl -pi -e 's/$$/\r/' $(TEMP)/$(NGINX)/conf/*
  54. svn export -rHEAD contrib $(TEMP)/$(NGINX)/contrib/
  55. svn export -rHEAD docs/html $(TEMP)/$(NGINX)/html/
  56. $(MAKE) -f docs/GNUmakefile changes
  57. cp -p $(OBJS)/nginx.exe $(TEMP)/$(NGINX)
  58. cp -p docs/text/LICENSE $(TEMP)/$(NGINX)/docs/
  59. cp -p docs/text/README $(TEMP)/$(NGINX)/docs/
  60. mv $(TEMP)/$(NGINX)/CHANGES* $(TEMP)/$(NGINX)/docs/
  61. cp -p $(OBJS)/lib/$(OPENSSL)/LICENSE \
  62. $(TEMP)/$(NGINX)/docs/OpenSSL.LICENSE
  63. cp -p $(OBJS)/lib/$(PCRE)/LICENCE \
  64. $(TEMP)/$(NGINX)/docs/PCRE.LICENCE
  65. perl -ne 'print if /^ \(C\) 1995-2004/ .. /^ jloup\@gzip.org/' \
  66. $(OBJS)/lib/$(ZLIB)/README \
  67. > $(TEMP)/$(NGINX)/docs/zlib.LICENSE
  68. touch -r $(OBJS)/lib/$(ZLIB)/README \
  69. $(TEMP)/$(NGINX)/docs/zlib.LICENSE
  70. cd $(TEMP) && zip -r ../$(NGINX).zip $(NGINX)
  71. icons: src/os/win32/nginx.ico
  72. # 48x48, 32x32 and 16x16 icons
  73. src/os/win32/nginx.ico: src/os/win32/nginx_icon48.xpm \
  74. src/os/win32/nginx_icon32.xpm \
  75. src/os/win32/nginx_icon16.xpm
  76. test -d $(TEMP) || mkdir $(TEMP)
  77. xpmtoppm --alphaout=$(TEMP)/nginx48.pbm \
  78. src/os/win32/nginx_icon48.xpm > $(TEMP)/nginx48.ppm
  79. xpmtoppm --alphaout=$(TEMP)/nginx32.pbm \
  80. src/os/win32/nginx_icon32.xpm > $(TEMP)/nginx32.ppm
  81. xpmtoppm --alphaout=$(TEMP)/nginx16.pbm \
  82. src/os/win32/nginx_icon16.xpm > $(TEMP)/nginx16.ppm
  83. ppmtowinicon -output src/os/win32/nginx.ico -andpgms \
  84. $(TEMP)/nginx48.ppm $(TEMP)/nginx48.pbm \
  85. $(TEMP)/nginx32.ppm $(TEMP)/nginx32.pbm \
  86. $(TEMP)/nginx16.ppm $(TEMP)/nginx16.pbm