diff options
author | Igor Sysoev <igor@sysoev.ru> | 2004-10-21 19:34:38 +0400 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2004-10-21 19:34:38 +0400 |
commit | c0edbcce58b03b89c70f1eb39cb44c74c4c7453a (patch) | |
tree | 1ce72a5b51d724a0c054e079c2b1507ca85a145d /auto/make | |
parent | ac64333a44f39d5a658832517a106961f32f6aae (diff) |
nginx-0.1.2-RELEASE importrelease-0.1.2
*) Feature: the --user=USER, --group=GROUP, and --with-ld-opt=OPTIONS
options in configure.
*) Feature: the server_name directive supports *.domain.tld.
*) Bugfix: the portability improvements.
*) Bugfix: if configuration file was set in command line, the
reconfiguration was impossible; the bug had appeared in 0.1.1.
*) Bugfix: proxy module may get caught in an endless loop when sendfile
is not used.
*) Bugfix: with sendfile the response was not recoded according to the
charset module directives; the bug had appeared in 0.1.1.
*) Bugfix: very seldom bug in the kqueue processing.
*) Bugfix: the gzip module compressed the proxied responses that was
already compressed.
Diffstat (limited to 'auto/make')
-rw-r--r-- | auto/make | 416 |
1 files changed, 167 insertions, 249 deletions
@@ -8,353 +8,271 @@ mkdir -p $OBJS/src/core $OBJS/src/event $OBJS/src/event/modules \ $OBJS/src/imap -echo "CC = $CC" > $MAKEFILE -echo "CPP = $CPP" >> $MAKEFILE -echo "LINK = $LINK" >> $MAKEFILE -if [ "$CC" = wcl386 ]; then - echo MAKE = wmake >> $MAKEFILE -fi -echo "CFLAGS = $CFLAGS" >> $MAKEFILE -echo >> $MAKEFILE +ngx_objs_dir=$NGX_OBJS$ngx_regex_dirsep +ngx_use_pch=`echo $NGX_USE_PCH | sed -e "s/\//$ngx_regex_dirsep/g"` -if [ $MAKE_SL = YES ]; then - echo >> $MAKEFILE -fi +cat << END >> $NGX_MAKEFILE -all_inc="$CORE_INCS $OBJS $HTTP_INCS $IMAP_INCS" -all_inc=`echo " $all_inc" | sed -e "s/ \([^ ]\)/ $INCOPT\1/g"` -all_inc=`echo $all_inc | sed -e "s/\//$DIRSEP/g"` +CC = $CC +CFLAGS = $CFLAGS +CPP = $CPP +LINK = $LINK -echo "ALL_INCS = $all_inc" >> $MAKEFILE -echo >> $MAKEFILE - -all_srcs="$CORE_SRCS" +END +if [ "$CC" = wcl386 ]; then + echo MAKE = wmake >> $NGX_MAKEFILE -# CORE_DEPS + ngx_regex_cont=' ' + ngx_cont=' ' + ngx_tab=' ' -if [ $MAKE_SL = YES ]; then - echo $ngx_n "CORE_DEPS =" $ngx_c >> $MAKEFILE -else - echo "CORE_DEPS = \\" >> $MAKEFILE fi -for dep in $CORE_DEPS -do - dep=`echo $dep | sed -e "s/\//$DIRSEP/g"` - if [ $MAKE_SL = YES ]; then - echo $ngx_n " $dep" $ngx_c >> $MAKEFILE - else - echo " $dep \\" >> $MAKEFILE - fi -done -echo >> $MAKEFILE +# ALL_INCS, required by OpenWatcom C precompiled headers +ngx_incs=`echo $CORE_INCS $OBJS $HTTP_INCS $IMAP_INCS\ + | sed -e "s/ *\([^ ][^ ]*\)/$ngx_regex_cont$ngx_include_opt\1/g" \ + -e "s/\//$ngx_regex_dirsep/g"` -# CORE_INCS +cat << END >> $NGX_MAKEFILE -if [ $MAKE_SL = YES ]; then - echo >> $MAKEFILE -fi +ALL_INCS = $ngx_include_opt$ngx_incs -inc="$CORE_INCS $OBJS" -inc=`echo " $inc" | sed -e "s/ \([^ ]\)/ $INCOPT\1/g" -e "s/\//$DIRSEP/g"` +END -echo "CORE_INCS = $inc" >> $MAKEFILE -echo >> $MAKEFILE +ngx_all_srcs="$CORE_SRCS" -if [ $HTTP = YES ]; then - all_srcs="$all_srcs $HTTP_SRCS" +# the core dependences and include pathes - # HTTP_DEPS +ngx_deps=`echo $CORE_DEPS $NGX_PCH \ + | sed -e "s/ *\([^ ][^ ]*\)/$ngx_regex_cont\1/g" \ + -e "s/\//$ngx_regex_dirsep/g"` - if [ $MAKE_SL = YES ]; then - echo $ngx_n "HTTP_DEPS =" $ngx_c >> $MAKEFILE - else - echo "HTTP_DEPS = \\" >> $MAKEFILE - fi +ngx_incs=`echo $CORE_INCS $OBJS \ + | sed -e "s/ *\([^ ][^ ]*\)/$ngx_regex_cont$ngx_include_opt\1/g" \ + -e "s/\//$ngx_regex_dirsep/g"` - for dep in $HTTP_DEPS - do - dep=`echo $dep | sed -e "s/\//$DIRSEP/g"` +cat << END >> $NGX_MAKEFILE - if [ $MAKE_SL = YES ]; then - echo $ngx_n " $dep" $ngx_c >> $MAKEFILE - else - echo " $dep \\" >> $MAKEFILE - fi - done - echo >> $MAKEFILE +CORE_DEPS = $ngx_deps - # HTTP_INCS +CORE_INCS = $ngx_include_opt$ngx_incs - if [ $MAKE_SL = YES ]; then - echo >> $MAKEFILE - fi +END - inc="$HTTP_INCS $OBJS" - inc=`echo " $inc" | sed -e "s/ \([^ ]\)/ $INCOPT\1/g" -e "s/\//$DIRSEP/g"` - echo "HTTP_INCS = $inc" >> $MAKEFILE - echo >> $MAKEFILE +# the http dependences and include pathes -fi +if [ $HTTP = YES ]; then + ngx_all_srcs="$ngx_all_srcs $HTTP_SRCS" -if [ $IMAP = YES ]; then + ngx_deps=`echo $HTTP_DEPS \ + | sed -e "s/ *\([^ ][^ ]*\)/$ngx_regex_cont\1/g" \ + -e "s/\//$ngx_regex_dirsep/g"` - all_srcs="$all_srcs $IMAP_SRCS" + ngx_incs=`echo $HTTP_INCS \ + | sed -e "s/ *\([^ ][^ ]*\)/$ngx_regex_cont$ngx_include_opt\1/g" \ + -e "s/\//$ngx_regex_dirsep/g"` - # IMAP_DEPS + cat << END >> $NGX_MAKEFILE - if [ $MAKE_SL = YES ]; then - echo $ngx_n "IMAP_DEPS =" $ngx_c >> $MAKEFILE - else - echo "IMAP_DEPS = \\" >> $MAKEFILE - fi +HTTP_DEPS = $ngx_deps - for dep in $IMAP_DEPS - do - dep=`echo $dep | sed -e "s/\//$DIRSEP/g"` - if [ $MAKE_SL = YES ]; then - echo $ngx_n " $dep" $ngx_c >> $MAKEFILE - else - echo " $dep \\" >> $MAKEFILE - fi - done - echo >> $MAKEFILE +HTTP_INCS = $ngx_include_opt$ngx_incs +END - # IMAP_INCS +fi - if [ $MAKE_SL = YES ]; then - echo >> $MAKEFILE - fi - inc="$IMAP_INCS $OBJS" - inc=`echo " $inc" | sed -e "s/ \([^ ]\)/ $INCOPT\1/g" -e "s/\//$DIRSEP/g"` +# the imap dependences and include pathes - echo "IMAP_INCS = $inc" >> $MAKEFILE - echo >> $MAKEFILE +if [ $IMAP = YES ]; then -fi + ngx_all_srcs="$ngx_all_srcs $IMAP_SRCS" + ngx_deps=`echo $IMAP_DEPS \ + | sed -e "s/ *\([^ ][^ ]*\)/$ngx_regex_cont\1/g" \ + -e "s/\//$ngx_regex_dirsep/g"` -# nginx + ngx_incs=`echo $IMAP_INCS \ + | sed -e "s/ *\([^ ][^ ]*\)/$ngx_regex_cont$ngx_include_opt\1/g" \ + -e "s/\//$ngx_regex_dirsep/g"` -if [ $MAKE_SL = YES ]; then - echo $ngx_n "nginx$BINEXT: " $ngx_c >> $MAKEFILE -else - echo "nginx$BINEXT: \\" >> $MAKEFILE -fi + cat << END >> $NGX_MAKEFILE +IMAP_DEPS = $ngx_deps -# nginx deps -for src in $all_srcs -do - obj=`echo $src | sed -e "s/\.c\$/.$OBJEXT/" -e "s/\.S\$/.$OBJEXT/"` - obj=`echo $OBJS/$obj | sed -e "s/\//$DIRSEP/g"` +IMAP_INCS = $ngx_include_opt$ngx_incs - if [ $MAKE_SL = YES ]; then - echo $ngx_n " $obj" $ngx_c >> $MAKEFILE - else - echo " $obj \\" >> $MAKEFILE - fi -done +END -for src in $NGX_MODULES_C $LINK_DEPS -do - obj=`echo $src | sed -e "s/\.c\$/.$OBJEXT/"` - obj=`echo $obj | sed -e "s/\//$DIRSEP/g"` +fi - if [ $MAKE_SL = YES ]; then - echo $ngx_n " $obj" $ngx_c >> $MAKEFILE - else - echo " $obj \\" >> $MAKEFILE - fi -done -echo >> $MAKEFILE +# nginx -# nginx build +ngx_all_srcs=`echo $ngx_all_srcs | sed -e "s/\//$ngx_regex_dirsep/g"` +ngx_modules_c=`echo $NGX_MODULES_C | sed -e "s/\//$ngx_regex_dirsep/g"` -if [ $MAKE_SL = YES ]; then - echo $ngx_n " \$(LINK) ${BINOUT}nginx" $ngx_c >> $MAKEFILE -else - echo " \$(LINK) ${BINOUT}nginx \\" >> $MAKEFILE -fi +ngx_all_objs=`echo $ngx_all_srcs \ + | sed -e "s/\([^ ]*\.\)cpp/$NGX_OBJS\/\1$ngx_objext/g" \ + -e "s/\([^ ]*\.\)cc/$NGX_OBJS\/\1$ngx_objext/g" \ + -e "s/\([^ ]*\.\)c/$NGX_OBJS\/\1$ngx_objext/g" \ + -e "s/\([^ ]*\.\)S/$NGX_OBJS\/\1$ngx_objext/g"` +ngx_modules_obj=`echo $ngx_modules_c | sed -e "s/\(.*\.\)c/\1$ngx_objext/"` -# nginx build sources +ngx_deps=`echo $ngx_all_objs $ngx_modules_obj $LINK_DEPS \ + | sed -e "s/ *\([^ ][^ ]*\)/$ngx_regex_cont\1/g" \ + -e "s/\//$ngx_regex_dirsep/g"` -for src in $all_srcs -do - obj=`echo $src | sed -e "s/\.c\$/.$OBJEXT/" -e "s/\.S\$/.$OBJEXT/"` - obj=`echo $OBJS/$obj | sed -e "s/\//$DIRSEP/g"` +ngx_objs=`echo $ngx_all_objs $ngx_modules_obj \ + | sed -e "s/ *\([^ ][^ ]*\)/$ngx_regex_cont\1/g" \ + -e "s/\//$ngx_regex_dirsep/g"` - if [ $MAKE_SL = YES ]; then - echo $ngx_n " $obj" $ngx_c >> $MAKEFILE - else - echo " $obj \\" >> $MAKEFILE - fi -done +ngx_libs=${CORE_LIBS:+`echo $NGX_LD_OPT $CORE_LIBS \ + | sed -e "s/\//$ngx_regex_dirsep/g" -e "s/^/$ngx_regex_cont/"`} +ngx_link=${CORE_LINK:+`echo $CORE_LINK \ + | sed -e "s/\//$ngx_regex_dirsep/g" -e "s/^/$ngx_regex_cont/"`} -# nginx build ngx_modules.c and libs +cat << END >> $NGX_MAKEFILE -obj=`echo $NGX_MODULES_C | sed -e "s/\.c\$/.$OBJEXT/" -e "s/\//$DIRSEP/g"` -src=`echo $NGX_MODULES_C | sed -e "s/\//$DIRSEP/g"` -libs=`echo $CORE_LIBS | sed -e "s/\.c\$/.$OBJEXT/" -e "s/\//$DIRSEP/g"` -link=`echo $CORE_LINK | sed -e "s/\.c\$/.$OBJEXT/" -e "s/\//$DIRSEP/g"` +$NGX_OBJS${ngx_dirsep}nginx${ngx_binext}: $ngx_deps$ngx_spacer + \$(LINK) ${ngx_binout}$NGX_OBJS${ngx_dirsep}nginx$ngx_cont$ngx_objs$ngx_libs$ngx_link -if [ $MAKE_SL = YES ]; then - echo " $obj $libs $CORE_LINK" >> $MAKEFILE - echo >> $MAKEFILE -else - echo " $obj \\" >> $MAKEFILE - echo " $libs \\" >> $MAKEFILE - echo " $link" >> $MAKEFILE - echo >> $MAKEFILE -fi +END # ngx_modules.c -deps="\$(CORE_DEPS)" - -if [ $PCH != NO ]; then - args="\$(CFLAGS) $USEPCH \$(ALL_INCS)" +if test -n "$NGX_PCH"; then + ngx_cc="\$(CC) $ngx_compile_opt \$(CFLAGS) $ngx_use_pch \$(ALL_INCS)" else - args="\$(CFLAGS) $USEPCH \$(CORE_INCS)" + ngx_cc="\$(CC) $ngx_compile_opt \$(CFLAGS) \$(CORE_INCS)" fi -if [ $MAKE_SL = YES ]; then - echo "$obj: $NGX_MODULES_C $deps" >> $MAKEFILE - echo $ngx_n " \$(CC) $COMPOPT $args" $ngx_c >> $MAKEFILE - echo " $OBJOUT$obj $src" >> $MAKEFILE - echo >> $MAKEFILE -else - echo "$obj: \\" >> $MAKEFILE - echo " $NGX_MODULES_C $deps" >> $MAKEFILE - echo " \$(CC) $COMPOPT $args \\" >> $MAKEFILE - echo " $OBJOUT$obj \\" >> $MAKEFILE - echo " $src" >> $MAKEFILE - echo >> $MAKEFILE -fi +cat << END >> $NGX_MAKEFILE + +$ngx_modules_obj: \$(CORE_DEPS)$ngx_cont$ngx_modules_c + $ngx_cc$ngx_tab$ngx_objout$ngx_modules_obj$ngx_tab$ngx_modules_c +END -# core sources -for src in $CORE_SRCS +# the core sources + +for ngx_src in $CORE_SRCS do - obj=`echo $src | sed -e "s/\.c\$/.$OBJEXT/" -e "s/\.S\$/.$OBJEXT/"` - obj=`echo $OBJS/$obj | sed -e "s/\//$DIRSEP/g"` - src=`echo $src | sed -e "s/\//$DIRSEP/g"` - - if [ $MAKE_SL = YES ]; then - echo "$obj: $src $deps" >> $MAKEFILE - echo " \$(CC) $COMPOPT $args $OBJOUT$obj $src" >> $MAKEFILE - echo >> $MAKEFILE - else - echo "$obj: \\" >> $MAKEFILE - echo " $src $deps" >> $MAKEFILE - echo " \$(CC) $COMPOPT $args \\" >> $MAKEFILE - echo " $OBJOUT$obj \\" >> $MAKEFILE - echo " $src" >> $MAKEFILE - echo >> $MAKEFILE - fi + + ngx_src=`echo $ngx_src | sed -e "s/\//$ngx_regex_dirsep/g"` + ngx_obj=`echo $ngx_src \ + | sed -e "s/^\(.*\.\)cpp$/$ngx_objs_dir\1$ngx_objext/g" \ + -e "s/^\(.*\.\)cc$/$ngx_objs_dir\1$ngx_objext/g" \ + -e "s/^\(.*\.\)c$/$ngx_objs_dir\1$ngx_objext/g" \ + -e "s/^\(.*\.\)S$/$ngx_objs_dir\1$ngx_objext/g"` + + cat << END >> $NGX_MAKEFILE + +$ngx_obj: \$(CORE_DEPS)$ngx_cont$ngx_src + $ngx_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src + +END + done -# http sources +# the http sources if [ $HTTP = YES ]; then - deps="\$(CORE_DEPS) \$(HTTP_DEPS)" - - if [ $PCH != NO ]; then - args="\$(CFLAGS) $USEPCH \$(ALL_INCS)" + if test -n "$NGX_PCH"; then + ngx_cc="\$(CC) $ngx_compile_opt \$(CFLAGS) $ngx_use_pch \$(ALL_INCS)" else - args="\$(CFLAGS) $USEPCH \$(CORE_INCS) \$(HTTP_INCS)" + ngx_cc="\$(CC) $ngx_compile_opt \$(CFLAGS) \$(CORE_INCS) \$(HTTP_INCS)" fi - for src in $HTTP_SRCS + for ngx_src in $HTTP_SRCS do - obj=`echo $src | sed -e "s/\.c\$/.$OBJEXT/"` - obj=`echo $OBJS/$obj | sed -e "s/\//$DIRSEP/g"` - src=`echo $src | sed -e "s/\//$DIRSEP/g"` - - if [ $MAKE_SL = YES ]; then - echo "$obj: $src $deps" >> $MAKEFILE - echo " \$(CC) $COMPOPT $args $OBJOUT$obj $src" >> $MAKEFILE - echo >> $MAKEFILE - else - echo "$obj: \\" >> $MAKEFILE - echo " $src $deps" >> $MAKEFILE - echo " \$(CC) $COMPOPT $args \\" >> $MAKEFILE - echo " $OBJOUT$obj \\" >> $MAKEFILE - echo " $src" >> $MAKEFILE - echo >> $MAKEFILE - fi - done + + ngx_src=`echo $ngx_src | sed -e "s/\//$ngx_regex_dirsep/g"` + ngx_obj=`echo $ngx_src \ + | sed -e "s/^\(.*\.\)cpp$/$ngx_objs_dir\1$ngx_objext/g" \ + -e "s/^\(.*\.\)cc$/$ngx_objs_dir\1$ngx_objext/g" \ + -e "s/^\(.*\.\)c$/$ngx_objs_dir\1$ngx_objext/g" \ + -e "s/^\(.*\.\)S$/$ngx_objs_dir\1$ngx_objext/g"` + + cat << END >> $NGX_MAKEFILE + +$ngx_obj: \$(CORE_DEPS) \$(HTTP_DEPS)$ngx_cont$ngx_src + $ngx_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src + +END + + done fi -# imap sources +# the imap sources if [ $IMAP = YES ]; then - deps="\$(CORE_DEPS) \$(IMAP_DEPS)" - - if [ $PCH != NO ]; then - args="\$(CFLAGS) $USEPCH \$(ALL_INCS)" + if test -n "$NGX_PCH"; then + ngx_cc="\$(CC) $ngx_compile_opt \$(CFLAGS) $ngx_use_pch \$(ALL_INCS)" else - args="\$(CFLAGS) $USEPCH \$(CORE_INCS) \$(IMAP_INCS)" + ngx_cc="\$(CC) $ngx_compile_opt \$(CFLAGS) \$(CORE_INCS) \$(IMAP_INCS)" fi - for src in $IMAP_SRCS + for ngx_src in $IMAP_SRCS do - obj=`echo $src | sed -e "s/\.c\$/.$OBJEXT/"` - obj=`echo $OBJS/$obj | sed -e "s/\//$DIRSEP/g"` - src=`echo $src | sed -e "s/\//$DIRSEP/g"` - - if [ $MAKE_SL = YES ]; then - echo "$obj: $src $deps" >> $MAKEFILE - echo " \$(CC) $COMPOPT $args $OBJOUT$obj $src" >> $MAKEFILE - echo >> $MAKEFILE - else - echo "$obj: \\" >> $MAKEFILE - echo " $src $deps" >> $MAKEFILE - echo " \$(CC) $COMPOPT $args \\" >> $MAKEFILE - echo " $OBJOUT$obj \\" >> $MAKEFILE - echo " $src" >> $MAKEFILE - echo >> $MAKEFILE - fi - done + + ngx_src=`echo $ngx_src | sed -e "s/\//$ngx_regex_dirsep/g"` + ngx_obj=`echo $ngx_src \ + | sed -e "s/^\(.*\.\)cpp$/$ngx_objs_dir\1$ngx_objext/g" \ + -e "s/^\(.*\.\)cc$/$ngx_objs_dir\1$ngx_objext/g" \ + -e "s/^\(.*\.\)c$/$ngx_objs_dir\1$ngx_objext/g" \ + -e "s/^\(.*\.\)S$/$ngx_objs_dir\1$ngx_objext/g"` + + cat << END >> $NGX_MAKEFILE + +$ngx_obj: \$(CORE_DEPS) \$(IMAP_DEPS)$ngx_cont$ngx_src + $ngx_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src + +END + + done fi -# precompiled headers +# the precompiled headers + +if test -n "$NGX_PCH"; then + echo "#include <ngx_config.h>" > $OBJS/ngx_pch.c + + ngx_pch="src/core/ngx_config.h $OS_CONFIG $OBJS/ngx_auto_config.h" + ngx_pch=`echo "$NGX_PCH: $ngx_pch" | sed -e "s/\//$ngx_regex_dirsep/g"` + + ngx_src="\$(CC) \$(CFLAGS) $NGX_BUILD_PCH $ngx_compile_opt \$(ALL_INCS)" + ngx_src="$ngx_src $ngx_objout$OBJS/ngx_pch.obj $OBJS/ngx_pch.c" + ngx_src=`echo $ngx_src | sed -e "s/\//$ngx_regex_dirsep/g"` + + cat << END >> $NGX_MAKEFILE -if [ $PCH != NO ]; then - echo "#include <ngx_config.h>" > $OBJS/pch.c +$ngx_pch + $ngx_src - pch="$PCH: src/core/ngx_config.h $OS_CONFIG $OBJS/ngx_auto_config.h" - pch=`echo $pch | sed -e "s/\//$DIRSEP/g"` - src="\$(CC) \$(CFLAGS) $BUILDPCH $COMPOPT \$(ALL_INCS)" - src="$src $OBJOUT$OBJS/pch.obj $OBJS/pch.c" - src=`echo $src | sed -e "s/\//$DIRSEP/g"` +END - echo "$pch" >> $MAKEFILE - echo " $src" >> $MAKEFILE - echo >> $MAKEFILE fi |