When checking for separate Linux source and build directory, ignore any
authorIan Abbott <abbotti@mev.co.uk>
Fri, 22 May 2009 11:11:13 +0000 (11:11 +0000)
committerIan Abbott <abbotti@mev.co.uk>
Fri, 22 May 2009 11:11:13 +0000 (11:11 +0000)
extra paramters after MAKEARGS := -C $(SOURCE_DIR).
Fixes Debian bug #526707.

m4/as-linux.m4

index d0a7c142bf4665aac1f2b88d7de114d066e3994d..c1fee7a9ff6a8bee16b68b2df12f08bbced68bef 100644 (file)
@@ -182,7 +182,7 @@ AC_DEFUN([AS_LINUX_SRC_DIR],
                dir=`sed -n -e 's/^KERNELSRC *:= *\(.*\)/\1/p' "$1/Makefile"`
                if test -z "$dir"; then
                        # 2.6.25
-                       dir=`sed -n -e 's/^MAKEARGS *:= *-C *\(.*\)/\1/p' "$1/Makefile"`
+                       dir=`sed -n -e 's/^MAKEARGS *:= *-C *\([^[:space:]]*\).*/\1/p' "$LINUX_DIR/Makefile"`
                fi
                if test -z "$dir"; then
                        AC_MSG_RESULT([no])