install 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. # Copyright (C) Igor Sysoev
  2. if [ $USE_PERL = YES ]; then
  3. cat << END >> $NGX_MAKEFILE
  4. install_perl_modules:
  5. cd $NGX_OBJS/src/http/modules/perl && make install
  6. END
  7. NGX_INSTALL_PERL_MODULES=install_perl_modules
  8. fi
  9. cat << END >> $NGX_MAKEFILE
  10. install: $NGX_OBJS${ngx_dirsep}nginx${ngx_binext} \
  11. $NGX_INSTALL_PERL_MODULES
  12. test -d '$NGX_PREFIX' || mkdir -p '$NGX_PREFIX'
  13. test -d '`dirname "$NGX_SBIN_PATH"`' \
  14. || mkdir -p '`dirname "$NGX_SBIN_PATH"`'
  15. test ! -f '$NGX_SBIN_PATH' || mv '$NGX_SBIN_PATH' '$NGX_SBIN_PATH.old'
  16. cp $NGX_OBJS/nginx '$NGX_SBIN_PATH'
  17. test -d '`dirname "$NGX_CONF_PATH"`' \
  18. || mkdir -p '`dirname "$NGX_CONF_PATH"`'
  19. cp conf/koi-win '`dirname "$NGX_CONF_PATH"`'
  20. cp conf/koi-utf '`dirname "$NGX_CONF_PATH"`'
  21. cp conf/win-utf '`dirname "$NGX_CONF_PATH"`'
  22. test -f '`dirname "$NGX_CONF_PATH"`/mime.types' || \
  23. cp conf/mime.types '`dirname "$NGX_CONF_PATH"`/mime.types'
  24. cp conf/mime.types '`dirname "$NGX_CONF_PATH"`/mime.types.default'
  25. test -f '$NGX_CONF_PATH' || cp conf/nginx.conf '$NGX_CONF_PATH'
  26. cp conf/nginx.conf '`dirname "$NGX_CONF_PATH"`/nginx.conf.default'
  27. test -d '`dirname "$NGX_PID_PATH"`' \
  28. || mkdir -p '`dirname "$NGX_PID_PATH"`'
  29. test -d '`dirname "$NGX_HTTP_LOG_PATH"`' || \
  30. mkdir -p '`dirname "$NGX_HTTP_LOG_PATH"`'
  31. test -d '$NGX_PREFIX/html' || cp -r html '$NGX_PREFIX'
  32. END
  33. if test -n "$NGX_ERROR_LOG_PATH"; then
  34. cat << END >> $NGX_MAKEFILE
  35. test -d '`dirname "$NGX_ERROR_LOG_PATH"`' || \
  36. mkdir -p '`dirname "$NGX_ERROR_LOG_PATH"`'
  37. END
  38. fi