[LLVMdev] make update (svn info) does not follow links

Garrison Venn gvenn.cfe.dev at gmail.com
Thu Dec 16 09:07:04 PST 2010


Does anyone have a more elegant version of:

SUB-SVN-DIRS = $(AWK) '/\?\ \ \ \ \ \ / {print $$2}' \
                | xargs ls -ld \
                | $(AWK) '{if($$11) print $$9"/../"$$11; else print $$9}' \
                | LC_ALL=C xargs svn info 2>/dev/null \
                | $(AWK) '/Path:\ / {print $$2}'

as a replacement for:

SUB-SVN-DIRS = $(AWK) '/\?\ \ \ \ \ \ / {print $$2}'   \                       
               | LC_ALL=C xargs $(SVN) info 2>/dev/null \                      
               | $(AWK) '/Path:\ / {print $$2}' 

which is used in the make update target in our top level Makefile (source root).

In particular the portability, efficiency, and possible general correctness of:

                | xargs ls -ld \
                | $(AWK) '{if($$11) print $$9"/../"$$11; else print $$9}' \

concerns me.

This replacement allows make update to follow symlinks which svn info
does not seem to.

As I use a symlink to clang to turn on and off building clang when building llvm,
such behavior provides "an ease of use" when I come back into the project from a long
hiatus.

However, there maybe those who don't want a symlink to be updated by design.
In this case we can create a new target update-with-symlinks (or whatever).

Thanks in advance

Garrison

PS: CMake would have to be updated accordingly



More information about the llvm-dev mailing list