[master] 1d33f3ff5 build: Facilitate VPATH bootstraps

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Thu Jul 2 09:58:07 UTC 2020


commit 1d33f3ff5f0b9c4e1faec4bfaa7d6f5a7ce2510b
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Thu Jul 2 11:45:05 2020 +0200

    build: Facilitate VPATH bootstraps
    
    In order to bootstrap a $(builddir) outside of $(srcdir) until now the
    first step needed was to populate the environment. If for example one
    wants to work from a build/ sub-directory the shortest autogen.des
    invocation would look like:
    
        SRCDIR=.. ../autogen.des [configure options...]
    
    Since we can infer $(srcdir) from autogen.des' relative path, it is now
    possible to simply do this:
    
        ../autogen.des [configure options...]
    
    It is still possible to provide a specific SRCDIR, even to a different
    directory but the default should now work out of the box.

diff --git a/autogen.des b/autogen.des
index 44d3f551b..96a488f9e 100755
--- a/autogen.des
+++ b/autogen.des
@@ -2,7 +2,7 @@
 #
 # Use this when doing code development
 
-SRCDIR=${SRCDIR:-.}
+SRCDIR=${SRCDIR:-$(dirname "$0")}
 
 set -ex
 


More information about the varnish-commit mailing list