|
From: | Martin Dorey |
Subject: | Re: [BUG] --warn-undefined-variable is not triggered in prerequisites |
Date: | Fri, 28 Jan 2022 01:42:35 +0000 |
That already seems to have been fixed:
martind@sirius:~/tmp/make-undefined-variables-2022-01-27$ cat Makefile
MAKEFLAGS += --warn-undefined-variables
a: $(foo); touch $@
martind@sirius:~/tmp/make-undefined-variables-2022-01-27$ ~/download/make/make --version
GNU Make 4.3.90
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
martind@sirius:~/tmp/make-undefined-variables-2022-01-27$ ~/download/make/make
Makefile:3: warning: undefined variable 'foo'
touch a
martind@sirius:~/tmp/make-undefined-variables-2022-01-27$
That's today's git... and wasn't actually the point I wanted to make, which was:
martind@sirius:~/tmp/make-undefined-variables-2022-01-27$ rm a
martind@sirius:~/tmp/make-undefined-variables-2022-01-27$ make --version
GNU Make 4.1
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
martind@sirius:~/tmp/make-undefined-variables-2022-01-27$ make
touch a
martind@sirius:~/tmp/make-undefined-variables-2022-01-27$ rm a
martind@sirius:~/tmp/make-undefined-variables-2022-01-27$ make --warn-undefined-variables
Makefile:3: warning: undefined variable 'foo'
touch a
martind@sirius:~/tmp/make-undefined-variables-2022-01-27$ From: Bug-make <bug-make-bounces+martin.dorey=hds.com@gnu.org> on behalf of Alejandro Colomar (man-pages) <alx.manpages@gmail.com>
Sent: Thursday, January 27, 2022 16:09 To: bug-make@gnu.org <bug-make@gnu.org> Subject: [BUG] --warn-undefined-variable is not triggered in prerequisites ***** EXTERNAL EMAIL *****
Hi, Consider the following scenario: $ ls Makefile $ cat Makefile MAKEFLAGS += --warn-undefined-variables a: $(foo) touch $@ $ make touch a $ ls a Makefile I'd like make to warn about this. It took me a while to debug a Makefile bug, which I thought was not happening, since make should have warned me. Isn't this supposed to trigger the warning? Thanks, Alex -- Alejandro Colomar Linux man-pages comaintainer; https://nam04.safelinks.protection.outlook.com/?url=""> https://nam04.safelinks.protection.outlook.com/?url=""> |
[Prev in Thread] | Current Thread | [Next in Thread] |