autoconf: The Make Macro MAKEFLAGS

1 
1 12.8 The Make Macro MAKEFLAGS
1 =============================
1 
1 Posix requires `make' to use `MAKEFLAGS' to affect the current and
1 recursive invocations of make, but allows implementations several
1 formats for the variable.  It is tricky to parse `$MAKEFLAGS' to
1 determine whether `-s' for silent execution or `-k' for continued
1 execution are in effect.  For example, you cannot assume that the first
1 space-separated word in `$MAKEFLAGS' contains single-letter options,
1 since in the Cygwin version of GNU `make' it is either `--unix' or
1 `--win32' with the second word containing single-letter options.
1 
1      $ cat Makefile
1      all:
1              @echo MAKEFLAGS = $(MAKEFLAGS)
1      $ make
1      MAKEFLAGS = --unix
1      $ make -k
1      MAKEFLAGS = --unix -k
1