From: "Radim Krčmář" <rkrcmar@redhat.com>
To: "Alex Bennée" <alex.bennee@linaro.org>
Cc: pbonzini@redhat.com, drjones@redhat.com, kvm@vger.kernel.org
Subject: Re: [kvm-unit-tests PATCH v2 1/9] configure: make it run-able from outside source tree
Date: Wed, 17 May 2017 16:50:32 +0200 [thread overview]
Message-ID: <20170517145027.GB10587@potion> (raw)
In-Reply-To: <20170512164001.4117-2-alex.bennee@linaro.org>
2017-05-12 17:39+0100, Alex Bennée:
> This is a first step to enabling out-of-tree builds for
> kvm-unit-tests. When you invoke configure like this:
>
> ../tree.git/configure [args]
>
> It will detect we the case and:
>
> - link ../tree.git/Makefile to the build-dir
> - link ../tree.git/$(arch) and test scripts
> - link ../tree.git/run_tests.sh
> - ensure lib is created with a correct lib/asm
> - set SRCDIR in the config.mk
>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>
> ---
> v2
> - ln -sf more directory structure
> - quotes around places where $srcdir is used
> - dropped pointless {}s
> ---
> diff --git a/configure b/configure
> +srcdir=$(cd "$(dirname "$0")"; pwd)
> +# Are we in a separate build tree? If so, link the Makefile
> +# and shared stuff so that 'make' and run_tests.sh work.
> +if test ! -e Makefile; then
> + echo "linking Makefile..."
> + ln -s "$srcdir/Makefile" .
> +
> + echo "linking tests..."
> + mkdir -p $testdir
> + ln -sf "$srcdir/$testdir/run" $testdir/
> + ln -sf "$srcdir/$testdir/unittests.cfg" $testdir/
> + ln -sf "$srcdir/run_tests.sh"
> +
> + echo "linking scripts..."
> + ln -sf "$srcdir/scripts"
> +fi
> +
>
> # create the config
> cat <<EOF > config.mak
> +SRCDIR=$srcdir
Whitespace in $srcdir is going to break the build. I think that we
cannot prevent that by escaping as `make` is notoriously bad in that
regard. Aborting sounds better and maybe something like this could
work:
ln -sf "$srcdir" srcdir
srcdir=srcdir
I'm ok with this version if the solution would not be simple. :)
next prev parent reply other threads:[~2017-05-17 14:50 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-12 16:39 [kvm-unit-tests PATCH v2 0/9] Support for out-of-tree builds Alex Bennée
2017-05-12 16:39 ` [kvm-unit-tests PATCH v2 1/9] configure: make it run-able from outside source tree Alex Bennée
2017-05-17 14:50 ` Radim Krčmář [this message]
2017-06-08 14:13 ` Paolo Bonzini
2017-05-12 16:39 ` [kvm-unit-tests PATCH v2 2/9] Makefile: ensure build-head works out-of-src-tree Alex Bennée
2017-05-12 16:39 ` [kvm-unit-tests PATCH v2 3/9] Makefile: set VPATH based on SRCDIR Alex Bennée
2017-05-12 16:39 ` [kvm-unit-tests PATCH v2 4/9] Makefiles: use explicit path for including sub-Makefiles Alex Bennée
2017-05-12 16:39 ` [kvm-unit-tests PATCH v2 5/9] Makefile: add explicit directories target Alex Bennée
2017-06-08 14:32 ` Paolo Bonzini
2017-05-12 16:39 ` [kvm-unit-tests PATCH v2 6/9] Makefiles: fix up the x86 build dirs and include/link paths Alex Bennée
2017-05-12 16:39 ` [kvm-unit-tests PATCH v2 7/9] Makefiles: fix up the arm " Alex Bennée
2017-05-12 16:40 ` [kvm-unit-tests PATCH v2 8/9] Makefiles: Fix up the powerpc " Alex Bennée
2017-05-12 16:40 ` [kvm-unit-tests PATCH v2 9/9] .travis.yml: initial build matrix Alex Bennée
2017-05-19 16:20 ` [kvm-unit-tests PATCH v2 0/9] Support for out-of-tree builds Radim Krčmář
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170517145027.GB10587@potion \
--to=rkrcmar@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=drjones@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox