[Top][All Lists]

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

[bug #51974] call on multiline (define/endef) behavior not well-document

From: Jouke Witteveen
Subject: [bug #51974] call on multiline (define/endef) behavior not well-documented
Date: Thu, 9 Apr 2020 06:58:06 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:75.0) Gecko/20100101 Firefox/75.0

Follow-up Comment #7, bug #51974 (project make):

Either the 'new' documentation is not entirely correct, or there is a bug in
the current expansion logic (or I am misunderstanding something).

The documentation states:

4. Expand elements of the line which appear in an immediate expansion context
(see How make Reads a Makefile).
5. Scan the line for a separator character, such as ‘:’ or ‘=’, to
determine whether the line is a macro assignment or a rule (see Recipe
6. Internalize the resulting operation and read the next line.

An important consequence of this is that a macro can expand to an entire rule,
if it is one line long.

The last statement assumes that a line containing only a variable reference,
such as


presents an immediate expansion context, although it does not meet any of the
stated forms of an immediate expansion context.

If it were, then this should also work:

myassignment = var = val


Step 5 of the list above would apply to the last line of this example (it
expands to 'var = val'). However, make fails with a "missing separator" error.
A slightly different error, "empty variable name", results from this

myassignment = var := val



Reply to this item at:


  Message sent via Savannah

reply via email to

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