Nigel wrote:
>       The problem Daniel revealed is a bit harder to fix
> (rebuilding version.cpp during "sudo make install").
> Am trying to use qmake/makefile trickery to only
> regenerate the file if svnversion has changed,
> but it is getting ugly.

How about changing the script? I don't know if "test -s" works on
OSX/BSD, but I've attached something that should work if it does..

-- Daniel
Index: version.pro
===================================================================
--- version.pro	(revision 8706)
+++ version.pro	(working copy)
@@ -15,8 +15,7 @@
 SOURCES += version.cpp
 
 version.target = version.cpp 
-version.commands = echo 'const char *myth_source_version =' \
-'"'`(svnversion $${SVNTREEDIR} 2>/dev/null) || echo Unknown`'";' > version.cpp
+version.commands = /bin/sh -c "echo 'const char *myth_source_version =' '\"'`(svnversion $${SVNTREEDIR} 2>/dev/null) || echo Unknown`'\";' > tmpversion.cpp" ; /bin/sh -c "diff tmpversion.cpp version.cpp > tmptest.diff 2>&1" ; /bin/sh -c "if test -s tmptest.diff ; then mv -f tmpversion.cpp version.cpp ; fi ;" ; rm -f tmpversion.cpp tmptest.diff
 version.depends = FORCE 
 
 QMAKE_EXTRA_UNIX_TARGETS += version
_______________________________________________
mythtv-dev mailing list
[email protected]
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev

Reply via email to