bug-make
[Top][All Lists]
Advanced

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

make bug or feature


From: Debjani Saha
Subject: make bug or feature
Date: Thu, 24 Apr 2003 19:16:18 -0700

Hi,

The following is a bug which was reported and i came across this in the GNU
make bug list. I am having a the same problem in solaris 2.8 systems and i
am not able to figure out why. Could you explain why make behaves this way
?

Also is this something that is going to be fixed in later releases of make
?

Bug report
------------------------------
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.
--------------------------------------------
End bug report

Thanks
Debjani Saha

-- 
Debjani Saha * address@hidden * 408-548-3196 * http://www.artisan.com
Artisan Components, Inc. * 141 Caspian Court * Sunnyvale, CA  94089 * USA




reply via email to

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