Hi all:

Writing makefiles is hard enough, so I always enable option 
--warn-undefined-variables whenever I can.

I have recently realised that in GNU Make 3.81 the $(value ...) function does 
not warn as expected. That is, if I run this example makefile:


VAR_NAME := UNDEFINED_VARIABLE

all:
    echo "$(UNDEFINED_VARIABLE)"
    echo "$($(VAR_NAME))"
    echo "$(value $(VAR_NAME))"


I get the following output:

Makefile:24: Warnung: undefinierte Variable »UNDEFINED_VARIABLE«
Makefile:24: Warnung: undefinierte Variable »UNDEFINED_VARIABLE«
echo ""
echo ""
echo ""


Is this an oversight? The manual does not mention any exceptions for 
--warn-undefined-variables, and I wish that $(value ...) warned too.


Please copy me on the answers, as I'm not subscribed to this list.

Thanks,
  R. Diez

_______________________________________________
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make

Reply via email to