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 $(foreach ARG,abc def ghi,$(eval $(call bogo,$(ARG)))) all: ################################################## [EMAIL PROTECTED]:~/cvs/www.t5$ make -f bug.make bug.make:11: this should not be evaluated here: (bogo abc) bug.make:11: this should not be evaluated here: (bogo def) bug.make:11: this should not be evaluated here: (bogo ghi) make: Nothing to be done for `default'. As far as i understand, comments are comments, regardless of the context. ??? My assumption is that this also applies to other $(functions) inside such a comment, but i haven't tried it out. Or is this a strange as-designed behaviour? Many thanks in advance for your time and your awesome product, (No, that's not sarcasm! i'm a huge fan!) -- ----- [EMAIL PROTECTED] http://www.wanderinghorse.net
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Bug-make mailing list Bug-make@gnu.org http://lists.gnu.org/mailman/listinfo/bug-make