Makefile
changeset 27595 cff167b3bfa2
parent 26548 3b002da2aee1
child 27602 236555ddac42
equal deleted inserted replaced
27594:e425f93c3dda 27595:cff167b3bfa2
    31 # affected, however. This is required for correct dependency management.
    31 # affected, however. This is required for correct dependency management.
    32 .NOTPARALLEL:
    32 .NOTPARALLEL:
    33 
    33 
    34 # The shell code below will be executed on /usr/ccs/bin/make on Solaris, but not in GNU make.
    34 # The shell code below will be executed on /usr/ccs/bin/make on Solaris, but not in GNU make.
    35 # /usr/ccs/bin/make lacks basically every other flow control mechanism.
    35 # /usr/ccs/bin/make lacks basically every other flow control mechanism.
    36 TEST_FOR_NON_GNUMAKE:sh=echo You are not using GNU make/gmake, this is a requirement. Check your path. 1>&2 && exit 1
    36 .TEST_FOR_NON_GNUMAKE:sh=echo You are not using GNU make/gmake, this is a requirement. Check your path. 1>&2 && exit 1
    37 
    37 
    38 # Assume we have GNU make, but check version.
    38 # Assume we have GNU make, but check version.
    39 ifeq ($(strip $(foreach v, 3.81% 3.82% 4.%, $(filter $v, $(MAKE_VERSION)))), )
    39 ifeq ($(strip $(foreach v, 3.81% 3.82% 4.%, $(filter $v, $(MAKE_VERSION)))), )
    40   $(error This version of GNU Make is too low ($(MAKE_VERSION)). Check your path, or upgrade to 3.81 or newer.)
    40   $(error This version of GNU Make is too low ($(MAKE_VERSION)). Check your path, or upgrade to 3.81 or newer.)
    41 endif
    41 endif
    44 ifeq ($(filter /%,$(lastword $(MAKEFILE_LIST))),)
    44 ifeq ($(filter /%,$(lastword $(MAKEFILE_LIST))),)
    45   makefile_path:=$(CURDIR)/$(lastword $(MAKEFILE_LIST))
    45   makefile_path:=$(CURDIR)/$(lastword $(MAKEFILE_LIST))
    46 else
    46 else
    47   makefile_path:=$(lastword $(MAKEFILE_LIST))
    47   makefile_path:=$(lastword $(MAKEFILE_LIST))
    48 endif
    48 endif
    49 root_dir:=$(dir $(makefile_path))
    49 root_dir:=$(patsubst %/,%,$(dir $(makefile_path)))
       
    50 
       
    51 ifneq ($(findstring qp,$(MAKEFLAGS)),)
       
    52   # When called with -qp, assume an external part (e.g. bash completion) is trying
       
    53   # to understand our targets.
       
    54   # Duplication of global targets, needed before ParseConfAndSpec in case we have
       
    55   # no configurations.
       
    56   help:
       
    57   # If CONF is not set, look for all available configurations
       
    58   CONF?=
       
    59 endif
    50 
    60 
    51 # ... and then we can include our helper functions
    61 # ... and then we can include our helper functions
    52 include $(root_dir)/make/MakeHelpers.gmk
    62 include $(root_dir)/make/MakeHelpers.gmk
    53 
    63 
    54 $(eval $(call ParseLogLevel))
    64 $(eval $(call ParseLogLevel))
    87 
    97 
    88   ifneq ($(MAIN_TARGETS), )
    98   ifneq ($(MAIN_TARGETS), )
    89     # The wrapper target was called so we now have a single configuration. Load the spec file
    99     # The wrapper target was called so we now have a single configuration. Load the spec file
    90     # and call the real Main.gmk.
   100     # and call the real Main.gmk.
    91     include $(SPEC)
   101     include $(SPEC)
       
   102     include $(SRC_ROOT)/make/common/MakeBase.gmk
    92 
   103 
    93     ### Clean up from previous run
   104     ### Clean up from previous run
    94     # Remove any build.log from a previous run, if they exist
   105     # Remove any build.log from a previous run, if they exist
    95     ifneq (,$(BUILD_LOG))
   106     ifneq (,$(BUILD_LOG))
    96       ifneq (,$(BUILD_LOG_PREVIOUS))
   107       ifneq (,$(BUILD_LOG_PREVIOUS))