Re: AX_ENABLE_BUILDDIR mangles module-init-tools Makefile

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[moved to current linux-modules list]

Mike Frysinger wrote:
the latest module-init-tools code uses AX_ENABLE_BUILDDIR. unfortunately, the macro mangles the top level Makefile, and for some people, makes it unusable.

- start with:
http://www.kernel.org/pub/linux/utils/kernel/module-init-tools/module-init-
tools-3.11.1.tar.bz2
- run ./configure
- read Makefile

seems like the macro is trying to match make targets, but in doing so, it matches variables that are set to colons:
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :

each of these has shell code injected after them like:
    @ HOST="$(HOST)" \
    ; test ".$$HOST" = "." ..............

it gets to be a real problem when the makefile uses string replacement patterns like so:
SGML = $(addprefix doc/,  $(MAN5:%.5=%.sgml) $(MAN8:%.8=%.sgml))

this gets corrupted into:
SGML = $(addprefix doc/,  $(MAN5:
    @ HOST="$(HOST)" \
    ; test ".$$HOST" = "." ..............

and for some man implementations, this triggers an error about unbalanced parenthesis
-mike

Ok, that's not too hard to fix. This should do the trick - are there any problems after this?

diff --git a/m4/ax_enable_builddir.m4 b/m4/ax_enable_builddir.m4
index 49b3eb9..c65584f 100644
--- a/m4/ax_enable_builddir.m4
+++ b/m4/ax_enable_builddir.m4
@@ -187,8 +187,8 @@ s/^srcdir *=.*/srcdir = ./
s/^top_srcdir *=.*/top_srcdir = ./
/[[:=]]/!d
/^\\./d
-dnl Now handle rules (i.e. lines containing /:/ but not /:=/).
-/:=/b
+dnl Now handle rules (i.e. lines containing ':' but not '=').
+/ .\?= /b
/:/!b
s/:.*/:/
s/ /  /g


--
To unsubscribe from this list: send the line "unsubscribe linux-modules" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux