Skip to content
  • Iustin Pop's avatar
    Change how we create the 'ganeti' symlink · 924ecd85
    Iustin Pop authored
    Currently, if one runs 'make' in an already fully-built tree, this is
    the result:
    
      cd . && test -h "ganeti" || { rm -f ganeti && ln -s lib ganeti; }
      make  all-am
      make[1]: Entering directory `/tmp/test'
      cd . && test -h "ganeti" || { rm -f ganeti && ln -s lib ganeti; }
      make[1]: Leaving directory `/tmp/test'
    
    This is because commit dc7d2c49
    
     added 'ganeti' (which is a PHONY
    target) to BUILT_SOURCES, and since that is a dependency of other,
    real targets, it means the ganeti target is always remade.
    
    To fix this, we keep ganeti as a PHONY target, but we remove it from
    the 'built_base_sources' target, and instead we only remake it
    manually in the stamp-directories target. A make run now is just:
    
      make  all-am
      make[1]: Entering directory `/tmp/test'
      make[1]: Nothing to be done for `all-am'.
      make[1]: Leaving directory `/tmp/test'
    
    Note that we can't get rid of the all-am since we use BUILT_SOURCES.
    
    We also remove the comment of BUILT_SOURCES since it no longer depends
    on PHONY targets.
    
    Signed-off-by: default avatarIustin Pop <iustin@google.com>
    Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
    924ecd85