[Cmake] Use of -$(MAKEFLAGS)

Wheeler, Frederick W (Research) wheeler at crd . ge . com
Thu, 16 Oct 2003 17:48:28 -0400


For NMake and Borland Make, the Cmake generated Makefiles have a
stanza like this,

default_target:
C:\cygwin\home\wheeler\work_vxl\vxl_bld_win\cmake.check_cache
        $(MAKE) $(MAKESILENT) cmake.depends
        $(MAKE) $(MAKESILENT) cmake.check_depends
        $(MAKE) $(MAKESILENT) -f cmake.check_depends
        $(MAKE) $(MAKESILENT) all

Is there a reason this is not like the following?  (add MAKEFLAGS on last
line)

default_target:
C:\cygwin\home\wheeler\work_vxl\vxl_bld_win\cmake.check_cache
        $(MAKE) $(MAKESILENT) cmake.depends
        $(MAKE) $(MAKESILENT) cmake.check_depends
        $(MAKE) $(MAKESILENT) -f cmake.check_depends
        $(MAKE) -$(MAKEFLAGS) $(MAKESILENT) all

I get different behavior from "make -i" and "make -i all" because with
the former, the -i option is not passed on to sub-makes.  With "make
-i" the build stops at the first compilation failure and with "make -i
all" the build keeps on going, even after a compilation failure.

There must be more this that I understand because as far as I can tell
Dart uses "make -i" and seems to keep on building even after a
compilation error.  Hmm.

Fred Wheeler