[PATCH 1 of 2] Configure: fix tests with multi-level relative build directory

Maxim Dounin mdounin at mdounin.ru
Fri Jun 12 00:21:15 UTC 2015


Hello!

On Thu, Jun 11, 2015 at 11:29:38PM +0300, Ruslan Ermilov wrote:

> On Thu, Jun 11, 2015 at 05:18:16PM +0300, Maxim Dounin wrote:
> > On Thu, Jun 11, 2015 at 11:51:57AM +0300, Ruslan Ermilov wrote:
> > 
> > > On Wed, Jun 10, 2015 at 07:19:29PM -0700, Piotr Sikora wrote:
> > > > # HG changeset patch
> > > > # User Piotr Sikora <piotr at cloudflare.com>
> > > > # Date 1433989099 25200
> > > > #      Wed Jun 10 19:18:19 2015 -0700
> > > > # Node ID 4ee03ff4811708bafd07e84c5a71165a52b38299
> > > > # Parent  c041f1e0655f786db5cf1a3e79ca1f464fec0258
> > > > Configure: fix tests with multi-level relative build directory.
> > > > 
> > > > Signed-off-by: Piotr Sikora <piotr at cloudflare.com>
> > > > 
> > > > diff -r c041f1e0655f -r 4ee03ff48117 auto/unix
> > > > --- a/auto/unix	Wed Jun 10 19:18:20 2015 +0300
> > > > +++ b/auto/unix	Wed Jun 10 19:18:19 2015 -0700
> > > > @@ -510,7 +510,7 @@ case "$NGX_AUTO_CONFIG_H" in
> > > >          NGX_INCLUDE_AUTO_CONFIG_H="#include \"$NGX_AUTO_CONFIG_H\""
> > > >      ;;
> > > >      *)
> > > > -        NGX_INCLUDE_AUTO_CONFIG_H="#include \"../$NGX_AUTO_CONFIG_H\""
> > > > +        NGX_INCLUDE_AUTO_CONFIG_H="#include \"$PWD/$NGX_AUTO_CONFIG_H\""
> > > >      ;;
> > > >  esac
> > > 
> > > How's this instead?
> > > 
> > > diff --git a/auto/unix b/auto/unix
> > > --- a/auto/unix
> > > +++ b/auto/unix
> > > @@ -505,14 +505,7 @@ ngx_param=NGX_PTR_SIZE; ngx_value=$ngx_s
> > >  
> > >  # POSIX types
> > >  
> > > -case "$NGX_AUTO_CONFIG_H" in
> > > -    /*)
> > > -        NGX_INCLUDE_AUTO_CONFIG_H="#include \"$NGX_AUTO_CONFIG_H\""
> > > -    ;;
> > > -    *)
> > > -        NGX_INCLUDE_AUTO_CONFIG_H="#include \"../$NGX_AUTO_CONFIG_H\""
> > > -    ;;
> > > -esac
> > > +NGX_INCLUDE_AUTO_CONFIG_H="#include \"ngx_auto_config.h\""
> > >  
> > >  ngx_type="uint64_t"; ngx_types="u_int64_t"; . auto/types/typedef
> > 
> > Shouldn't it be just a string in auto/types/sizeof then?
> 
> Originally I've implemented it exactly like you say,
> but then thought that I'd probably worth to preserve
> the optimization -- i.e. we only include ngx_auto_config.h
> for types that we might have typedef'ed earlier.

Well, I'm fine either way.  Feel free to commit.

-- 
Maxim Dounin
http://nginx.org/



More information about the nginx-devel mailing list