comparison misc/GNUmakefile @ 5161:a5f7d455e271 stable-1.2

Merge of r5130, r5131, r5132: support for Mercurial repositories. *) Misc: switch to single export operation in "zip" target. While exporting parts of the tree might be better in some cases, it is awfully slow overseas, and also requires unlocking ssh key multiple times. Exporting the whole repo and removing directories not needed for zip is faster here. It is also a required step before we can switch to Mercurial. *) Misc: removed unused "snapshot" target. *) Misc: support for Mercurial repositories.
author Maxim Dounin <mdounin@mdounin.ru>
date Fri, 29 Mar 2013 18:09:06 +0000
parents 0112e3dcc51b
children
comparison
equal deleted inserted replaced
5160:ab992c25770c 5161:a5f7d455e271
9 OPENSSL = openssl-1.0.1e 9 OPENSSL = openssl-1.0.1e
10 ZLIB = zlib-1.2.7 10 ZLIB = zlib-1.2.7
11 PCRE = pcre-8.32 11 PCRE = pcre-8.32
12 12
13 13
14 release: 14 release: export
15 rm -rf $(TEMP)
16
17 svn export -rHEAD . $(TEMP)/$(NGINX)
18 15
19 mv $(TEMP)/$(NGINX)/auto/configure $(TEMP)/$(NGINX) 16 mv $(TEMP)/$(NGINX)/auto/configure $(TEMP)/$(NGINX)
20 17
21 # delete incomplete sources 18 # delete incomplete sources
22 rm $(TEMP)/$(NGINX)/src/event/ngx_event_acceptex.c 19 rm $(TEMP)/$(NGINX)/src/event/ngx_event_acceptex.c
37 rm -r $(TEMP)/$(NGINX)/misc 34 rm -r $(TEMP)/$(NGINX)/misc
38 35
39 tar -c -z -f $(NGINX).tar.gz --directory $(TEMP) $(NGINX) 36 tar -c -z -f $(NGINX).tar.gz --directory $(TEMP) $(NGINX)
40 37
41 38
39 export:
40 rm -rf $(TEMP)
41
42 if [ -d .svn ]; then \
43 svn export -rHEAD . $(TEMP)/$(NGINX); \
44 else \
45 hg archive -X '.hg*' $(TEMP)/$(NGINX); \
46 fi
47
48
42 RELEASE: 49 RELEASE:
50 if [ -d .svn ]; then \
51 $(MAKE) -f misc/GNUmakefile RELEASE.svn; \
52 else \
53 $(MAKE) -f misc/GNUmakefile RELEASE.hg; \
54 fi
55
56 $(MAKE) -f misc/GNUmakefile release
57
58
59 RELEASE.hg:
60 hg ci -m nginx-$(VER)-RELEASE
61 hg tag -m "release-$(VER) tag" release-$(VER)
62
63
64 RELEASE.svn:
43 test -d $(TEMP) || mkdir -p $(TEMP) 65 test -d $(TEMP) || mkdir -p $(TEMP)
44 66
45 echo "nginx-$(VER)-RELEASE" > $(TEMP)/message 67 echo "nginx-$(VER)-RELEASE" > $(TEMP)/message
46 svn ci -F $(TEMP)/message 68 svn ci -F $(TEMP)/message
47 69
50 $(REPO)/tags/release-$(VER) \ 72 $(REPO)/tags/release-$(VER) \
51 -F $(TEMP)/message 73 -F $(TEMP)/message
52 74
53 svn up 75 svn up
54 76
55 $(MAKE) -f misc/GNUmakefile release
56
57
58 snapshot:
59 rm -rf $(TEMP)
60
61 mkdir -p $(TEMP)
62 svn export . $(TEMP)/$(NGINX)
63
64 mv $(TEMP)/$(NGINX)/auto/configure $(TEMP)/$(NGINX)
65
66 # delete incomplete sources
67 rm $(TEMP)/$(NGINX)/src/event/ngx_event_acceptex.c
68 rm $(TEMP)/$(NGINX)/src/event/ngx_event_connectex.c
69 rm $(TEMP)/$(NGINX)/src/event/modules/ngx_iocp_module.*
70 rm -r $(TEMP)/$(NGINX)/src/os/win32
71
72 rm -r $(TEMP)/$(NGINX)/src/mysql
73
74 mv $(TEMP)/$(NGINX)/docs/text/LICENSE $(TEMP)/$(NGINX)
75 mv $(TEMP)/$(NGINX)/docs/text/README $(TEMP)/$(NGINX)
76 mv $(TEMP)/$(NGINX)/docs/html $(TEMP)/$(NGINX)
77 mv $(TEMP)/$(NGINX)/docs/man $(TEMP)/$(NGINX)
78
79 $(MAKE) -f docs/GNUmakefile changes
80
81 rm -r $(TEMP)/$(NGINX)/docs
82 rm -r $(TEMP)/$(NGINX)/misc
83
84 tar -c -z -f $(NGINX).tar.gz --directory $(TEMP) $(NGINX)
85 77
86 win32: 78 win32:
87 ./auto/configure \ 79 ./auto/configure \
88 --with-cc=cl \ 80 --with-cc=cl \
89 --builddir=$(OBJS) \ 81 --builddir=$(OBJS) \
118 --with-openssl-opt=enable-tlsext \ 110 --with-openssl-opt=enable-tlsext \
119 --with-http_ssl_module \ 111 --with-http_ssl_module \
120 --with-mail_ssl_module \ 112 --with-mail_ssl_module \
121 --with-ipv6 113 --with-ipv6
122 114
123 zip: 115
124 rm -rf $(TEMP) 116 zip: export
125 rm -f $(NGINX).zip 117 rm -f $(NGINX).zip
126 118
127 mkdir -p $(TEMP)/$(NGINX)/docs 119 mkdir -p $(TEMP)/$(NGINX)/docs.new
128 mkdir -p $(TEMP)/$(NGINX)/logs 120 mkdir -p $(TEMP)/$(NGINX)/logs
129 mkdir -p $(TEMP)/$(NGINX)/temp 121 mkdir -p $(TEMP)/$(NGINX)/temp
130 122
131 svn export -rHEAD conf $(TEMP)/$(NGINX)/conf/
132 sed -i '' -e "s/$$/`printf '\r'`/" $(TEMP)/$(NGINX)/conf/* 123 sed -i '' -e "s/$$/`printf '\r'`/" $(TEMP)/$(NGINX)/conf/*
133 124
134 svn export -rHEAD contrib $(TEMP)/$(NGINX)/contrib/ 125 mv $(TEMP)/$(NGINX)/docs/text/LICENSE $(TEMP)/$(NGINX)/docs.new
135 svn export -rHEAD docs/html $(TEMP)/$(NGINX)/html/ 126 mv $(TEMP)/$(NGINX)/docs/text/README $(TEMP)/$(NGINX)/docs.new
127 mv $(TEMP)/$(NGINX)/docs/html $(TEMP)/$(NGINX)
136 128
137 $(MAKE) -f docs/GNUmakefile changes 129 rm -r $(TEMP)/$(NGINX)/docs
130 mv $(TEMP)/$(NGINX)/docs.new $(TEMP)/$(NGINX)/docs
138 131
139 cp -p $(OBJS)/nginx.exe $(TEMP)/$(NGINX) 132 cp -p $(OBJS)/nginx.exe $(TEMP)/$(NGINX)
140 133
141 cp -p docs/text/LICENSE $(TEMP)/$(NGINX)/docs/ 134 $(MAKE) -f docs/GNUmakefile changes
142 cp -p docs/text/README $(TEMP)/$(NGINX)/docs/
143 mv $(TEMP)/$(NGINX)/CHANGES* $(TEMP)/$(NGINX)/docs/ 135 mv $(TEMP)/$(NGINX)/CHANGES* $(TEMP)/$(NGINX)/docs/
144 136
145 cp -p $(OBJS)/lib/$(OPENSSL)/LICENSE \ 137 cp -p $(OBJS)/lib/$(OPENSSL)/LICENSE \
146 $(TEMP)/$(NGINX)/docs/OpenSSL.LICENSE 138 $(TEMP)/$(NGINX)/docs/OpenSSL.LICENSE
147 139
152 $(OBJS)/lib/$(ZLIB)/README \ 144 $(OBJS)/lib/$(ZLIB)/README \
153 > $(TEMP)/$(NGINX)/docs/zlib.LICENSE 145 > $(TEMP)/$(NGINX)/docs/zlib.LICENSE
154 146
155 touch -r $(OBJS)/lib/$(ZLIB)/README \ 147 touch -r $(OBJS)/lib/$(ZLIB)/README \
156 $(TEMP)/$(NGINX)/docs/zlib.LICENSE 148 $(TEMP)/$(NGINX)/docs/zlib.LICENSE
149
150 rm -r $(TEMP)/$(NGINX)/auto
151 rm -r $(TEMP)/$(NGINX)/misc
152 rm -r $(TEMP)/$(NGINX)/src
157 153
158 cd $(TEMP) && zip -r ../$(NGINX).zip $(NGINX) 154 cd $(TEMP) && zip -r ../$(NGINX).zip $(NGINX)
159 155
160 156
161 icons: src/os/win32/nginx.ico 157 icons: src/os/win32/nginx.ico