diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-12-19 11:48:15 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-12-19 11:48:15 +0300 |
commit | de1bb51b0ac72eebb39e64db7d71e97770ef2dbc (patch) | |
tree | e6ae725933317af9f94c310fa0aadf584698566b /source/blender/makesrna/intern/makesrna.c | |
parent | 4476e4c75c777449f03570a97b70c6a8d004e926 (diff) |
another reason to run makesrna needlessly every build is that the makesrna binary is newer then the generated files.
Diffstat (limited to 'source/blender/makesrna/intern/makesrna.c')
-rw-r--r-- | source/blender/makesrna/intern/makesrna.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c index f4479885676..145f04d644b 100644 --- a/source/blender/makesrna/intern/makesrna.c +++ b/source/blender/makesrna/intern/makesrna.c @@ -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 @@ static int replace_if_different(char *tmpfile, const char *dep_files[]) 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 @@ int main(int argc, char **argv) } else { printf("Running makesrna, program versions %s\n", RNA_VERSION_DATE); + makesrna_path= argv[0]; return_status= rna_preprocess(argv[1]); } |