GNUmakefile 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. VER = $(shell grep 'define NGINX_VERSION' src/core/nginx.h \
  2. | sed -e 's/^.*\"\(.*\)\"/\1/')
  3. NGINX = nginx-$(VER)
  4. TEMP = tmp
  5. REPO = $(shell svn info | sed -n 's/^Repository Root: //p')
  6. OBJS = objs.msvc8
  7. OPENSSL = openssl-0.9.8u
  8. ZLIB = zlib-1.2.5
  9. PCRE = pcre-8.30
  10. release:
  11. rm -rf $(TEMP)
  12. svn export -rHEAD . $(TEMP)/$(NGINX)
  13. mv $(TEMP)/$(NGINX)/auto/configure $(TEMP)/$(NGINX)
  14. # delete incomplete sources
  15. rm $(TEMP)/$(NGINX)/src/event/ngx_event_acceptex.c
  16. rm $(TEMP)/$(NGINX)/src/event/ngx_event_connectex.c
  17. rm $(TEMP)/$(NGINX)/src/event/modules/ngx_iocp_module.*
  18. rm -r $(TEMP)/$(NGINX)/src/os/win32
  19. rm -r $(TEMP)/$(NGINX)/src/mysql
  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. mv $(TEMP)/$(NGINX)/docs/man $(TEMP)/$(NGINX)
  24. $(MAKE) -f docs/GNUmakefile changes
  25. rm -r $(TEMP)/$(NGINX)/docs
  26. rm -r $(TEMP)/$(NGINX)/misc
  27. tar -c -z -f $(NGINX).tar.gz --directory $(TEMP) $(NGINX)
  28. RELEASE:
  29. test -d $(TEMP) || mkdir -p $(TEMP)
  30. echo "nginx-$(VER)-RELEASE" > $(TEMP)/message
  31. svn ci -F $(TEMP)/message
  32. echo "release-$(VER) tag" > $(TEMP)/message
  33. svn copy $(REPO)/branches/stable-1.0 \
  34. $(REPO)/tags/release-$(VER) \
  35. -F $(TEMP)/message
  36. svn up
  37. $(MAKE) -f misc/GNUmakefile release
  38. snapshot:
  39. rm -rf $(TEMP)
  40. mkdir -p $(TEMP)
  41. svn export . $(TEMP)/$(NGINX)
  42. mv $(TEMP)/$(NGINX)/auto/configure $(TEMP)/$(NGINX)
  43. # delete incomplete sources
  44. rm $(TEMP)/$(NGINX)/src/event/ngx_event_acceptex.c
  45. rm $(TEMP)/$(NGINX)/src/event/ngx_event_connectex.c
  46. rm $(TEMP)/$(NGINX)/src/event/modules/ngx_iocp_module.*
  47. rm -r $(TEMP)/$(NGINX)/src/os/win32
  48. rm -r $(TEMP)/$(NGINX)/src/mysql
  49. mv $(TEMP)/$(NGINX)/docs/text/LICENSE $(TEMP)/$(NGINX)
  50. mv $(TEMP)/$(NGINX)/docs/text/README $(TEMP)/$(NGINX)
  51. mv $(TEMP)/$(NGINX)/docs/html $(TEMP)/$(NGINX)
  52. mv $(TEMP)/$(NGINX)/docs/man $(TEMP)/$(NGINX)
  53. $(MAKE) -f docs/GNUmakefile changes
  54. rm -r $(TEMP)/$(NGINX)/docs
  55. rm -r $(TEMP)/$(NGINX)/misc
  56. tar -c -z -f $(NGINX).tar.gz --directory $(TEMP) $(NGINX)
  57. zip:
  58. rm -rf $(TEMP)
  59. rm -f $(NGINX).zip
  60. mkdir -p $(TEMP)/$(NGINX)/docs
  61. mkdir -p $(TEMP)/$(NGINX)/logs
  62. mkdir -p $(TEMP)/$(NGINX)/temp
  63. svn export -rHEAD conf $(TEMP)/$(NGINX)/conf/
  64. perl -pi -e 's/$$/\r/' $(TEMP)/$(NGINX)/conf/*
  65. svn export -rHEAD contrib $(TEMP)/$(NGINX)/contrib/
  66. svn export -rHEAD docs/html $(TEMP)/$(NGINX)/html/
  67. $(MAKE) -f docs/GNUmakefile changes
  68. cp -p $(OBJS)/nginx.exe $(TEMP)/$(NGINX)
  69. cp -p docs/text/LICENSE $(TEMP)/$(NGINX)/docs/
  70. cp -p docs/text/README $(TEMP)/$(NGINX)/docs/
  71. mv $(TEMP)/$(NGINX)/CHANGES* $(TEMP)/$(NGINX)/docs/
  72. cp -p $(OBJS)/lib/$(OPENSSL)/LICENSE \
  73. $(TEMP)/$(NGINX)/docs/OpenSSL.LICENSE
  74. cp -p $(OBJS)/lib/$(PCRE)/LICENCE \
  75. $(TEMP)/$(NGINX)/docs/PCRE.LICENCE
  76. perl -ne 'print if /^ \(C\) 1995-20/ .. /^ jloup\@gzip.org/' \
  77. $(OBJS)/lib/$(ZLIB)/README \
  78. > $(TEMP)/$(NGINX)/docs/zlib.LICENSE
  79. touch -r $(OBJS)/lib/$(ZLIB)/README \
  80. $(TEMP)/$(NGINX)/docs/zlib.LICENSE
  81. cd $(TEMP) && zip -r ../$(NGINX).zip $(NGINX)
  82. icons: src/os/win32/nginx.ico
  83. # 48x48, 32x32 and 16x16 icons
  84. src/os/win32/nginx.ico: src/os/win32/nginx_icon48.xpm \
  85. src/os/win32/nginx_icon32.xpm \
  86. src/os/win32/nginx_icon16.xpm
  87. test -d $(TEMP) || mkdir $(TEMP)
  88. xpmtoppm --alphaout=$(TEMP)/nginx48.pbm \
  89. src/os/win32/nginx_icon48.xpm > $(TEMP)/nginx48.ppm
  90. xpmtoppm --alphaout=$(TEMP)/nginx32.pbm \
  91. src/os/win32/nginx_icon32.xpm > $(TEMP)/nginx32.ppm
  92. xpmtoppm --alphaout=$(TEMP)/nginx16.pbm \
  93. src/os/win32/nginx_icon16.xpm > $(TEMP)/nginx16.ppm
  94. ppmtowinicon -output src/os/win32/nginx.ico -andpgms \
  95. $(TEMP)/nginx48.ppm $(TEMP)/nginx48.pbm \
  96. $(TEMP)/nginx32.ppm $(TEMP)/nginx32.pbm \
  97. $(TEMP)/nginx16.ppm $(TEMP)/nginx16.pbm