Package: make
Version: 3.81-8
Severity: normal

The GNU Make manual starts like this:

     MAKEFLAGS
         The flags given to make. You can set this in the environment or a 
makefile to set flags.
         See Communicating Options to a Sub-make.

This sounds as if assigning to MAKEFLAGS will have the same effect as supplying
an option on the command line (which is quite tempting since many options e.g.
--no-builtin-rules make Make a lot more sane in many modern contexts).  But
this is apparently not the case.  Consider this Makefile:

     MAKEFLAGS += --no-builtin-variables
     
     ecc:
             @echo XX$(CC)XX
             [ $(MAKELEVEL) -lt 2 ] || false
             make ecc

Then we get:

  $ make ecc
  XXccXX
  [ 0 -lt 2 ] || false
  make ecc
  make[1]: Entering directory `/home/bkerin/projects/utility_meter/hub/software'
  XXXX
  [ 1 -lt 2 ] || false
  make ecc
  make[2]: Entering directory `/home/bkerin/projects/utility_meter/hub/software'
  XXXX
  [ 2 -lt 2 ] || false
  make[2]: *** [ecc] Error 1
  make[2]: Leaving directory `/home/bkerin/projects/utility_meter/hub/software'
  make[1]: *** [ecc] Error 2
  make[1]: Leaving directory `/home/bkerin/projects/utility_meter/hub/software'
  make: *** [ecc] Error 2
  $

Note that the top-level invocation still has the builtin variable CC set.  In
other words, the effects of setting MAKEFLAGS apply only to the sub-makes (as
documents under "Communicating Options to a Sub-make", not to the current
invocation itself.

The wording in the documentation should be changed to reflect this fact.


-- System Information:
Debian Release: 6.0.7
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-5-686-bigmem (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages make depends on:
ii  libc6                         2.11.3-4   Embedded GNU C Library: Shared lib

make recommends no packages.

Versions of packages make suggests:
pn  make-doc                      <none>     (no description available)

-- no debconf information


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to