Skip to content
Snippets Groups Projects
  • Peter Xu's avatar
    af7d106e
    Makefile: Fix cscope issues on MacOS and soft links · af7d106e
    Peter Xu authored
    
    This patch fixes actually two issues with 'make cscope'.
    
    Firstly, it fixes the command for MacOS "find" command as MacOS will append the
    full path of "$(SRC_PATH)/" before each found entry, then after the final "./"
    replacement trick it'll look like (e.g., "qapi/qmp-dispatch.c"):
    
      /qapi/qmp-dispatch.c
    
    Which will point to the root directory instead.
    
    Fix it by simply remove the "/" in "$(SRC_PATH)/" of "find-src-path", then
    it'll work for at least both Linux and MacOS.
    
    The other OS-independent issue is to start proactively ignoring soft links when
    generating tags, otherwise by default on master branch we'll see this error
    when "make cscope":
    
    cscope: cannot find file subprojects/libvhost-user/include/atomic.h
    
    This patch should fix the two issues altogether.
    
    Signed-off-by: default avatarPeter Xu <peterx@redhat.com>
    Message-Id: <20210804132328.41353-3-peterx@redhat.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    af7d106e
    History
    Makefile: Fix cscope issues on MacOS and soft links
    Peter Xu authored
    
    This patch fixes actually two issues with 'make cscope'.
    
    Firstly, it fixes the command for MacOS "find" command as MacOS will append the
    full path of "$(SRC_PATH)/" before each found entry, then after the final "./"
    replacement trick it'll look like (e.g., "qapi/qmp-dispatch.c"):
    
      /qapi/qmp-dispatch.c
    
    Which will point to the root directory instead.
    
    Fix it by simply remove the "/" in "$(SRC_PATH)/" of "find-src-path", then
    it'll work for at least both Linux and MacOS.
    
    The other OS-independent issue is to start proactively ignoring soft links when
    generating tags, otherwise by default on master branch we'll see this error
    when "make cscope":
    
    cscope: cannot find file subprojects/libvhost-user/include/atomic.h
    
    This patch should fix the two issues altogether.
    
    Signed-off-by: default avatarPeter Xu <peterx@redhat.com>
    Message-Id: <20210804132328.41353-3-peterx@redhat.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>