NO

Author Topic: pomake rejects macros in lvalue names  (Read 394 times)

skeeto

  • Guest
pomake rejects macros in lvalue names
« on: June 17, 2016, 10:27:45 PM »
This isn't exactly a bug since there's no promised behavior, but it departs from both POSIX and Microsoft's nmake. The following Makefile lines:

BAR = FOO
$(BAR) = 1


Cause pomake to report "warning: The name '$(BAR)' contains one or more inappropriate characters." I expect FOO to be assigned to 1. Instead, the assignment doesn't take place (FOO remains empty). A POSIX-compliant make is required to expand the left-hand side before assignment, and nmake follows suit.

Why use such a weird construction? It's a portable poor man's conditional assignment.