In driver/Makefile, the rule which remakes ivtv-svnversion.h fires every
time, which causes 8 other files to trigger.

Following by hand, I don't understand the first "if" clause and why it
isn't matched, however...

I created the attached patch to limit the unneccesary rebuilds. It
creates a temporary ivtv-svnversion.h and only changes the original if
they differ.


Cheers,
Phil
Index: driver/Makefile
===================================================================
--- driver/Makefile     (revision 2790)
+++ driver/Makefile     (working copy)
@@ -11,17 +11,19 @@
 endif
 
 clean::
-       rm -f ivtv-svnversion.h
+       rm -f ivtv-svnversion.h ivtv-svnversion.h.tmp
 
 ivtv-svnversion.h:
        @echo created $@
        @if [ -f ivtv-svnrelease.h ]; then \
-               echo '#include "ivtv-svnrelease.h"' >$@; \
+               echo '#include "ivtv-svnrelease.h"' >[EMAIL PROTECTED]; \
        elif [ -d .svn ]; then \
-               echo -n '#define IVTV_DRIVER_VERSION_COMMENT "(development svn 
snapshot revision ' >$@; \
-               svnversion -n . >>$@; \
-               echo ')"' >>$@; \
-       else date +'#define IVTV_DRIVER_VERSION_COMMENT "(development snapshot 
compiled on %c)"' >$@; fi
+               echo '#define IVTV_DRIVER_VERSION_COMMENT' \
+                 '"(development svn snapshot revision ' \
+                 "`svnversion -n .`" \
+                 ')"' > [EMAIL PROTECTED]; \
+       else date +'#define IVTV_DRIVER_VERSION_COMMENT "(development snapshot 
compiled on %c)"' >[EMAIL PROTECTED]; fi && \
+       cmp -s $@ [EMAIL PROTECTED] || mv [EMAIL PROTECTED] $@
                 
 
 .PHONY: ivtv-svnversion.h
_______________________________________________
ivtv-devel mailing list
[email protected]
http://ivtvdriver.org/mailman/listinfo/ivtv-devel

Reply via email to