Hi,

This is a report of a small trouble I encountered when I wrote
`MAKEFLAGS := --warn-undefined-variables' in a makefile.

[/tmp]% uname -srm
Linux 2.4.5-3 i686
[/tmp]% make-3.80rc1/make -v
GNU Make 3.80rc1
...snip...

    (description)
      The above is the environment of my experiment.
      I first encountered the trouble using make-3.79.1, and
      found no improvements in make-3.80rc1.

[/tmp]% cat Makefile1
all: $(FOO)
        @echo abcde
[/tmp]% make-3.80rc1/make -f Makefile1 
abcde

    (description)
      The above makefile is somewhat erroneous, but `make' does
      not print a warning message by default.

[/tmp]% make-3.80rc1/make -f Makefile1 --warn-undefined-variables
Makefile1:1: warning: undefined variable `FOO'
abcde
[/tmp]% env MAKEFLAGS=--warn-undefined-variables \
        make-3.80rc1/make -f Makefile1  
Makefile1:1: warning: undefined variable `FOO'
abcde

    (description)
      `make' prints a warning message when I specify
      --warn-undefined-variables option in the command line
      or in the MAKEFLAGS environment variable.  Good.

[/tmp]% cat Makefile2
MAKEFLAGS := --warn-undefined-variables
all: $(FOO)
        @echo abcde
[/tmp]% make-3.80rc1/make -f Makefile2
abcde

    (description)
      `make' does not print a warning message when I specify
      --warn-undefined-variables option via the MAKEFLAGS
      variable in the makefile.  Hmmm....

I can vaguely guess why `make' shows this behavior, so I do not call
it a definite bug.  However, I will be happy if `make -f Makefile2'
prints a warning message.

Best regards,

====
Honda Hiroki ([EMAIL PROTECTED])



_______________________________________________
Bug-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-make

Reply via email to