Óscar Fuentes
2009-May-18 20:22 UTC
[LLVMdev] [PATCH] llvm-config: add svn revision to --version
Benjamin Kramer <benny.kra at googlemail.com> writes:> In the current version of my patch the revision is only updated on a > re-configure/CMake. On a second thought that is quite stupid. But I'm > not sure what's the best way to fix this. I guess we need to add a > target which is always run to llvm-config's Makefile ...This is easy: see the logic for regenerating llvm-config when the file that contains the library dependencies changes. Why do you use `svn info' and not `svnversion'? And this brings another question: how do you deal with modified working copies? -- Óscar Fuentes Desarrollo de Software
Benjamin Kramer
2009-May-18 20:51 UTC
[LLVMdev] [PATCH] llvm-config: add svn revision to --version
Óscar Fuentes wrote:> Why do you use `svn info' and not `svnversion'?bad habit. I'm not very familiar with svnversion and its output.> And this brings another question: how do you deal with modified > working > copies?We could add a M or "dirty" to the revision number. But I don't know how this would affect things like "if (revision >= 12345)".> This is easy: see the logic for regenerating llvm-config when the file > that contains the library dependencies changes.hmm, sounds reasonable since it's in the same Makefile. But I probably won't have time to look into this until thursday. Damn exams. If anyone likes to volunteer: just do it ;)
Frits van Bommel
2009-May-18 21:26 UTC
[LLVMdev] [PATCH] llvm-config: add svn revision to --version
Óscar Fuentes wrote:> Why do you use `svn info' and not `svnversion'?He probably copied this from LDC. We used to use `svnversion` for LDC, but I changed it to `svn info` because it was noticeably faster[1]. This may be less of an issue for LLVM where builds take more time anyway, decreasing the relative impact.> And this brings another question: how do you deal with modified working > copies?If you use svnversion it will append an 'M' to the revision number; see `svnversion --help`. [1]: IIRC svnversion took several times longer than the rest of an incremental build if little had changed.
Frits van Bommel
2009-May-18 22:04 UTC
[LLVMdev] [PATCH] llvm-config: add svn revision to --version
Benjamin Kramer wrote:> Óscar Fuentes wrote: >> And this brings another question: how do you deal with modified >> working >> copies? > > We could add a M or "dirty" to the revision number. But I don't know > how this would affect things like "if (revision >= 12345)".It should be easy enough to sed out.
Seemingly Similar Threads
- [LLVMdev] [PATCH] llvm-config: add svn revision to --version
- [LLVMdev] [PATCH] llvm-config: add svn revision to --version
- [LLVMdev] [PATCH] llvm-config: add svn revision to --version
- [LLVMdev] modify cmakefiles to set the default triple of msvc and mingw to i686-pc-mingw
- [LLVMdev] LLVM/Clang SVN: 2 Questions