Add configure script check for gawk and unifdef when using kvm-userspace.git
PATCH 1/1 Add configure script check for gawk and unifdef when using kvm-userspace.git
When building kvm-userspace from git, gawk and unifdef are used by kernel/Makefile. Without this check it's non-obvious why kernel/Makefile fails.
configure +11 -0
@@ -113,6 +113,17 @@ if [ -d "$kerneldir/include2" ]; then kernelsourcedir=${kerneldir%/*}/source fi +# check for some utils we use +if [ -d .git ] ; then + if [ ! -x "`which gawk`" ] ; then + echo "gawk not installed and necessary for compiling from git" + exit 1 + fi + if [ ! -x "`which unifdef`" ] ; then + echo "unifdef not installed and necessary for compiling from git" + exit 1 +fi + #configure user dir (cd user; ./configure --prefix="$prefix" --kerneldir="$libkvm_kerneldir" \ --arch="$arch" \
Quoted 14 lines · Brian Jackson
When building kvm-userspace from git, gawk and unifdef are used by kernel/Makefile. Without this check it's non-obvious why kernel/Makefile fails.
Signed-off-by Brian Jackson <[email protected]>configure +0
-0@@ -113,6 +113,17 @@ if [ -d "$kerneldir/include2" ]; then kernelsourcedir=${kerneldir%/*}/source fi
configure if [ -d "$kerneldir/include2" ]; then · line 125
Quoted 10 lines
configure +10
-0+# check for some utils we use +if [ -d .git ] ; then + if [ ! -x "`which gawk`" ] ; then + echo "gawk not installed and necessary for compiling from git" + exit 1 + fi + if [ ! -x "`which unifdef`" ] ; then + echo "unifdef not installed and necessary for compiling from git" + exit 1 +fi
This is unlikely to be the correct fix. unifdef is provided by the kernel tree, under scripts. What we want is something like this:
- unifdef -DCONFIG_$(ARCH_CONFIG) -UCONFIG_$(NONARCH_CONFIG)
$1.orig > $1; \
+ $(LINUX)/scripts/unifdef -DCONFIG_$(ARCH_CONFIG)
-UCONFIG_$(NONARCH_CONFIG) $1.orig > $1; \
[ $$? -le 2 ] && rm $1.origQuoted 9 lines
configure +1
-1+ #configure user dir (cd user; ./configure --prefix="$prefix" --kerneldir="$libkvm_kerneldir" \ --arch="$arch" \ --To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 5 lines
Glauber Costa. "Free as in Freedom" http://glommer.net "The less confident you are, the more serious you have to act."
Quoted 32 lines · Glauber Costa
Quoted 22 lines · Brian Jackson
When building kvm-userspace from git, gawk and unifdef are used by kernel/Makefile. Without this check it's non-obvious why kernel/Makefile fails.
Signed-off-by Brian Jackson <[email protected]>configure +8
-0@@ -113,6 +113,17 @@ if [ -d "$kerneldir/include2" ]; then kernelsourcedir=${kerneldir%/*}/source fi +# check for some utils we use +if [ -d .git ] ; then + if [ ! -x "`which gawk`" ] ; then + echo "gawk not installed and necessary for compiling from git" + exit 1 + fi + if [ ! -x "`which unifdef`" ] ; then + echo "unifdef not installed and necessary for compiling fromQuoted 2 lines
git" + exit 1
+fiThis is unlikely to be the correct fix. unifdef is provided by the kernel tree, under scripts. What we want is something like this:
- unifdef -DCONFIG_$(ARCH_CONFIG) -UCONFIG_$(NONARCH_CONFIG)
$1.orig > $1; \
Review
Quoted 3 lines
(quoted diff) +1
-1+ $(LINUX)/scripts/unifdef -DCONFIG_$(ARCH_CONFIG) -UCONFIG_$(NONARCH_CONFIG) $1.orig > $1; \ [ $$? -le 2 ] && rm $1.orig
Huh... I just apt-get installed unifdef and it started working for me, so I figured that's what it needed.
The other part of the patch should still be good. Avi, want me to resend just the gawk bit? Or just leave it out and hope people figure out they need gawk.
Quoted 8 lines
Quoted 8 lines
+
#configure user dir
(cd user; ./configure --prefix="$prefix" --kerneldir="$libkvm_kerneldir"
\ --arch="$arch" \
--
To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html