Inconfigure
Runningauto/options
Run the scriptauto/init
Script, the work is as follows.
1 MAKEFILE file name variable
By default:
The Code is as follows:
NGX_MAKEFILE=$NGX_OBJS/Makefile
2. source file name variable
By default:
The Code is as follows:
NGX_MODULES_C=$NGX_OBJS/ngx_modules.c
3 header file name variables
By default:
objs/ngx_auto_headers.h
objs/ngx_auto_config.h
The Code is as follows:
NGX_AUTO_HEADERS_H=$NGX_OBJS/ngx_auto_headers.hNGX_AUTO_CONFIG_H=$NGX_OBJS/ngx_auto_config.h
4. automatically test the file name and configuration error file name variable
By default:
objs/autotest
objs/autoconf.err
The Code is as follows:
NGX_AUTOTEST=$NGX_OBJS/autotestNGX_AUTOCONF_ERR=$NGX_OBJS/autoconf.err
5 stubs related variables
By default:
objs/autoconf.err
objs/Makefile
The Code is as follows:
# STUBsNGX_ERR=$NGX_OBJS/autoconf.errMAKEFILE=$NGX_OBJS/Makefile
6 PCH related variables
The Code is as follows:
NGX_PCH=NGX_USE_PCH=
7. Test "\ c" and "-n" in the environment"
Nginx supports multiple operating systems, such as Mac OS, Linux, and Solaris. Shell in different systems is slightly different. Thereforeauto/init
The script contains the following two variables:
The Code is as follows:
# check the echo‘s "-n" option and "\c" capabilityif echo "test\c" | grep c >/dev/null; then if echo -n test | grep n >/dev/null; then ngx_n= ngx_c= else ngx_n=-n ngx_c= fielse ngx_n= ngx_c=‘\c‘fi
8. Create and write makefile
There are two other targets, default: Build and clean.rm -rf Makefile $NGX_OBJS
.
# create Makefilecat << END > Makefiledefault: buildclean: rm -rf Makefile $NGX_OBJS
Anatomy of nginx · automatic scripts (2) setting the initial variable script Auto/init