Mercurial > hg > nginx-quic
annotate auto/install @ 3809:3782535f8daf
release-0.9.1 tag
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 30 Nov 2010 13:10:33 +0000 |
parents | 569716d0e447 |
children | 7e3c557c2604 025396b57ec1 |
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 | |
56 ./*) | |
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 | |
469 | 75 cat << END >> $NGX_MAKEFILE |
467 | 76 |
3801
569716d0e447
add man page in release tarball and fix man building procedure
Igor Sysoev <igor@sysoev.ru>
parents:
3788
diff
changeset
|
77 manpage: |
3788 | 78 sed -e "s|%%PREFIX%%|$NGX_PREFIX|" \\ |
79 -e "s|%%PID_PATH%%|$NGX_PID_PATH|" \\ | |
80 -e "s|%%CONF_PATH%%|$NGX_CONF_PATH|" \\ | |
81 -e "s|%%ERROR_LOG_PATH%%|$NGX_ERROR_LOG_PATH|" \\ | |
3801
569716d0e447
add man page in release tarball and fix man building procedure
Igor Sysoev <igor@sysoev.ru>
parents:
3788
diff
changeset
|
82 < man/nginx.8 > $NGX_OBJS/nginx.8 |
3788 | 83 |
2009 | 84 install: $NGX_OBJS${ngx_dirsep}nginx${ngx_binext} \ |
599 | 85 $NGX_INSTALL_PERL_MODULES |
2009 | 86 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
|
87 |
2009 | 88 test -d '\$(DESTDIR)`dirname "$NGX_SBIN_PATH"`' \ |
89 || mkdir -p '\$(DESTDIR)`dirname "$NGX_SBIN_PATH"`' | |
90 test ! -f '\$(DESTDIR)$NGX_SBIN_PATH' \ | |
91 || mv '\$(DESTDIR)$NGX_SBIN_PATH' \ | |
92 '\$(DESTDIR)$NGX_SBIN_PATH.old' | |
93 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
|
94 |
2009 | 95 test -d '\$(DESTDIR)$NGX_CONF_PREFIX' \ |
96 || 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
|
97 |
2009 | 98 cp conf/koi-win '\$(DESTDIR)$NGX_CONF_PREFIX' |
99 cp conf/koi-utf '\$(DESTDIR)$NGX_CONF_PREFIX' | |
100 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
|
101 |
2009 | 102 test -f '\$(DESTDIR)$NGX_CONF_PREFIX/mime.types' \ |
103 || cp conf/mime.types '\$(DESTDIR)$NGX_CONF_PREFIX' | |
104 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
|
105 |
2009 | 106 test -f '\$(DESTDIR)$NGX_CONF_PREFIX/fastcgi_params' \ |
107 || cp conf/fastcgi_params '\$(DESTDIR)$NGX_CONF_PREFIX' | |
108 cp conf/fastcgi_params \ | |
109 '\$(DESTDIR)$NGX_CONF_PREFIX/fastcgi_params.default' | |
1352 | 110 |
3383 | 111 test -f '\$(DESTDIR)$NGX_CONF_PREFIX/fastcgi.conf' \ |
112 || cp conf/fastcgi.conf '\$(DESTDIR)$NGX_CONF_PREFIX' | |
113 cp conf/fastcgi.conf '\$(DESTDIR)$NGX_CONF_PREFIX/fastcgi.conf.default' | |
114 | |
3609 | 115 test -f '\$(DESTDIR)$NGX_CONF_PREFIX/uwsgi_params' \ |
116 || cp conf/uwsgi_params '\$(DESTDIR)$NGX_CONF_PREFIX' | |
117 cp conf/uwsgi_params \ | |
118 '\$(DESTDIR)$NGX_CONF_PREFIX/uwsgi_params.default' | |
119 | |
3637 | 120 test -f '\$(DESTDIR)$NGX_CONF_PREFIX/scgi_params' \ |
121 || cp conf/scgi_params '\$(DESTDIR)$NGX_CONF_PREFIX' | |
122 cp conf/scgi_params \ | |
123 '\$(DESTDIR)$NGX_CONF_PREFIX/scgi_params.default' | |
124 | |
2009 | 125 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
|
126 || cp conf/nginx.conf '\$(DESTDIR)$NGX_CONF_PATH' |
2009 | 127 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
|
128 |
2009 | 129 test -d '\$(DESTDIR)`dirname "$NGX_PID_PATH"`' \ |
130 || 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
|
131 |
2009 | 132 test -d '\$(DESTDIR)`dirname "$NGX_HTTP_LOG_PATH"`' || \ |
133 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
|
134 |
2009 | 135 test -d '\$(DESTDIR)$NGX_PREFIX/html' \ |
136 || cp -r 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
|
137 END |
f390d1775430
nginx-0.1.0-2004-09-27-20:03:21 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
138 |
f390d1775430
nginx-0.1.0-2004-09-27-20:03:21 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
139 |
2009 | 140 if test -n "\$(DESTDIR)$NGX_ERROR_LOG_PATH"; then |
469 | 141 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
|
142 |
2009 | 143 test -d '\$(DESTDIR)`dirname "$NGX_ERROR_LOG_PATH"`' || \ |
144 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
|
145 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
|
146 |
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
|
147 fi |
2850
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
148 |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
149 |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
150 # create Makefile |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
151 |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
152 cat << END >> Makefile |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
153 |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
154 build: |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
155 \$(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
|
156 \$(MAKE) -f $NGX_MAKEFILE manpage |
2850
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
157 |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
158 install: |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
159 \$(MAKE) -f $NGX_MAKEFILE install |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
160 |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
161 upgrade: |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
162 $NGX_SBIN_PATH -t |
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 kill -USR2 \`cat $NGX_PID_PATH\` |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
165 sleep 1 |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
166 test -f $NGX_PID_PATH.oldbin |
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 kill -QUIT \`cat $NGX_PID_PATH.oldbin\` |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
169 END |