[Bf-blender-cvs] [ef3eb7a] master: Code cleanup: don't use unnecessary .exe extension in scons, simplify code.
Lawrence D'Oliveiro
noreply at git.blender.org
Tue Apr 29 14:03:17 CEST 2014
Commit: ef3eb7adc6f283145e28781a05b3b5e73a6cf083
Author: Lawrence D'Oliveiro
Date: Mon Apr 28 15:07:45 2014 +0200
https://developer.blender.org/rBef3eb7adc6f283145e28781a05b3b5e73a6cf083
Code cleanup: don't use unnecessary .exe extension in scons, simplify code.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D236
===================================================================
M intern/locale/SConscript
M source/blender/makesdna/intern/SConscript
M source/blender/makesrna/intern/SConscript
===================================================================
diff --git a/intern/locale/SConscript b/intern/locale/SConscript
index 4136ac8..24828c1 100644
--- a/intern/locale/SConscript
+++ b/intern/locale/SConscript
@@ -66,10 +66,6 @@ if env['WITH_BF_INTERNATIONAL']:
locale = env.Clone()
- msgfmt_executable = targetpath
- if env['OURPLATFORM'] in ('win32-vc', 'win64-vc', 'win32-mingw', 'win64-mingw'):
- msgfmt_executable += ".exe"
-
# dependencies
dependencies = [msgfmt_target]
@@ -82,7 +78,7 @@ if env['WITH_BF_INTERNATIONAL']:
po_file = os.path.join(po_dir, f)
mo_file = os.path.join(build_dir, os.path.splitext(f)[0] + ".mo")
- command = "\"%s\" \"%s\" \"%s\"" % (msgfmt_executable, po_file, mo_file)
+ command = "\"%s\" \"%s\" \"%s\"" % (targetpath, po_file, mo_file)
locale.Command(mo_file, po_file, command)
locale.Depends(mo_file, dependencies)
diff --git a/source/blender/makesdna/intern/SConscript b/source/blender/makesdna/intern/SConscript
index 35b4ff2..50c26eb 100644
--- a/source/blender/makesdna/intern/SConscript
+++ b/source/blender/makesdna/intern/SConscript
@@ -85,15 +85,9 @@ dna.Depends ('dna.c', makesdna)
dna.Depends ('dna.c', header_files)
if env['OURPLATFORM'] != 'linuxcross':
- if env['OURPLATFORM'] in ('win32-vc', 'win64-vc', 'win32-mingw', 'win64-mingw'):
- dna.Command ('dna.c', '', "\"" + root_build_dir+os.sep+"makesdna\" $TARGET")
- else:
- dna.Command ('dna.c', '', "\"" + root_build_dir+os.sep+"makesdna\" $TARGET")
+ dna.Command ('dna.c', '', "\"" + root_build_dir+os.sep+"makesdna\" $TARGET")
else:
- if USE_WINE:
- dna.Command ('dna.c', '', 'wine ' + root_build_dir+os.sep+"makesdna $TARGET")
- else:
- dna.Command ('dna.c', '', root_build_dir+os.sep+"makesdna.exe $TARGET")
+ dna.Command ('dna.c', '', ('', 'wine ')[USE_WINE] + root_build_dir+os.sep+"makesdna $TARGET")
# TODO, get WITH_DNA_GHASH working, see CMake's 'WITH_DNA_GHASH'
obj = ['intern/dna.c', 'intern/dna_genfile.c']
diff --git a/source/blender/makesrna/intern/SConscript b/source/blender/makesrna/intern/SConscript
index 29d84a8..f33dda2 100644
--- a/source/blender/makesrna/intern/SConscript
+++ b/source/blender/makesrna/intern/SConscript
@@ -206,15 +206,9 @@ rna.Depends (generated_files, makesrna)
build_dir = Dir(".").abspath + os.sep
if env['OURPLATFORM'] != 'linuxcross':
- if env['OURPLATFORM'] in ('win32-vc', 'win64-vc', 'win32-mingw', 'win64-mingw'):
- rna.Command (generated_files, '', "\"" + root_build_dir+os.sep+"makesrna.exe\" \"" + build_dir )
- else:
- rna.Command (generated_files, '', "\"" + root_build_dir+os.sep+"makesrna\" \"" + build_dir + '"' )
+ rna.Command (generated_files, '', "\"" + root_build_dir+os.sep+"makesrna\" \"" + build_dir + '"' )
else:
- if USE_WINE:
- rna.Command (generated_files, '', 'wine ' + root_build_dir+os.sep+"makesrna.exe " + build_dir)
- else:
- rna.Command (generated_files, '', root_build_dir+os.sep+"makesrna.exe " + build_dir)
+ rna.Command (generated_files, '', ('', 'wine ')[USE_WINE] + root_build_dir+os.sep+"makesrna.exe " + build_dir)
obj = ['intern/rna_access.c']
More information about the Bf-blender-cvs
mailing list