[LLVMdev] Including svn version number in --version output

Eric Christopher echristo at apple.com
Wed Jul 9 18:17:42 PDT 2008


gcc does this with contrib/gcc_update which updates the file every  
update:

revision=`svn info | awk '/Revision:/ { print $2 }'`
branch=`svn info | sed -ne "/URL:/ {
s,.*/trunk,trunk,
s,.*/branches/,,
s,.*/tags/,,
p
}"`

where you now have revision and branch information.

-eric



More information about the llvm-dev mailing list