From f5b3423e1ed65ece2c7615b2fb372cc4d0e39850 Mon Sep 17 00:00:00 2001 Message-Id: From: Mark Wooding Date: Tue, 10 Apr 2012 11:53:09 +0100 Subject: [PATCH] bin/mdw-build: Do non-VPATH builds. Organization: Straylight/Edgeware From: Mark Wooding --- bin/mdw-build | 38 +++++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/bin/mdw-build b/bin/mdw-build index 2c4edaa..bd1b457 100755 --- a/bin/mdw-build +++ b/bin/mdw-build @@ -69,6 +69,7 @@ Build options: [no]debian [no]upload [no]clean + [no]vpath EOF } @@ -92,6 +93,7 @@ distcheck=yes debian=yes upload=yes clean=yes +vpath=yes for opt; do case "$opt" in checkout) checkout=yes checkoutrev=HEAD ;; @@ -100,10 +102,10 @@ for opt; do release) build=release ;; norelease) build=test ;; - setup | distcheck | debian | upload | clean) + setup | distcheck | debian | upload | clean | vpath) eval "$opt=yes" ;; - nosetup | nodistcheck | nodebian | noupload | noclean) + nosetup | nodistcheck | nodebian | noupload | noclean | novpath) eval "${opt#no}=no" ;; *) @@ -239,7 +241,7 @@ case "$gitver,$debver" in ;; esac -## Maybe check ot a copy of the source. +## Maybe check out a copy of the source. case "$checkout" in yes) cd $releasepath @@ -258,16 +260,26 @@ case "$setup" in esac ## Initialize the build directory. -if [ -e $srcpath/configure ]; then - assign buildpath $releasepath/_build - mkdir $buildpath - cd $buildpath - run $srcpath/configure -else - info "no configure script" - assign buildpath $srcpath - cd $srcpath -fi +case "$vpath,$(yesno [ -e $srcpath/configure ])" in + yes,yes) + assign buildpath $releasepath/_build + mkdir $buildpath + cd $buildpath + run $srcpath/configure + ;; + no,yes) + info "VPATH build disabled" + assign buildpath $srcpath + distcheck=no + cd $srcpath + run ./configure + ;; + *,no) + info "no configure script" + assign buildpath $srcpath + cd $srcpath + ;; +esac ## Discover the release name. cat >find-distdir.mk <<'EOF' -- [mdw]