On Tue, Jun 19, 2007 at 08:50:32PM +0200, Stephan Beal wrote: > Hi, Makers! > > i just discovered a Make behaviour which really surprises me. While that > in itself is nothing new ;), this one certainly violates the principal > of least astonishment: > > When a $(warning) or $(error) is inside a 'define', it is evaluated even > if it is part of a comment. A demonstration: > > [EMAIL PROTECTED]:~/cvs/www.t5$ make --version > GNU Make 3.81 > ... > > Input file to reproduce problem: > #!/usr/bin/make -f > ################################################## > default: all > define bogo > # $(warning this should not be evaluated here: (bogo $(1))) > abc := $(1) > endef
On the other hand I would have been suprised if make supported having comments between define/endef. So in several cases I have used define/endef to avoid the need to quote "#". Or in other words if "#" suddenly becomes a comment inside define/endef some Makefile's will break. Sam _______________________________________________ Bug-make mailing list Bug-make@gnu.org http://lists.gnu.org/mailman/listinfo/bug-make