Hi Benjamin, * Benjamin Bihler wrote on Thu, Nov 04, 2010 at 09:33:06AM CET: > your first suggestion (with the phony target) works great. The second one > does not force compilation here (but that doesn't matter anymore since I > use the phony target now).
Hmm, do you have a file named FORCE in source or build tree? > As to the third suggestion: I use the __DATE__ and __TIME__ macros in my > code as a kind of version information. Therefore the compilation result > differs with every compilation, although my source file does not change. Is > there yet a better method to store the compilation time stamp in a library > without fiddling with make targets? People do this, but I don't think storing the date and the time is the most useful thing to do. How about a different suggestion: store information generated from your version control repository? With Git, 'git describe --dirty' output is often used, and IMVHO a lot more useful than date information (because code often has several parallel branches anyway, and the time at which it is compiled only vaguely corresponds to which code is compiled). For git, instructions and makefile rules have been discussed previously on this list (more than once I think). Hope that, and the other comments posted, help. Cheers, Ralf