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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2009-01-08 16:57:29 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-01-08 16:57:29 +0300
commitbebe874a5b80a1e698b3a9dc6aec0870540aed4b (patch)
treedc96606555029df8215960c15271c6f38d389586 /source/blender/makesrna/intern/SConscript
parentb08f15aa08cb4b3522b5265118f533cc438c67d9 (diff)
RNA
* The generated code is now split into multiple files instead of a single big one. Scons, make and cmake are updated to deal with this.
Diffstat (limited to 'source/blender/makesrna/intern/SConscript')
-rw-r--r--source/blender/makesrna/intern/SConscript22
1 files changed, 18 insertions, 4 deletions
diff --git a/source/blender/makesrna/intern/SConscript b/source/blender/makesrna/intern/SConscript
index af0d67a0b9e..661f9b91a34 100644
--- a/source/blender/makesrna/intern/SConscript
+++ b/source/blender/makesrna/intern/SConscript
@@ -14,6 +14,12 @@ source_files = env.Glob('*.c')
source_files.remove('rna_access.c')
source_files.remove('rna_dependency.c')
+generated_files = source_files[:]
+generated_files.remove('rna_define.c')
+generated_files.remove('makesrna.c')
+
+generated_files = [filename[:-2] + '_gen.c' for filename in generated_files]
+
makesrna_tool = env.Clone()
rna = env.Clone()
makesrna_tool.Append(CCFLAGS = '-DBASE_HEADER="\\"source/blender/makesrna/\\"" ')
@@ -59,11 +65,19 @@ else:
makesrna = makesrna_tool.Program (target = targetpath, source = source_files, LIBS=['bf_guardedalloc', 'bf_dna'])
rna_dict = rna.Dictionary()
-rna.Depends ('rna.c', makesrna)
+rna.Depends (generated_files, makesrna)
+
+# this seems bad, how to retrieve it from scons?
+build_dir = root_build_dir + '/source/blender/makesrna/intern/'
+
if env['OURPLATFORM'] != 'linuxcross':
- rna.Command ('rna.c', '', root_build_dir+os.sep+"makesrna $TARGET")
+ rna.Command (generated_files, '', root_build_dir+os.sep+"makesrna " + build_dir)
else:
- rna.Command ('rna.c', '', root_build_dir+os.sep+"makesrna.exe $TARGET")
-obj = ['intern/rna.c', 'intern/rna_access.c', 'intern/rna_dependency.c']
+ rna.Command (generated_files, '', root_build_dir+os.sep+"makesrna.exe " + build_dir)
+
+obj = ['intern/rna_access.c', 'intern/rna_dependency.c']
+for generated_file in generated_files:
+ obj += ['intern/' + generated_file]
+
Return ('obj')