'make tags' doesn't properly handle symlinks

Issue #1124 closed
anonymous created an issue

When generating ctags for the cactus tree, 'make tags' currently ignores all symlinks. This results in a large number of thorns in my cactus tree not getting tagged because GetComponents put them in CACTUS_ROOT/repos and linked to them.

I'm not sure if this is intended but I have a feeling it isn't...

This fixes the problem, but I've only tested it on my checkout:

matt@krang:~/maya/Cactus$ diff Makefile.backup Makefile 
312c312
<   find src arrangements \( \
---
>   find -L src arrangements \( \
317c317
< # find src arrangements \( -name '*.[cChF]' -o -name '*.F77' -o -name '*.cc'\) \
---
> # find -L src arrangements \( -name '*.[cChF]' -o -name '*.F77' -o -name '*.cc'\) \
327c327
<   find src arrangements \( \
---
>   find -L src arrangements \( \

Keyword:

Comments (9)

  1. Erik Schnetter
    • changed status to open
    • removed comment

    Thanks. The option -L to find seems to be part of the Posix standard, so it should work on most systems. I suggest to apply the patch.

  2. Frank Löffler
    • changed status to open
    • removed comment

    This fails on QueenBee:

    [knarf@qb4 Cactus]$ find -L src arrangements find: invalid predicate `-L'

  3. Frank Löffler
    • removed comment

    Same on ranger. I suggest to revert to -follow instead of -L. -follow seems to be older. The downside is that -follow is marked being deprecated in newer versions of 'find' and might break there some time in the future. However, until we find a system where this indeed breaks I suggest to use it.

  4. Erik Schnetter
    • removed comment

    Mac OS X (which is close to BSD) offers both -L and -follow.

    We can also try both, such as e.g.

    if find -L TAGS >/dev/null 2>&1; then
       find -L src arrangements ...
    else
       find src arrangements -follow ...
    fi | xargs ...
    
  5. Log in to comment