Re: AX_ENABLE_BUILDDIR mangles module-init-tools Makefile

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

 



On Saturday 24 October 2009 05:21:07 Alan Jenkins wrote:
> 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-ini
> >t- 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
> 
> Ok, that's not too hard to fix.  This should do the trick - are there
> any problems after this?
> 
> -dnl Now handle rules (i.e. lines containing /:/ but not /:=/).
> -/:=/b
> +dnl Now handle rules (i.e. lines containing ':' but not '=').
> +/ .\?= /b

this seems to work for me.  thanks for the quick fix :).

btw, wouldnt it be easier to read the mangled Makefile if you inserted the 
recursive values as variables and then referred to those in the mangled rule ?  
just a though -- feel free to ignore ;).

AX_FOO = \
	@ HOST=......
...
install:
	$(AX_FOO)
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.


[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