• Pali Rohár's avatar
    Makefile: Do not mark file targets as .PHONY target · a9812206
    Pali Rohár authored
    
    
    Only non-file targets should be set a .PHONY. Otherwise if file target is
    set as .PHONY then targets which depends on those file .PHONY targets would
    be always rebuilt even when their prerequisites are not changed.
    
    File target which needs to be always rebuilt can be specified in Make
    system via having a prerequisite on some .PHONY target, instead of marking
    whole target as .PHONY. In Makefile projects it is common to create empty
    .PHONY target named FORCE for this purpose.
    
    This patch changes all file targets which are set as .PHONY to depends on
    new .PHONY target FORCE, to ensure that these file targets are always
    rebuilt (as before). Basically they are those targets which calls external
    make subprocess.
    
    After FORCE target is specified in main Makefile, remove it from other
    Makefile files to prevent duplicate definitions.
    Signed-off-by: default avatarPali Rohár <pali@kernel.org>
    Change-Id: Iee3b4e0de93879b95eb29a1745a041538412e69e
    a9812206
board_common.mk 3.01 KB