Mercurial > hg > nginx-quic
annotate auto/install @ 4324:b8c01edadbc6
Version bump.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Tue, 06 Dec 2011 13:22:32 +0000 |
parents | b375a7f0d51a |
children | 9346356e433d |
rev | line source |
---|---|
444
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
440
diff
changeset
|
1 |
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
440
diff
changeset
|
2 # Copyright (C) Igor Sysoev |
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
440
diff
changeset
|
3 |
440
f390d1775430
nginx-0.1.0-2004-09-27-20:03:21 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
4 |
599 | 5 if [ $USE_PERL = YES ]; then |
6 | |
7 cat << END >> $NGX_MAKEFILE | |
8 | |
9 install_perl_modules: | |
10 cd $NGX_OBJS/src/http/modules/perl && make install | |
11 END | |
12 | |
13 NGX_INSTALL_PERL_MODULES=install_perl_modules | |
14 | |
15 fi | |
16 | |
17 | |
2758 | 18 case ".$NGX_SBIN_PATH" in |
19 ./*) | |
20 ;; | |
21 | |
22 .) | |
23 NGX_SBIN_PATH=$NGX_PREFIX/sbin/nginx | |
24 ;; | |
25 | |
26 *) | |
27 NGX_SBIN_PATH=$NGX_PREFIX/$NGX_SBIN_PATH | |
28 ;; | |
29 esac | |
30 | |
31 | |
32 case ".$NGX_CONF_PATH" in | |
33 ./*) | |
34 ;; | |
35 | |
36 *) | |
37 NGX_CONF_PATH=$NGX_PREFIX/$NGX_CONF_PATH | |
38 ;; | |
39 esac | |
40 | |
41 | |
42 NGX_CONF_PREFIX=`dirname $NGX_CONF_PATH` | |
43 | |
44 | |
45 case ".$NGX_PID_PATH" in | |
46 ./*) | |
47 ;; | |
48 | |
49 *) | |
50 NGX_PID_PATH=$NGX_PREFIX/$NGX_PID_PATH | |
51 ;; | |
52 esac | |
53 | |
54 | |
55 case ".$NGX_ERROR_LOG_PATH" in | |
4199
874a2f505e2a
Fixed configuration summary and manpage contents for the special
Ruslan Ermilov <ru@nginx.com>
parents:
4007
diff
changeset
|
56 ./* | .) |
2758 | 57 ;; |
58 | |
59 *) | |
60 NGX_ERROR_LOG_PATH=$NGX_PREFIX/$NGX_ERROR_LOG_PATH | |
61 ;; | |
62 esac | |
63 | |
64 | |
65 case ".$NGX_HTTP_LOG_PATH" in | |
66 ./*) | |
67 ;; | |
68 | |
69 *) | |
70 NGX_HTTP_LOG_PATH=$NGX_PREFIX/$NGX_HTTP_LOG_PATH | |
71 ;; | |
72 esac | |
73 | |
74 | |
4303
b375a7f0d51a
Made it possible to build/install from the SVN checkout.
Ruslan Ermilov <ru@nginx.com>
parents:
4199
diff
changeset
|
75 if test -e man/nginx.8 ; then |
b375a7f0d51a
Made it possible to build/install from the SVN checkout.
Ruslan Ermilov <ru@nginx.com>
parents:
4199
diff
changeset
|
76 NGX_MAN=man/nginx.8 |
b375a7f0d51a
Made it possible to build/install from the SVN checkout.
Ruslan Ermilov <ru@nginx.com>
parents:
4199
diff
changeset
|
77 else |
b375a7f0d51a
Made it possible to build/install from the SVN checkout.
Ruslan Ermilov <ru@nginx.com>
parents:
4199
diff
changeset
|
78 NGX_MAN=docs/man/nginx.8 |
b375a7f0d51a
Made it possible to build/install from the SVN checkout.
Ruslan Ermilov <ru@nginx.com>
parents:
4199
diff
changeset
|
79 fi |
b375a7f0d51a
Made it possible to build/install from the SVN checkout.
Ruslan Ermilov <ru@nginx.com>
parents:
4199
diff
changeset
|
80 |
b375a7f0d51a
Made it possible to build/install from the SVN checkout.
Ruslan Ermilov <ru@nginx.com>
parents:
4199
diff
changeset
|
81 if test -d html ; then |
b375a7f0d51a
Made it possible to build/install from the SVN checkout.
Ruslan Ermilov <ru@nginx.com>
parents:
4199
diff
changeset
|
82 NGX_HTML=html |
b375a7f0d51a
Made it possible to build/install from the SVN checkout.
Ruslan Ermilov <ru@nginx.com>
parents:
4199
diff
changeset
|
83 else |
b375a7f0d51a
Made it possible to build/install from the SVN checkout.
Ruslan Ermilov <ru@nginx.com>
parents:
4199
diff
changeset
|
84 NGX_HTML=docs/html |
b375a7f0d51a
Made it possible to build/install from the SVN checkout.
Ruslan Ermilov <ru@nginx.com>
parents:
4199
diff
changeset
|
85 fi |
b375a7f0d51a
Made it possible to build/install from the SVN checkout.
Ruslan Ermilov <ru@nginx.com>
parents:
4199
diff
changeset
|
86 |
469 | 87 cat << END >> $NGX_MAKEFILE |
467 | 88 |
4007
7e3c557c2604
Rebuild manpage only if needed.
Maxim Dounin <mdounin@mdounin.ru>
parents:
3801
diff
changeset
|
89 manpage: $NGX_OBJS/nginx.8 |
7e3c557c2604
Rebuild manpage only if needed.
Maxim Dounin <mdounin@mdounin.ru>
parents:
3801
diff
changeset
|
90 |
4303
b375a7f0d51a
Made it possible to build/install from the SVN checkout.
Ruslan Ermilov <ru@nginx.com>
parents:
4199
diff
changeset
|
91 $NGX_OBJS/nginx.8: $NGX_MAN $NGX_AUTO_CONFIG_H |
3788 | 92 sed -e "s|%%PREFIX%%|$NGX_PREFIX|" \\ |
93 -e "s|%%PID_PATH%%|$NGX_PID_PATH|" \\ | |
94 -e "s|%%CONF_PATH%%|$NGX_CONF_PATH|" \\ | |
4199
874a2f505e2a
Fixed configuration summary and manpage contents for the special
Ruslan Ermilov <ru@nginx.com>
parents:
4007
diff
changeset
|
95 -e "s|%%ERROR_LOG_PATH%%|${NGX_ERROR_LOG_PATH:-stderr}|" \\ |
4303
b375a7f0d51a
Made it possible to build/install from the SVN checkout.
Ruslan Ermilov <ru@nginx.com>
parents:
4199
diff
changeset
|
96 < $NGX_MAN > \$@ |
3788 | 97 |
2009 | 98 install: $NGX_OBJS${ngx_dirsep}nginx${ngx_binext} \ |
599 | 99 $NGX_INSTALL_PERL_MODULES |
2009 | 100 test -d '\$(DESTDIR)$NGX_PREFIX' || mkdir -p '\$(DESTDIR)$NGX_PREFIX' |
440
f390d1775430
nginx-0.1.0-2004-09-27-20:03:21 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
101 |
2009 | 102 test -d '\$(DESTDIR)`dirname "$NGX_SBIN_PATH"`' \ |
103 || mkdir -p '\$(DESTDIR)`dirname "$NGX_SBIN_PATH"`' | |
104 test ! -f '\$(DESTDIR)$NGX_SBIN_PATH' \ | |
105 || mv '\$(DESTDIR)$NGX_SBIN_PATH' \ | |
106 '\$(DESTDIR)$NGX_SBIN_PATH.old' | |
107 cp $NGX_OBJS/nginx '\$(DESTDIR)$NGX_SBIN_PATH' | |
440
f390d1775430
nginx-0.1.0-2004-09-27-20:03:21 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
108 |
2009 | 109 test -d '\$(DESTDIR)$NGX_CONF_PREFIX' \ |
110 || mkdir -p '\$(DESTDIR)$NGX_CONF_PREFIX' | |
440
f390d1775430
nginx-0.1.0-2004-09-27-20:03:21 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
111 |
2009 | 112 cp conf/koi-win '\$(DESTDIR)$NGX_CONF_PREFIX' |
113 cp conf/koi-utf '\$(DESTDIR)$NGX_CONF_PREFIX' | |
114 cp conf/win-utf '\$(DESTDIR)$NGX_CONF_PREFIX' | |
440
f390d1775430
nginx-0.1.0-2004-09-27-20:03:21 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
115 |
2009 | 116 test -f '\$(DESTDIR)$NGX_CONF_PREFIX/mime.types' \ |
117 || cp conf/mime.types '\$(DESTDIR)$NGX_CONF_PREFIX' | |
118 cp conf/mime.types '\$(DESTDIR)$NGX_CONF_PREFIX/mime.types.default' | |
440
f390d1775430
nginx-0.1.0-2004-09-27-20:03:21 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
119 |
2009 | 120 test -f '\$(DESTDIR)$NGX_CONF_PREFIX/fastcgi_params' \ |
121 || cp conf/fastcgi_params '\$(DESTDIR)$NGX_CONF_PREFIX' | |
122 cp conf/fastcgi_params \ | |
123 '\$(DESTDIR)$NGX_CONF_PREFIX/fastcgi_params.default' | |
1352 | 124 |
3383 | 125 test -f '\$(DESTDIR)$NGX_CONF_PREFIX/fastcgi.conf' \ |
126 || cp conf/fastcgi.conf '\$(DESTDIR)$NGX_CONF_PREFIX' | |
127 cp conf/fastcgi.conf '\$(DESTDIR)$NGX_CONF_PREFIX/fastcgi.conf.default' | |
128 | |
3609 | 129 test -f '\$(DESTDIR)$NGX_CONF_PREFIX/uwsgi_params' \ |
130 || cp conf/uwsgi_params '\$(DESTDIR)$NGX_CONF_PREFIX' | |
131 cp conf/uwsgi_params \ | |
132 '\$(DESTDIR)$NGX_CONF_PREFIX/uwsgi_params.default' | |
133 | |
3637 | 134 test -f '\$(DESTDIR)$NGX_CONF_PREFIX/scgi_params' \ |
135 || cp conf/scgi_params '\$(DESTDIR)$NGX_CONF_PREFIX' | |
136 cp conf/scgi_params \ | |
137 '\$(DESTDIR)$NGX_CONF_PREFIX/scgi_params.default' | |
138 | |
2009 | 139 test -f '\$(DESTDIR)$NGX_CONF_PATH' \ |
2982
fe23e95ba993
name of file specified in --conf-path was not honored during installation
Igor Sysoev <igor@sysoev.ru>
parents:
2850
diff
changeset
|
140 || cp conf/nginx.conf '\$(DESTDIR)$NGX_CONF_PATH' |
2009 | 141 cp conf/nginx.conf '\$(DESTDIR)$NGX_CONF_PREFIX/nginx.conf.default' |
440
f390d1775430
nginx-0.1.0-2004-09-27-20:03:21 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
142 |
2009 | 143 test -d '\$(DESTDIR)`dirname "$NGX_PID_PATH"`' \ |
144 || mkdir -p '\$(DESTDIR)`dirname "$NGX_PID_PATH"`' | |
440
f390d1775430
nginx-0.1.0-2004-09-27-20:03:21 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
145 |
2009 | 146 test -d '\$(DESTDIR)`dirname "$NGX_HTTP_LOG_PATH"`' || \ |
147 mkdir -p '\$(DESTDIR)`dirname "$NGX_HTTP_LOG_PATH"`' | |
440
f390d1775430
nginx-0.1.0-2004-09-27-20:03:21 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
148 |
2009 | 149 test -d '\$(DESTDIR)$NGX_PREFIX/html' \ |
4303
b375a7f0d51a
Made it possible to build/install from the SVN checkout.
Ruslan Ermilov <ru@nginx.com>
parents:
4199
diff
changeset
|
150 || cp -R $NGX_HTML '\$(DESTDIR)$NGX_PREFIX' |
440
f390d1775430
nginx-0.1.0-2004-09-27-20:03:21 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
151 END |
f390d1775430
nginx-0.1.0-2004-09-27-20:03:21 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
152 |
f390d1775430
nginx-0.1.0-2004-09-27-20:03:21 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
153 |
4199
874a2f505e2a
Fixed configuration summary and manpage contents for the special
Ruslan Ermilov <ru@nginx.com>
parents:
4007
diff
changeset
|
154 if test -n "$NGX_ERROR_LOG_PATH"; then |
469 | 155 cat << END >> $NGX_MAKEFILE |
444
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
440
diff
changeset
|
156 |
2009 | 157 test -d '\$(DESTDIR)`dirname "$NGX_ERROR_LOG_PATH"`' || \ |
158 mkdir -p '\$(DESTDIR)`dirname "$NGX_ERROR_LOG_PATH"`' | |
444
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
440
diff
changeset
|
159 END |
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
440
diff
changeset
|
160 |
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
440
diff
changeset
|
161 fi |
2850
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
162 |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
163 |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
164 # create Makefile |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
165 |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
166 cat << END >> Makefile |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
167 |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
168 build: |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
169 \$(MAKE) -f $NGX_MAKEFILE |
3801
569716d0e447
add man page in release tarball and fix man building procedure
Igor Sysoev <igor@sysoev.ru>
parents:
3788
diff
changeset
|
170 \$(MAKE) -f $NGX_MAKEFILE manpage |
2850
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
171 |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
172 install: |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
173 \$(MAKE) -f $NGX_MAKEFILE install |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
174 |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
175 upgrade: |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
176 $NGX_SBIN_PATH -t |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
177 |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
178 kill -USR2 \`cat $NGX_PID_PATH\` |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
179 sleep 1 |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
180 test -f $NGX_PID_PATH.oldbin |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
181 |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
182 kill -QUIT \`cat $NGX_PID_PATH.oldbin\` |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
183 END |