bug-make
[Top][All Lists]
Advanced

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

Re: Why "*** extraneous `endef'. Stop."?


From: Sergey Zubkovsky
Subject: Re: Why "*** extraneous `endef'. Stop."?
Date: Sun, 06 Sep 2009 19:09:35 +0400
User-agent: Thunderbird 2.0.0.23 (Windows/20090812)

It seems to me this is a bug.

All will be fine if we just rewrite 'ifneq (1,1)' as 'ifeq (1,1)'.

That is why I sent the question.
I hope someone will add an item in the bug tracker (who know `make' better than me and will confirm this supposition).

Alfred M. Szmidt wrote:
   define starts a macro.  Everything from the start of the macro to
   endef is just text and is not evaluated.

   So your inner "define" is not recognised - it's just treated as
   text.  That means that the dirst endef matches the first define and
   all the other endefs seem to have no corresponding define
   statement.

   In other words, you cannot nest defines like that.

Sure you can, it is a documented feature.  From the GNU make manual,
(make) Defining:

|    You may nest `define' directives: `make' will keep track of
| nested directives and report an error if they are not all properly
| closed with `endef'.  Note that lines beginning with tab characters
| are considered part of a command script, so any `define' or `endef'
| strings appearing on such a line will not be considered `make'
| operators.

This is more a bug than anything.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]