精读 Nginx 源码自动脚本篇(3)源码相关变量脚本 auto/sources
精读 Nginx 源码自动脚本篇(3)源码相关变量脚本 auto/sources- Author: Poechant
- Blog:?blog.CSDN.net/Poechant
- Email: zhongchao.ustc#gmail.com (#->@)
- Date: March 6th, 2012
- Copyright ? 柳大Poechant
在configure脚本中,运行完auto/options和auto/init脚本后,接下来就运行auto/soures脚本。这个脚本是为编译做准备的。
目录- 核心模块
- 事件模块
- OpenSSL 模块相关变量
- 事件驱动模块
- 操作系统相关项
- HTTP 模块
- 邮件模块
- Google PerfTools 模块
- C++ 测试模块
1 核心模块1.1 核心模块名称 CORE_MODULES
CORE_MODULES变量记录 Nginx 的核心模块,默认包括ngx_core_module、ngx_errlog_module和ngx_conf_module,相应初始化代码如下:
CORE_MODULES="ngx_core_module ngx_errlog_module ngx_conf_module"
1.2 核心模块头文件所在目录 CORE_INCS
INCS 的含义是 includes。
CORE_INCS="src/core"
1.3 核心模块头文件 CORE_DEPS
DEPS 的含义是 depandencies,包含src/core目录下的 30 个源文件,唯独没有src/core/regex.h文件。
CORE_DEPS="src/core/nginx.h \ src/core/ngx_config.h \ ... src/core/ngx_open_file_cache.h \ src/core/ngx_crypt.h"
1.4 核心模块源文件 CORE_SRCS
SRCS 的含义是 sources,包含src/core目录下的 29 个源文件,仅仅没有src/core/regex.c文件。
CORE_SRCS="src/core/nginx.c \ src/core/ngx_log.c \ ... src/core/ngx_open_file_cache.c \ src/core/ngx_crypt.c"
正则表达式的内容也是核心模块的一部分,分别是src/core/regex.h和src/core/regex.c。
REGEX_DEPS=src/core/ngx_regex.hREGEX_SRCS=src/core/ngx_regex.c
2 事件模块2.1 事件模块名称 EVENT_MODULES
该模块包括ngx_events_module和ngx_event_core_module。
EVENT_MODULES="ngx_events_module ngx_event_core_module"
2.2 事件模块头文件所在目录 EVENT_INCS
相应的头文件所在目录也包含两部分。
EVENT_INCS="src/event src/event/modules"
2.3 事件模块头文件 EVENT_DEPS
包括六个头文件,都位于src/event目录下,唯独不包含该目录下的src/event/ngx_event_openssl.h文件,该文件属于 OpenSSL 模块的头文件。
EVENT_DEPS="src/event/ngx_event.h \ src/event/ngx_event_timer.h \ src/event/ngx_event_posted.h \ src/event/ngx_event_busy_lock.h \ src/event/ngx_event_connect.h \ src/event/ngx_event_pipe.h"
2.4 事件模块源文件 EVENT_SRCS
包含七个头文件,都位于src/event目录下,该目录下的另外两个文件ngx_event_openssl和ngx_event_mutex。
EVENT_SRCS="src/event/ngx_event.c \ src/event/ngx_event_timer.c \ src/event/ngx_event_posted.c \ src/event/ngx_event_busy_lock.c \ src/event/ngx_event_accept.c \ src/event/ngx_event_connect.c \ src/event/ngx_event_pipe.c"
3 OpenSSL 模块相关变量3.1 OpenSSL 模块名称 OPENSSL_MODULE
OPENSSL_MODULE:是 OpenSSL 变量的名称,为ngx_openssl_module。
3.2 OpenSSl 模块源文件与头文件 OPENSSL_DEPS 和 OPENSSL_SRCS
OPENSSL_DEPS和OPENSSL_SRCS:是 OpenSSL 的源文件和头文件。
OPENSSL_MODULE=ngx_openssl_moduleOPENSSL_DEPS=src/event/ngx_event_openssl.hOPENSSL_SRCS=src/event/ngx_event_openssl.c
4 事件驱动模型
模型包括 select、poll、kqueue、devpoll、eventport、epoll、rtsig、iocp、aio。后面我会专门写一篇关于事件驱动方面的博文,来详细介绍这些事件驱动模型的原理和异同。这里先不赘述。
4.1 select 模型SELECT_MODULE=ngx_select_moduleSELECT_SRCS=src/event/modules/ngx_select_module.cWIN32_SELECT_SRCS=src/event/modules/ngx_win32_select_module.c
4.2 poll 模型POLL_MODULE=ngx_poll_modulePOLL_SRCS=src/event/modules/ngx_poll_module.c
4.3 kqueue 模型KQUEUE_MODULE=ngx_kqueue_moduleKQUEUE_SRCS=src/event/modules/ngx_kqueue_module.c
4.4 devpoll 模型DEVPOLL_MODULE=ngx_devpoll_moduleDEVPOLL_SRCS=src/event/modules/ngx_devpoll_module.c
4.5 eventport 模型EVENTPORT_MODULE=ngx_eventport_moduleEVENTPORT_SRCS=src/event/modules/ngx_eventport_module.c
4.5 epoll 模型EPOLL_MODULE=ngx_epoll_moduleEPOLL_SRCS=src/event/modules/ngx_epoll_module.c
4.6 rtsig 模型RTSIG_MODULE=ngx_rtsig_moduleRTSIG_SRCS=src/event/modules/ngx_rtsig_module.c
4.7 iocp 模型IOCP_MODULE=ngx_iocp_moduleIOCP_SRCS=src/event/modules/ngx_iocp_module.c
4.8 aio 模型AIO_MODULE=ngx_aio_moduleAIO_SRCS="src/event/modules/ngx_aio_module.c \ src/os/unix/ngx_aio_read.c \ src/os/unix/ngx_aio_write.c \ src/os/unix/ngx_aio_read_chain.c \ src/os/unix/ngx_aio_write_chain.c"FILE_AIO_SRCS="src/os/unix/ngx_file_aio_read.c"LINUX_AIO_SRCS="src/os/unix/ngx_linux_aio_read.c"
5 操作系统相关项5.1 UNIX
相关的头文件所在的目录为:
UNIX_INCS="$CORE_INCS $EVENT_INCS src/os/unix"
所有相关的头文件为:
UNIX_DEPS="$CORE_DEPS $EVENT_DEPS \ src/os/unix/ngx_time.h \ src/os/unix/ngx_errno.h \ ... src/os/unix/ngx_process_cycle.h"
所有相关的源文件为:
UNIX_SRCS="$CORE_SRCS $EVENT_SRCS \ src/os/unix/ngx_time.c \ src/os/unix/ngx_errno.c \ ... src/os/unix/ngx_process_cycle.c"
5.2 POSIXPOSIX_DEPS=src/os/unix/ngx_posix_config.h
5.3 FreeBSD
相关的头文件:
FREEBSD_DEPS="src/os/unix/ngx_freebsd_config.h src/os/unix/ngx_freebsd.h"
相关的源文件:
FREEBSD_SRCS=src/os/unix/ngx_freebsd_init.c
有关 Sendfile 机制的源文件:
FREEBSD_SENDFILE_SRCS=src/os/unix/ngx_freebsd_sendfile_chain.c
Rfork相关的文件:
FREEBSD_RFORK_DEPS="src/os/unix/ngx_freebsd_rfork_thread.h"FREEBSD_RFORK_SRCS="src/os/unix/ngx_freebsd_rfork_thread.c"FREEBSD_RFORK_THREAD_SRCS="src/os/unix/rfork_thread.S"
5.4 pthreadPTHREAD_SRCS="src/os/unix/ngx_pthread_thread.c"
5.5 Linux
相关的头文件:
LINUX_DEPS="src/os/unix/ngx_linux_config.h src/os/unix/ngx_linux.h"
相关的源文件:
LINUX_SRCS=src/os/unix/ngx_linux_init.c
有关 Sendfile 机制的源文件:
LINUX_SENDFILE_SRCS=src/os/unix/ngx_linux_sendfile_chain.c
5.6 Solaris
相关的头文件:
SOLARIS_DEPS="src/os/unix/ngx_solaris_config.h src/os/unix/ngx_solaris.h"
相关的源文件:
SOLARIS_SRCS=src/os/unix/ngx_solaris_init.c
有关 Sendfile 机制的源文件:
SOLARIS_SENDFILEV_SRCS=src/os/unix/ngx_solaris_sendfilev_chain.c
5.7 Darwin
相关的头文件:
DARWIN_DEPS="src/os/unix/ngx_darwin_config.h src/os/unix/ngx_darwin.h"
现骨干的源文件:
DARWIN_SRCS=src/os/unix/ngx_darwin_init.c
有关 Sendfile 机制的源文件:
DARWIN_SENDFILE_SRCS=src/os/unix/ngx_darwin_sendfile_chain.c
5.8 Win32
相关文件所在的目录:
WIN32_INCS="$CORE_INCS $EVENT_INCS src/os/win32"
相关的头文件:
WIN32_DEPS="$CORE_DEPS $EVENT_DEPS \ src/os/win32/ngx_win32_config.h \ src/os/win32/ngx_time.h \ ... src/os/win32/ngx_process_cycle.h"
相关的用于配置头文件:
WIN32_CONFIG=src/os/win32/ngx_win32_config.h
相关的源文件:
WIN32_SRCS="$CORE_SRCS $EVENT_SRCS \ src/os/win32/ngx_errno.c \ src/os/win32/ngx_alloc.c \ ... src/event/ngx_event_acceptex.c"
Nginx 在 Windows 平台的图标:
NGX_WIN32_ICONS="src/os/win32/nginx.ico"
Run Commands:
NGX_WIN32_RC="src/os/win32/nginx.rc"
6 HTTP 模块6.1 HTTP 一些基本模块
注意这里的模块分类,与 Wiki 上给出的不一样,这四个并不是 Wiki 中的标准模块。模块名:
HTTP_MODULES="ngx_http_module \ ngx_http_core_module \ ngx_http_log_module \ ngx_http_upstream_module"HTTP_WRITE_FILTER_MODULE="ngx_http_write_filter_module"HTTP_HEADER_FILTER_MODULE="ngx_http_header_filter_module"HTTP_POSTPONE_FILTER_MODULE=ngx_http_postpone_filter_moduleHTTP_COPY_FILTER_MODULE=ngx_http_copy_filter_moduleHTTP_CHUNKED_FILTER_MODULE=ngx_http_chunked_filter_moduleHTTP_HEADERS_FILTER_MODULE=ngx_http_headers_filter_moduleHTTP_RANGE_HEADER_FILTER_MODULE=ngx_http_range_header_filter_moduleHTTP_RANGE_BODY_FILTER_MODULE=ngx_http_range_body_filter_moduleHTTP_NOT_MODIFIED_FILTER_MODULE=ngx_http_not_modified_filter_moduleHTTP_STATIC_MODULE=ngx_http_static_moduleHTTP_INDEX_MODULE=ngx_http_index_module
相关的头文件所在的目录为:
HTTP_INCS="src/http src/http/modules"
所有相关的头文件为:
HTTP_DEPS="src/http/ngx_http.h \ src/http/ngx_http_request.h \ src/http/ngx_http_config.h \ src/http/ngx_http_core_module.h \ src/http/ngx_http_cache.h \ src/http/ngx_http_variables.h \ src/http/ngx_http_script.h \ src/http/ngx_http_upstream.h \ src/http/ngx_http_upstream_round_robin.h \ src/http/ngx_http_busy_lock.h"
所有相关的源文件为:
HTTP_SRCS="src/http/ngx_http.c \ src/http/ngx_http_core_module.c \ … src/http/modules/ngx_http_not_modified_filter_module.c"HTTP_SRCS="$HTTP_SRCS src/http/ngx_http_busy_lock.c"
6.2 其他 HTTP 模块
下面这些变量是关于一些 HTTP 模块的:
HTTP_POSTPONE_FILTER_SRCS=src/http/ngx_http_postpone_filter_module.cHTTP_FILE_CACHE_SRCS=src/http/ngx_http_file_cache.cHTTP_SSI_FILTER_MODULE=ngx_http_ssi_filter_moduleHTTP_SSI_DEPS=src/http/modules/ngx_http_ssi_filter_module.hHTTP_SSI_SRCS=src/http/modules/ngx_http_ssi_filter_module.cHTTP_SSL_MODULE=ngx_http_ssl_moduleHTTP_SSL_DEPS=src/http/modules/ngx_http_ssl_module.hHTTP_SSL_SRCS=src/http/modules/ngx_http_ssl_module.cHTTP_PERL_MODULE=ngx_http_perl_moduleHTTP_PERL_INCS=src/http/modules/perlHTTP_PERL_DEPS=src/http/modules/perl/ngx_http_perl_module.hHTTP_PERL_SRCS=src/http/modules/perl/ngx_http_perl_module.c
其他一些模块,只设置了形如 HTTP_XXX_MODULE 和 HTTP_XXX_SRCS 的变量,包括 charset-filter,gzip-filter,xslt-filter,image-filter,sub-filter,userid-filter,realip,addiction-filter,dav,access,auth-basic,autoindex,random,status,geo,geoip,map,split-clients,referer,rewrite,proxy,fastcgi,uwsgi,scgi,memcached,limit-zone,limite-req,empty-gif,browser,secure-link,degradation,flv,mp4,gzip,upstream-ip-hash,例如:
HTTP_CHARSET_FILTER_MODULE=ngx_http_charset_filter_moduleHTTP_CHARSET_SRCS=src/http/modules/ngx_http_charset_filter_module.cHTTP_GZIP_FILTER_MODULE=ngx_http_gzip_filter_moduleHTTP_GZIP_SRCS=src/http/modules/ngx_http_gzip_filter_module.c
7 邮件模块
头文件所在的目录:
MAIL_INCS="src/mail"
头文件:
MAIL_DEPS="src/mail/ngx_mail.h"
模块名称:
MAIL_MODULES="ngx_mail_module ngx_mail_core_module"
源文件:
MAIL_SRCS="src/mail/ngx_mail.c \ src/mail/ngx_mail_core_module.c \ src/mail/ngx_mail_handler.c \ src/mail/ngx_mail_parse.c"
一些模块的相关变量,包括 POP3、IMAP、SMTP、SSL、AUTH-HTTP、PROXY 模块:
MAIL_POP3_MODULE="ngx_mail_pop3_module"MAIL_POP3_DEPS="src/mail/ngx_mail_pop3_module.h"MAIL_POP3_SRCS="src/mail/ngx_mail_pop3_module.c \ src/mail/ngx_mail_pop3_handler.c"MAIL_IMAP_MODULE="ngx_mail_imap_module"MAIL_IMAP_DEPS="src/mail/ngx_mail_imap_module.h"MAIL_IMAP_SRCS="src/mail/ngx_mail_imap_module.c \ src/mail/ngx_mail_imap_handler.c"MAIL_SMTP_MODULE="ngx_mail_smtp_module"MAIL_SMTP_DEPS="src/mail/ngx_mail_smtp_module.h"MAIL_SMTP_SRCS="src/mail/ngx_mail_smtp_module.c \ src/mail/ngx_mail_smtp_handler.c"MAIL_SSL_MODULE="ngx_mail_ssl_module"MAIL_SSL_DEPS="src/mail/ngx_mail_ssl_module.h"MAIL_SSL_SRCS="src/mail/ngx_mail_ssl_module.c"MAIL_AUTH_HTTP_MODULE="ngx_mail_auth_http_module"MAIL_AUTH_HTTP_SRCS="src/mail/ngx_mail_auth_http_module.c"MAIL_PROXY_MODULE="ngx_mail_proxy_module"MAIL_PROXY_SRCS="src/mail/ngx_mail_proxy_module.c"
8 Google PerfTools 模块NGX_GOOGLE_PERFTOOLS_MODULE=ngx_google_perftools_moduleNGX_GOOGLE_PERFTOOLS_SRCS=src/misc/ngx_google_perftools_module.c
9 C++ 测试模块NGX_CPP_TEST_SRCS=src/misc/ngx_cpp_test_module.cpp
-
转载请注明来自“柳大的CSDN博客”:blog.csdn.net/Poechant
-
?
在configure脚本中,运行完auto/options和auto/init脚本后,接下来就运行auto/soures脚本。这个脚本是为编译做准备的。
目录- 核心模块
- 事件模块
- OpenSSL 模块相关变量
- 事件驱动模块
- 操作系统相关项
- HTTP 模块
- 邮件模块
- Google PerfTools 模块
- C++ 测试模块
1 核心模块1.1 核心模块名称 CORE_MODULES
1.1 核心模块名称 CORE_MODULES
CORE_MODULES变量记录 Nginx 的核心模块,默认包括ngx_core_module、ngx_errlog_module和ngx_conf_module,相应初始化代码如下:
CORE_MODULES="ngx_core_module ngx_errlog_module ngx_conf_module"1.2 核心模块头文件所在目录 CORE_INCS
INCS 的含义是 includes。
CORE_INCS="src/core"1.3 核心模块头文件 CORE_DEPS
DEPS 的含义是 depandencies,包含src/core目录下的 30 个源文件,唯独没有src/core/regex.h文件。
CORE_DEPS="src/core/nginx.h \ src/core/ngx_config.h \ ... src/core/ngx_open_file_cache.h \ src/core/ngx_crypt.h"1.4 核心模块源文件 CORE_SRCS
SRCS 的含义是 sources,包含src/core目录下的 29 个源文件,仅仅没有src/core/regex.c文件。
CORE_SRCS="src/core/nginx.c \ src/core/ngx_log.c \ ... src/core/ngx_open_file_cache.c \ src/core/ngx_crypt.c"正则表达式的内容也是核心模块的一部分,分别是src/core/regex.h和src/core/regex.c。
REGEX_DEPS=src/core/ngx_regex.hREGEX_SRCS=src/core/ngx_regex.c2 事件模块2.1 事件模块名称 EVENT_MODULES
该模块包括ngx_events_module和ngx_event_core_module。
EVENT_MODULES="ngx_events_module ngx_event_core_module"2.2 事件模块头文件所在目录 EVENT_INCS
相应的头文件所在目录也包含两部分。
EVENT_INCS="src/event src/event/modules"2.3 事件模块头文件 EVENT_DEPS
包括六个头文件,都位于src/event目录下,唯独不包含该目录下的src/event/ngx_event_openssl.h文件,该文件属于 OpenSSL 模块的头文件。
EVENT_DEPS="src/event/ngx_event.h \ src/event/ngx_event_timer.h \ src/event/ngx_event_posted.h \ src/event/ngx_event_busy_lock.h \ src/event/ngx_event_connect.h \ src/event/ngx_event_pipe.h"2.4 事件模块源文件 EVENT_SRCS
包含七个头文件,都位于src/event目录下,该目录下的另外两个文件ngx_event_openssl和ngx_event_mutex。
EVENT_SRCS="src/event/ngx_event.c \ src/event/ngx_event_timer.c \ src/event/ngx_event_posted.c \ src/event/ngx_event_busy_lock.c \ src/event/ngx_event_accept.c \ src/event/ngx_event_connect.c \ src/event/ngx_event_pipe.c"3 OpenSSL 模块相关变量3.1 OpenSSL 模块名称 OPENSSL_MODULE
OPENSSL_MODULE:是 OpenSSL 变量的名称,为ngx_openssl_module。
3.2 OpenSSl 模块源文件与头文件 OPENSSL_DEPS 和 OPENSSL_SRCS
OPENSSL_DEPS和OPENSSL_SRCS:是 OpenSSL 的源文件和头文件。
OPENSSL_MODULE=ngx_openssl_moduleOPENSSL_DEPS=src/event/ngx_event_openssl.hOPENSSL_SRCS=src/event/ngx_event_openssl.c4 事件驱动模型
模型包括 select、poll、kqueue、devpoll、eventport、epoll、rtsig、iocp、aio。后面我会专门写一篇关于事件驱动方面的博文,来详细介绍这些事件驱动模型的原理和异同。这里先不赘述。
4.1 select 模型SELECT_MODULE=ngx_select_moduleSELECT_SRCS=src/event/modules/ngx_select_module.cWIN32_SELECT_SRCS=src/event/modules/ngx_win32_select_module.c
4.2 poll 模型POLL_MODULE=ngx_poll_modulePOLL_SRCS=src/event/modules/ngx_poll_module.c
4.3 kqueue 模型KQUEUE_MODULE=ngx_kqueue_moduleKQUEUE_SRCS=src/event/modules/ngx_kqueue_module.c
4.4 devpoll 模型DEVPOLL_MODULE=ngx_devpoll_moduleDEVPOLL_SRCS=src/event/modules/ngx_devpoll_module.c
4.5 eventport 模型EVENTPORT_MODULE=ngx_eventport_moduleEVENTPORT_SRCS=src/event/modules/ngx_eventport_module.c
4.5 epoll 模型EPOLL_MODULE=ngx_epoll_moduleEPOLL_SRCS=src/event/modules/ngx_epoll_module.c
4.6 rtsig 模型RTSIG_MODULE=ngx_rtsig_moduleRTSIG_SRCS=src/event/modules/ngx_rtsig_module.c
4.7 iocp 模型IOCP_MODULE=ngx_iocp_moduleIOCP_SRCS=src/event/modules/ngx_iocp_module.c
4.8 aio 模型AIO_MODULE=ngx_aio_moduleAIO_SRCS="src/event/modules/ngx_aio_module.c \ src/os/unix/ngx_aio_read.c \ src/os/unix/ngx_aio_write.c \ src/os/unix/ngx_aio_read_chain.c \ src/os/unix/ngx_aio_write_chain.c"FILE_AIO_SRCS="src/os/unix/ngx_file_aio_read.c"LINUX_AIO_SRCS="src/os/unix/ngx_linux_aio_read.c"
5 操作系统相关项5.1 UNIX
SELECT_MODULE=ngx_select_moduleSELECT_SRCS=src/event/modules/ngx_select_module.cWIN32_SELECT_SRCS=src/event/modules/ngx_win32_select_module.cPOLL_MODULE=ngx_poll_modulePOLL_SRCS=src/event/modules/ngx_poll_module.c4.3 kqueue 模型KQUEUE_MODULE=ngx_kqueue_moduleKQUEUE_SRCS=src/event/modules/ngx_kqueue_module.c
4.4 devpoll 模型DEVPOLL_MODULE=ngx_devpoll_moduleDEVPOLL_SRCS=src/event/modules/ngx_devpoll_module.c
4.5 eventport 模型EVENTPORT_MODULE=ngx_eventport_moduleEVENTPORT_SRCS=src/event/modules/ngx_eventport_module.c
4.5 epoll 模型EPOLL_MODULE=ngx_epoll_moduleEPOLL_SRCS=src/event/modules/ngx_epoll_module.c
4.6 rtsig 模型RTSIG_MODULE=ngx_rtsig_moduleRTSIG_SRCS=src/event/modules/ngx_rtsig_module.c
4.7 iocp 模型IOCP_MODULE=ngx_iocp_moduleIOCP_SRCS=src/event/modules/ngx_iocp_module.c
4.8 aio 模型AIO_MODULE=ngx_aio_moduleAIO_SRCS="src/event/modules/ngx_aio_module.c \ src/os/unix/ngx_aio_read.c \ src/os/unix/ngx_aio_write.c \ src/os/unix/ngx_aio_read_chain.c \ src/os/unix/ngx_aio_write_chain.c"FILE_AIO_SRCS="src/os/unix/ngx_file_aio_read.c"LINUX_AIO_SRCS="src/os/unix/ngx_linux_aio_read.c"
5 操作系统相关项5.1 UNIX
KQUEUE_MODULE=ngx_kqueue_moduleKQUEUE_SRCS=src/event/modules/ngx_kqueue_module.cDEVPOLL_MODULE=ngx_devpoll_moduleDEVPOLL_SRCS=src/event/modules/ngx_devpoll_module.c4.5 eventport 模型EVENTPORT_MODULE=ngx_eventport_moduleEVENTPORT_SRCS=src/event/modules/ngx_eventport_module.c
4.5 epoll 模型EPOLL_MODULE=ngx_epoll_moduleEPOLL_SRCS=src/event/modules/ngx_epoll_module.c
4.6 rtsig 模型RTSIG_MODULE=ngx_rtsig_moduleRTSIG_SRCS=src/event/modules/ngx_rtsig_module.c
4.7 iocp 模型IOCP_MODULE=ngx_iocp_moduleIOCP_SRCS=src/event/modules/ngx_iocp_module.c
4.8 aio 模型AIO_MODULE=ngx_aio_moduleAIO_SRCS="src/event/modules/ngx_aio_module.c \ src/os/unix/ngx_aio_read.c \ src/os/unix/ngx_aio_write.c \ src/os/unix/ngx_aio_read_chain.c \ src/os/unix/ngx_aio_write_chain.c"FILE_AIO_SRCS="src/os/unix/ngx_file_aio_read.c"LINUX_AIO_SRCS="src/os/unix/ngx_linux_aio_read.c"
5 操作系统相关项5.1 UNIX
EVENTPORT_MODULE=ngx_eventport_moduleEVENTPORT_SRCS=src/event/modules/ngx_eventport_module.cEPOLL_MODULE=ngx_epoll_moduleEPOLL_SRCS=src/event/modules/ngx_epoll_module.c4.6 rtsig 模型RTSIG_MODULE=ngx_rtsig_moduleRTSIG_SRCS=src/event/modules/ngx_rtsig_module.c
4.7 iocp 模型IOCP_MODULE=ngx_iocp_moduleIOCP_SRCS=src/event/modules/ngx_iocp_module.c
4.8 aio 模型AIO_MODULE=ngx_aio_moduleAIO_SRCS="src/event/modules/ngx_aio_module.c \ src/os/unix/ngx_aio_read.c \ src/os/unix/ngx_aio_write.c \ src/os/unix/ngx_aio_read_chain.c \ src/os/unix/ngx_aio_write_chain.c"FILE_AIO_SRCS="src/os/unix/ngx_file_aio_read.c"LINUX_AIO_SRCS="src/os/unix/ngx_linux_aio_read.c"
5 操作系统相关项5.1 UNIX
RTSIG_MODULE=ngx_rtsig_moduleRTSIG_SRCS=src/event/modules/ngx_rtsig_module.cIOCP_MODULE=ngx_iocp_moduleIOCP_SRCS=src/event/modules/ngx_iocp_module.c4.8 aio 模型AIO_MODULE=ngx_aio_moduleAIO_SRCS="src/event/modules/ngx_aio_module.c \ src/os/unix/ngx_aio_read.c \ src/os/unix/ngx_aio_write.c \ src/os/unix/ngx_aio_read_chain.c \ src/os/unix/ngx_aio_write_chain.c"FILE_AIO_SRCS="src/os/unix/ngx_file_aio_read.c"LINUX_AIO_SRCS="src/os/unix/ngx_linux_aio_read.c"
5 操作系统相关项5.1 UNIX
AIO_MODULE=ngx_aio_moduleAIO_SRCS="src/event/modules/ngx_aio_module.c \ src/os/unix/ngx_aio_read.c \ src/os/unix/ngx_aio_write.c \ src/os/unix/ngx_aio_read_chain.c \ src/os/unix/ngx_aio_write_chain.c"FILE_AIO_SRCS="src/os/unix/ngx_file_aio_read.c"LINUX_AIO_SRCS="src/os/unix/ngx_linux_aio_read.c"5.1 UNIX
相关的头文件所在的目录为:
UNIX_INCS="$CORE_INCS $EVENT_INCS src/os/unix"所有相关的头文件为:
UNIX_DEPS="$CORE_DEPS $EVENT_DEPS \ src/os/unix/ngx_time.h \ src/os/unix/ngx_errno.h \ ... src/os/unix/ngx_process_cycle.h"所有相关的源文件为:
UNIX_SRCS="$CORE_SRCS $EVENT_SRCS \ src/os/unix/ngx_time.c \ src/os/unix/ngx_errno.c \ ... src/os/unix/ngx_process_cycle.c"5.2 POSIXPOSIX_DEPS=src/os/unix/ngx_posix_config.h
5.3 FreeBSD
POSIX_DEPS=src/os/unix/ngx_posix_config.h相关的头文件:
FREEBSD_DEPS="src/os/unix/ngx_freebsd_config.h src/os/unix/ngx_freebsd.h"相关的源文件:
FREEBSD_SRCS=src/os/unix/ngx_freebsd_init.c有关 Sendfile 机制的源文件:
FREEBSD_SENDFILE_SRCS=src/os/unix/ngx_freebsd_sendfile_chain.cRfork相关的文件:
FREEBSD_RFORK_DEPS="src/os/unix/ngx_freebsd_rfork_thread.h"FREEBSD_RFORK_SRCS="src/os/unix/ngx_freebsd_rfork_thread.c"FREEBSD_RFORK_THREAD_SRCS="src/os/unix/rfork_thread.S"5.4 pthreadPTHREAD_SRCS="src/os/unix/ngx_pthread_thread.c"
5.5 Linux
PTHREAD_SRCS="src/os/unix/ngx_pthread_thread.c"相关的头文件:
LINUX_DEPS="src/os/unix/ngx_linux_config.h src/os/unix/ngx_linux.h"相关的源文件:
LINUX_SRCS=src/os/unix/ngx_linux_init.c有关 Sendfile 机制的源文件:
LINUX_SENDFILE_SRCS=src/os/unix/ngx_linux_sendfile_chain.c5.6 Solaris
相关的头文件:
SOLARIS_DEPS="src/os/unix/ngx_solaris_config.h src/os/unix/ngx_solaris.h"相关的源文件:
SOLARIS_SRCS=src/os/unix/ngx_solaris_init.c有关 Sendfile 机制的源文件:
SOLARIS_SENDFILEV_SRCS=src/os/unix/ngx_solaris_sendfilev_chain.c5.7 Darwin
相关的头文件:
DARWIN_DEPS="src/os/unix/ngx_darwin_config.h src/os/unix/ngx_darwin.h"现骨干的源文件:
DARWIN_SRCS=src/os/unix/ngx_darwin_init.c有关 Sendfile 机制的源文件:
DARWIN_SENDFILE_SRCS=src/os/unix/ngx_darwin_sendfile_chain.c5.8 Win32
相关文件所在的目录:
WIN32_INCS="$CORE_INCS $EVENT_INCS src/os/win32"相关的头文件:
WIN32_DEPS="$CORE_DEPS $EVENT_DEPS \ src/os/win32/ngx_win32_config.h \ src/os/win32/ngx_time.h \ ... src/os/win32/ngx_process_cycle.h"相关的用于配置头文件:
WIN32_CONFIG=src/os/win32/ngx_win32_config.h相关的源文件:
WIN32_SRCS="$CORE_SRCS $EVENT_SRCS \ src/os/win32/ngx_errno.c \ src/os/win32/ngx_alloc.c \ ... src/event/ngx_event_acceptex.c"Nginx 在 Windows 平台的图标:
NGX_WIN32_ICONS="src/os/win32/nginx.ico"Run Commands:
NGX_WIN32_RC="src/os/win32/nginx.rc"6 HTTP 模块6.1 HTTP 一些基本模块
注意这里的模块分类,与 Wiki 上给出的不一样,这四个并不是 Wiki 中的标准模块。模块名:
HTTP_MODULES="ngx_http_module \ ngx_http_core_module \ ngx_http_log_module \ ngx_http_upstream_module"HTTP_WRITE_FILTER_MODULE="ngx_http_write_filter_module"HTTP_HEADER_FILTER_MODULE="ngx_http_header_filter_module"HTTP_POSTPONE_FILTER_MODULE=ngx_http_postpone_filter_moduleHTTP_COPY_FILTER_MODULE=ngx_http_copy_filter_moduleHTTP_CHUNKED_FILTER_MODULE=ngx_http_chunked_filter_moduleHTTP_HEADERS_FILTER_MODULE=ngx_http_headers_filter_moduleHTTP_RANGE_HEADER_FILTER_MODULE=ngx_http_range_header_filter_moduleHTTP_RANGE_BODY_FILTER_MODULE=ngx_http_range_body_filter_moduleHTTP_NOT_MODIFIED_FILTER_MODULE=ngx_http_not_modified_filter_moduleHTTP_STATIC_MODULE=ngx_http_static_moduleHTTP_INDEX_MODULE=ngx_http_index_module相关的头文件所在的目录为:
HTTP_INCS="src/http src/http/modules"所有相关的头文件为:
HTTP_DEPS="src/http/ngx_http.h \ src/http/ngx_http_request.h \ src/http/ngx_http_config.h \ src/http/ngx_http_core_module.h \ src/http/ngx_http_cache.h \ src/http/ngx_http_variables.h \ src/http/ngx_http_script.h \ src/http/ngx_http_upstream.h \ src/http/ngx_http_upstream_round_robin.h \ src/http/ngx_http_busy_lock.h"所有相关的源文件为:
HTTP_SRCS="src/http/ngx_http.c \ src/http/ngx_http_core_module.c \ … src/http/modules/ngx_http_not_modified_filter_module.c"HTTP_SRCS="$HTTP_SRCS src/http/ngx_http_busy_lock.c"6.2 其他 HTTP 模块
下面这些变量是关于一些 HTTP 模块的:
HTTP_POSTPONE_FILTER_SRCS=src/http/ngx_http_postpone_filter_module.cHTTP_FILE_CACHE_SRCS=src/http/ngx_http_file_cache.cHTTP_SSI_FILTER_MODULE=ngx_http_ssi_filter_moduleHTTP_SSI_DEPS=src/http/modules/ngx_http_ssi_filter_module.hHTTP_SSI_SRCS=src/http/modules/ngx_http_ssi_filter_module.cHTTP_SSL_MODULE=ngx_http_ssl_moduleHTTP_SSL_DEPS=src/http/modules/ngx_http_ssl_module.hHTTP_SSL_SRCS=src/http/modules/ngx_http_ssl_module.cHTTP_PERL_MODULE=ngx_http_perl_moduleHTTP_PERL_INCS=src/http/modules/perlHTTP_PERL_DEPS=src/http/modules/perl/ngx_http_perl_module.hHTTP_PERL_SRCS=src/http/modules/perl/ngx_http_perl_module.c其他一些模块,只设置了形如 HTTP_XXX_MODULE 和 HTTP_XXX_SRCS 的变量,包括 charset-filter,gzip-filter,xslt-filter,image-filter,sub-filter,userid-filter,realip,addiction-filter,dav,access,auth-basic,autoindex,random,status,geo,geoip,map,split-clients,referer,rewrite,proxy,fastcgi,uwsgi,scgi,memcached,limit-zone,limite-req,empty-gif,browser,secure-link,degradation,flv,mp4,gzip,upstream-ip-hash,例如:
HTTP_CHARSET_FILTER_MODULE=ngx_http_charset_filter_moduleHTTP_CHARSET_SRCS=src/http/modules/ngx_http_charset_filter_module.cHTTP_GZIP_FILTER_MODULE=ngx_http_gzip_filter_moduleHTTP_GZIP_SRCS=src/http/modules/ngx_http_gzip_filter_module.c7 邮件模块
头文件所在的目录:
MAIL_INCS="src/mail"头文件:
MAIL_DEPS="src/mail/ngx_mail.h"模块名称:
MAIL_MODULES="ngx_mail_module ngx_mail_core_module"源文件:
MAIL_SRCS="src/mail/ngx_mail.c \ src/mail/ngx_mail_core_module.c \ src/mail/ngx_mail_handler.c \ src/mail/ngx_mail_parse.c"一些模块的相关变量,包括 POP3、IMAP、SMTP、SSL、AUTH-HTTP、PROXY 模块:
MAIL_POP3_MODULE="ngx_mail_pop3_module"MAIL_POP3_DEPS="src/mail/ngx_mail_pop3_module.h"MAIL_POP3_SRCS="src/mail/ngx_mail_pop3_module.c \ src/mail/ngx_mail_pop3_handler.c"MAIL_IMAP_MODULE="ngx_mail_imap_module"MAIL_IMAP_DEPS="src/mail/ngx_mail_imap_module.h"MAIL_IMAP_SRCS="src/mail/ngx_mail_imap_module.c \ src/mail/ngx_mail_imap_handler.c"MAIL_SMTP_MODULE="ngx_mail_smtp_module"MAIL_SMTP_DEPS="src/mail/ngx_mail_smtp_module.h"MAIL_SMTP_SRCS="src/mail/ngx_mail_smtp_module.c \ src/mail/ngx_mail_smtp_handler.c"MAIL_SSL_MODULE="ngx_mail_ssl_module"MAIL_SSL_DEPS="src/mail/ngx_mail_ssl_module.h"MAIL_SSL_SRCS="src/mail/ngx_mail_ssl_module.c"MAIL_AUTH_HTTP_MODULE="ngx_mail_auth_http_module"MAIL_AUTH_HTTP_SRCS="src/mail/ngx_mail_auth_http_module.c"MAIL_PROXY_MODULE="ngx_mail_proxy_module"MAIL_PROXY_SRCS="src/mail/ngx_mail_proxy_module.c"8 Google PerfTools 模块NGX_GOOGLE_PERFTOOLS_MODULE=ngx_google_perftools_moduleNGX_GOOGLE_PERFTOOLS_SRCS=src/misc/ngx_google_perftools_module.c
9 C++ 测试模块NGX_CPP_TEST_SRCS=src/misc/ngx_cpp_test_module.cpp
NGX_GOOGLE_PERFTOOLS_MODULE=ngx_google_perftools_moduleNGX_GOOGLE_PERFTOOLS_SRCS=src/misc/ngx_google_perftools_module.cNGX_CPP_TEST_SRCS=src/misc/ngx_cpp_test_module.cpp-
转载请注明来自“柳大的CSDN博客”:blog.csdn.net/Poechant
-
?