[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [33780] trunk/blender/source/blender/ makesrna/intern/makesrna.c: another reason to run makesrna needlessly every build is that the makesrna binary is newer then the generated files .

Campbell Barton ideasman42 at gmail.com
Sun Dec 19 09:48:16 CET 2010


Revision: 33780
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=33780
Author:   campbellbarton
Date:     2010-12-19 09:48:15 +0100 (Sun, 19 Dec 2010)

Log Message:
-----------
another reason to run makesrna needlessly every build is that the makesrna binary is newer then the generated files.

Modified Paths:
--------------
    trunk/blender/source/blender/makesrna/intern/makesrna.c

Modified: trunk/blender/source/blender/makesrna/intern/makesrna.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/makesrna.c	2010-12-19 07:43:01 UTC (rev 33779)
+++ trunk/blender/source/blender/makesrna/intern/makesrna.c	2010-12-19 08:48:15 UTC (rev 33780)
@@ -53,12 +53,14 @@
 static int file_older(const char *file1, const char *file2)
 {
 	struct stat st1, st2;
+	// printf("compare: %s %s\n", file1, file2);
 
 	if(stat(file1, &st1)) return 0;
 	if(stat(file2, &st2)) return 0;
 
 	return (st1.st_mtime < st2.st_mtime);
 }
+const char *makesrna_path= NULL;
 
 static int replace_if_different(char *tmpfile, const char *dep_files[])
 {
@@ -102,6 +104,10 @@
 			REN_IF_DIFF;
 		}
 
+		if(file_older(orgfile, makesrna_path)) {
+			REN_IF_DIFF;
+		}
+
 		/* now check if any files we depend on are newer then any generated files */
 		if(dep_files) {
 			int pass;
@@ -2783,6 +2789,7 @@
 	}
 	else {
 		printf("Running makesrna, program versions %s\n",  RNA_VERSION_DATE);
+		makesrna_path= argv[0];
 		return_status= rna_preprocess(argv[1]);
 	}
 





More information about the Bf-blender-cvs mailing list