• Masahiro Yamada's avatar
    kbuild: ensure Make >= 3.82 is used · 87d599fc
    Masahiro Yamada authored
    Documentation/process/changes.rst notes the minimal GNU Make version,
    but it is not checked anywhere.
    
    We could check $(MAKE_VERSION), but another simple way is to check
    $(.FEATURES) since the feature list always grows.
    
    GNU Make 3.81 expands $(.FEATURES) to:
      target-specific order-only second-expansion else-if archives jobserver check-symlink
    
    GNU Make 3.82 expands $(.FEATURES) to:
      target-specific order-only second-expansion else-if shortest-stem undefine archives jobserver check-symlink
    
    To ensure Make >= 3.82, you can check either 'shortest-stem' or
    'undefine'.
    
    This way is not always possible. For example, Make 4.0 through 4.2 have
    the same set of $(.FEATURES). At that point, we will need to come up
    with a different approach.
    Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
    Reviewed-by: default avatarNathan Chancellor <nathan@kernel.org>
    Reviewed-by: default avatarNicolas Schier <nicolas@fjasle.eu>
    87d599fc
Makefile 69.3 KB