Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-01-17 17:04:40 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-01-17 17:04:40 +0300
commite53043189316ddca2e6f084de4f7ed19c7fff7c6 (patch)
tree54eb0840115920cda70fae38327cfba9409a5cdf /source/blender/makesdna/intern/makesdna.c
parente02ad764eeef214bd550d4266dc2d582bd7060ec (diff)
have makesrna only replace newly generated files when their contents changes.
previously changing one rna_*.c file would rebuild them all making it slow to test small changes on the rna api. also made errors in rna and dna generated give C defined #error's and line numbers that cause them.
Diffstat (limited to 'source/blender/makesdna/intern/makesdna.c')
-rw-r--r--source/blender/makesdna/intern/makesdna.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c
index cae28f163ed..905dae7b0a5 100644
--- a/source/blender/makesdna/intern/makesdna.c
+++ b/source/blender/makesdna/intern/makesdna.c
@@ -1050,10 +1050,10 @@ int make_structDNA(char *baseDirectory, FILE *file)
/* ************************* END MAKE DNA ********************** */
-static void make_bad_file(char *file)
+static void make_bad_file(char *file, int line)
{
FILE *fp= fopen(file, "w");
- fprintf(fp, "ERROR! Cannot make correct DNA.c file, STUPID!\n");
+ fprintf(fp, "#error \"Error! can't make correct DNA.c file from %s:%d, STUPID!\"\n", __FILE__, line);
fclose(fp);
}
@@ -1087,7 +1087,7 @@ int main(int argc, char ** argv)
if (make_structDNA(baseDirectory, file)) {
// error
fclose(file);
- make_bad_file(argv[1]);
+ make_bad_file(argv[1], __LINE__);
return_status = 1;
} else {
fprintf(file, "};\n");