From f7e5d2b46b03cc4bc09c38f7e0873378bb9c3b78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sun, 21 Jun 2015 07:55:15 +0200 Subject: Imported Upstream version 2.3.5 --- src/engine/SCons/Action.py | 38 +- src/engine/SCons/Action.xml | 2 +- src/engine/SCons/ActionTests.py | 6 +- src/engine/SCons/Builder.py | 8 +- src/engine/SCons/BuilderTests.py | 4 +- src/engine/SCons/CacheDir.py | 4 +- src/engine/SCons/CacheDirTests.py | 4 +- src/engine/SCons/Debug.py | 4 +- src/engine/SCons/Defaults.py | 9 +- src/engine/SCons/Defaults.xml | 2 +- src/engine/SCons/DefaultsTests.py | 4 +- src/engine/SCons/Environment.py | 13 +- src/engine/SCons/Environment.xml | 15 +- src/engine/SCons/EnvironmentTests.py | 14 +- src/engine/SCons/Errors.py | 4 +- src/engine/SCons/ErrorsTests.py | 4 +- src/engine/SCons/Executor.py | 23 +- src/engine/SCons/ExecutorTests.py | 4 +- src/engine/SCons/Job.py | 4 +- src/engine/SCons/JobTests.py | 4 +- src/engine/SCons/Memoize.py | 4 +- src/engine/SCons/MemoizeTests.py | 4 +- src/engine/SCons/Node/Alias.py | 4 +- src/engine/SCons/Node/AliasTests.py | 4 +- src/engine/SCons/Node/FS.py | 86 +- src/engine/SCons/Node/FSTests.py | 30 +- src/engine/SCons/Node/NodeTests.py | 4 +- src/engine/SCons/Node/Python.py | 4 +- src/engine/SCons/Node/PythonTests.py | 4 +- src/engine/SCons/Node/__init__.py | 4 +- src/engine/SCons/Options/BoolOption.py | 4 +- src/engine/SCons/Options/EnumOption.py | 4 +- src/engine/SCons/Options/ListOption.py | 4 +- src/engine/SCons/Options/PackageOption.py | 4 +- src/engine/SCons/Options/PathOption.py | 4 +- src/engine/SCons/Options/__init__.py | 4 +- src/engine/SCons/PathList.py | 4 +- src/engine/SCons/PathListTests.py | 4 +- src/engine/SCons/Platform/PlatformTests.py | 35 +- src/engine/SCons/Platform/__init__.py | 36 +- src/engine/SCons/Platform/__init__.xml | 2 +- src/engine/SCons/Platform/aix.py | 4 +- src/engine/SCons/Platform/cygwin.py | 4 +- src/engine/SCons/Platform/darwin.py | 4 +- src/engine/SCons/Platform/hpux.py | 4 +- src/engine/SCons/Platform/irix.py | 4 +- src/engine/SCons/Platform/os2.py | 4 +- src/engine/SCons/Platform/posix.py | 4 +- src/engine/SCons/Platform/posix.xml | 2 +- src/engine/SCons/Platform/sunos.py | 4 +- src/engine/SCons/Platform/sunos.xml | 2 +- src/engine/SCons/Platform/win32.py | 4 +- src/engine/SCons/Platform/win32.xml | 2 +- src/engine/SCons/SConf.py | 10 +- src/engine/SCons/SConfTests.py | 4 +- src/engine/SCons/SConsign.py | 4 +- src/engine/SCons/SConsignTests.py | 4 +- src/engine/SCons/Scanner/C.py | 4 +- src/engine/SCons/Scanner/CTests.py | 4 +- src/engine/SCons/Scanner/D.py | 4 +- src/engine/SCons/Scanner/Dir.py | 4 +- src/engine/SCons/Scanner/DirTests.py | 4 +- src/engine/SCons/Scanner/Fortran.py | 4 +- src/engine/SCons/Scanner/FortranTests.py | 4 +- src/engine/SCons/Scanner/IDL.py | 4 +- src/engine/SCons/Scanner/IDLTests.py | 4 +- src/engine/SCons/Scanner/LaTeX.py | 4 +- src/engine/SCons/Scanner/LaTeXTests.py | 4 +- src/engine/SCons/Scanner/Prog.py | 29 +- src/engine/SCons/Scanner/ProgTests.py | 39 +- src/engine/SCons/Scanner/RC.py | 4 +- src/engine/SCons/Scanner/RCTests.py | 4 +- src/engine/SCons/Scanner/ScannerTests.py | 4 +- src/engine/SCons/Scanner/__init__.py | 4 +- src/engine/SCons/Scanner/__init__.xml | 2 +- src/engine/SCons/Script/Interactive.py | 4 +- src/engine/SCons/Script/Main.py | 6 +- src/engine/SCons/Script/Main.xml | 2 +- src/engine/SCons/Script/MainTests.py | 4 +- src/engine/SCons/Script/SConsOptions.py | 20 +- src/engine/SCons/Script/SConscript.py | 4 +- src/engine/SCons/Script/SConscript.xml | 2 +- src/engine/SCons/Script/SConscriptTests.py | 4 +- src/engine/SCons/Script/__init__.py | 4 +- src/engine/SCons/Sig.py | 4 +- src/engine/SCons/Subst.py | 4 +- src/engine/SCons/Subst.xml | 2 +- src/engine/SCons/SubstTests.py | 4 +- src/engine/SCons/Taskmaster.py | 4 +- src/engine/SCons/TaskmasterTests.py | 4 +- src/engine/SCons/Tool/386asm.py | 4 +- src/engine/SCons/Tool/386asm.xml | 2 +- src/engine/SCons/Tool/BitKeeper.py | 4 +- src/engine/SCons/Tool/BitKeeper.xml | 2 +- src/engine/SCons/Tool/CVS.py | 4 +- src/engine/SCons/Tool/CVS.xml | 2 +- src/engine/SCons/Tool/DCommon.py | 4 +- src/engine/SCons/Tool/FortranCommon.py | 20 +- src/engine/SCons/Tool/GettextCommon.py | 4 +- src/engine/SCons/Tool/JavaCommon.py | 4 +- src/engine/SCons/Tool/JavaCommonTests.py | 4 +- src/engine/SCons/Tool/MSCommon/__init__.py | 4 +- src/engine/SCons/Tool/MSCommon/arch.py | 4 +- src/engine/SCons/Tool/MSCommon/common.py | 4 +- src/engine/SCons/Tool/MSCommon/netframework.py | 4 +- src/engine/SCons/Tool/MSCommon/sdk.py | 31 +- src/engine/SCons/Tool/MSCommon/vc.py | 4 +- src/engine/SCons/Tool/MSCommon/vs.py | 4 +- src/engine/SCons/Tool/Perforce.py | 4 +- src/engine/SCons/Tool/Perforce.xml | 2 +- src/engine/SCons/Tool/PharLapCommon.py | 4 +- src/engine/SCons/Tool/PharLapCommonTests.py | 4 +- src/engine/SCons/Tool/RCS.py | 4 +- src/engine/SCons/Tool/RCS.xml | 2 +- src/engine/SCons/Tool/SCCS.py | 4 +- src/engine/SCons/Tool/SCCS.xml | 2 +- src/engine/SCons/Tool/Subversion.py | 4 +- src/engine/SCons/Tool/Subversion.xml | 2 +- src/engine/SCons/Tool/ToolTests.py | 4 +- src/engine/SCons/Tool/__init__.py | 21 +- src/engine/SCons/Tool/__init__.xml | 7 +- src/engine/SCons/Tool/aixc++.py | 4 +- src/engine/SCons/Tool/aixc++.xml | 2 +- src/engine/SCons/Tool/aixcc.py | 4 +- src/engine/SCons/Tool/aixcc.xml | 2 +- src/engine/SCons/Tool/aixf77.py | 4 +- src/engine/SCons/Tool/aixf77.xml | 2 +- src/engine/SCons/Tool/aixlink.py | 4 +- src/engine/SCons/Tool/aixlink.xml | 2 +- src/engine/SCons/Tool/applelink.py | 4 +- src/engine/SCons/Tool/applelink.xml | 2 +- src/engine/SCons/Tool/ar.py | 4 +- src/engine/SCons/Tool/ar.xml | 2 +- src/engine/SCons/Tool/as.py | 4 +- src/engine/SCons/Tool/as.xml | 2 +- src/engine/SCons/Tool/bcc32.py | 4 +- src/engine/SCons/Tool/bcc32.xml | 2 +- src/engine/SCons/Tool/c++.py | 4 +- src/engine/SCons/Tool/c++.xml | 2 +- src/engine/SCons/Tool/cc.py | 4 +- src/engine/SCons/Tool/cc.xml | 2 +- src/engine/SCons/Tool/cvf.py | 4 +- src/engine/SCons/Tool/cvf.xml | 2 +- src/engine/SCons/Tool/default.py | 4 +- src/engine/SCons/Tool/default.xml | 2 +- src/engine/SCons/Tool/dmd.py | 16 +- src/engine/SCons/Tool/dmd.xml | 2 +- src/engine/SCons/Tool/docbook/__init__.xml | 2 +- src/engine/SCons/Tool/dvi.py | 4 +- src/engine/SCons/Tool/dvi.xml | 2 +- src/engine/SCons/Tool/dvipdf.py | 4 +- src/engine/SCons/Tool/dvipdf.xml | 2 +- src/engine/SCons/Tool/dvips.py | 4 +- src/engine/SCons/Tool/dvips.xml | 2 +- src/engine/SCons/Tool/f03.py | 4 +- src/engine/SCons/Tool/f03.xml | 2 +- src/engine/SCons/Tool/f08.py | 63 ++ src/engine/SCons/Tool/f08.xml | 311 ++++++ src/engine/SCons/Tool/f77.py | 4 +- src/engine/SCons/Tool/f77.xml | 2 +- src/engine/SCons/Tool/f90.py | 4 +- src/engine/SCons/Tool/f90.xml | 2 +- src/engine/SCons/Tool/f95.py | 4 +- src/engine/SCons/Tool/f95.xml | 2 +- src/engine/SCons/Tool/filesystem.py | 4 +- src/engine/SCons/Tool/fortran.py | 4 +- src/engine/SCons/Tool/fortran.xml | 2 +- src/engine/SCons/Tool/g++.py | 4 +- src/engine/SCons/Tool/g++.xml | 2 +- src/engine/SCons/Tool/g77.py | 4 +- src/engine/SCons/Tool/g77.xml | 2 +- src/engine/SCons/Tool/gas.py | 4 +- src/engine/SCons/Tool/gas.xml | 2 +- src/engine/SCons/Tool/gcc.py | 4 +- src/engine/SCons/Tool/gcc.xml | 2 +- src/engine/SCons/Tool/gdc.py | 14 +- src/engine/SCons/Tool/gdc.xml | 2 +- src/engine/SCons/Tool/gettext.py | 4 +- src/engine/SCons/Tool/gettext.xml | 2 +- src/engine/SCons/Tool/gfortran.py | 6 +- src/engine/SCons/Tool/gfortran.xml | 2 +- src/engine/SCons/Tool/gnulink.py | 4 +- src/engine/SCons/Tool/gnulink.xml | 2 +- src/engine/SCons/Tool/gs.py | 4 +- src/engine/SCons/Tool/gs.xml | 2 +- src/engine/SCons/Tool/hpc++.py | 4 +- src/engine/SCons/Tool/hpc++.xml | 2 +- src/engine/SCons/Tool/hpcc.py | 4 +- src/engine/SCons/Tool/hpcc.xml | 2 +- src/engine/SCons/Tool/hplink.py | 4 +- src/engine/SCons/Tool/hplink.xml | 2 +- src/engine/SCons/Tool/icc.py | 4 +- src/engine/SCons/Tool/icc.xml | 2 +- src/engine/SCons/Tool/icl.py | 4 +- src/engine/SCons/Tool/icl.xml | 2 +- src/engine/SCons/Tool/ifl.py | 4 +- src/engine/SCons/Tool/ifl.xml | 2 +- src/engine/SCons/Tool/ifort.py | 4 +- src/engine/SCons/Tool/ifort.xml | 2 +- src/engine/SCons/Tool/ilink.py | 4 +- src/engine/SCons/Tool/ilink.xml | 2 +- src/engine/SCons/Tool/ilink32.py | 4 +- src/engine/SCons/Tool/ilink32.xml | 2 +- src/engine/SCons/Tool/install.py | 28 +- src/engine/SCons/Tool/install.xml | 21 +- src/engine/SCons/Tool/intelc.py | 4 +- src/engine/SCons/Tool/intelc.xml | 2 +- src/engine/SCons/Tool/ipkg.py | 4 +- src/engine/SCons/Tool/jar.py | 6 +- src/engine/SCons/Tool/jar.xml | 2 +- src/engine/SCons/Tool/javac.py | 6 +- src/engine/SCons/Tool/javac.xml | 2 +- src/engine/SCons/Tool/javacTests.py | 2 +- src/engine/SCons/Tool/javah.py | 4 +- src/engine/SCons/Tool/javah.xml | 2 +- src/engine/SCons/Tool/latex.py | 4 +- src/engine/SCons/Tool/latex.xml | 2 +- src/engine/SCons/Tool/ldc.py | 23 +- src/engine/SCons/Tool/ldc.xml | 2 +- src/engine/SCons/Tool/lex.py | 4 +- src/engine/SCons/Tool/lex.xml | 2 +- src/engine/SCons/Tool/link.py | 38 +- src/engine/SCons/Tool/link.xml | 2 +- src/engine/SCons/Tool/linkloc.py | 4 +- src/engine/SCons/Tool/linkloc.xml | 2 +- src/engine/SCons/Tool/m4.py | 4 +- src/engine/SCons/Tool/m4.xml | 2 +- src/engine/SCons/Tool/masm.py | 4 +- src/engine/SCons/Tool/masm.xml | 2 +- src/engine/SCons/Tool/midl.py | 4 +- src/engine/SCons/Tool/midl.xml | 2 +- src/engine/SCons/Tool/mingw.py | 4 +- src/engine/SCons/Tool/mingw.xml | 2 +- src/engine/SCons/Tool/msgfmt.py | 4 +- src/engine/SCons/Tool/msgfmt.xml | 2 +- src/engine/SCons/Tool/msginit.py | 4 +- src/engine/SCons/Tool/msginit.xml | 2 +- src/engine/SCons/Tool/msgmerge.py | 4 +- src/engine/SCons/Tool/msgmerge.xml | 2 +- src/engine/SCons/Tool/mslib.py | 6 +- src/engine/SCons/Tool/mslib.xml | 2 +- src/engine/SCons/Tool/mslink.py | 18 +- src/engine/SCons/Tool/mslink.xml | 2 +- src/engine/SCons/Tool/mssdk.py | 4 +- src/engine/SCons/Tool/mssdk.xml | 2 +- src/engine/SCons/Tool/msvc.py | 12 +- src/engine/SCons/Tool/msvc.xml | 2 +- src/engine/SCons/Tool/msvs.py | 244 ++++- src/engine/SCons/Tool/msvs.xml | 1115 +++++++++----------- src/engine/SCons/Tool/msvsTests.py | 83 +- src/engine/SCons/Tool/mwcc.py | 4 +- src/engine/SCons/Tool/mwcc.xml | 2 +- src/engine/SCons/Tool/mwld.py | 4 +- src/engine/SCons/Tool/mwld.xml | 2 +- src/engine/SCons/Tool/nasm.py | 4 +- src/engine/SCons/Tool/nasm.xml | 2 +- src/engine/SCons/Tool/packaging.xml | 2 +- src/engine/SCons/Tool/packaging/__init__.py | 4 +- src/engine/SCons/Tool/packaging/__init__.xml | 2 +- src/engine/SCons/Tool/packaging/ipk.py | 4 +- src/engine/SCons/Tool/packaging/msi.py | 4 +- src/engine/SCons/Tool/packaging/rpm.py | 4 +- src/engine/SCons/Tool/packaging/src_tarbz2.py | 4 +- src/engine/SCons/Tool/packaging/src_targz.py | 4 +- src/engine/SCons/Tool/packaging/src_zip.py | 4 +- src/engine/SCons/Tool/packaging/tarbz2.py | 4 +- src/engine/SCons/Tool/packaging/targz.py | 4 +- src/engine/SCons/Tool/packaging/zip.py | 4 +- src/engine/SCons/Tool/pdf.py | 4 +- src/engine/SCons/Tool/pdf.xml | 2 +- src/engine/SCons/Tool/pdflatex.py | 4 +- src/engine/SCons/Tool/pdflatex.xml | 2 +- src/engine/SCons/Tool/pdftex.py | 4 +- src/engine/SCons/Tool/pdftex.xml | 2 +- src/engine/SCons/Tool/qt.py | 4 +- src/engine/SCons/Tool/qt.xml | 2 +- src/engine/SCons/Tool/rmic.py | 4 +- src/engine/SCons/Tool/rmic.xml | 2 +- src/engine/SCons/Tool/rpcgen.py | 4 +- src/engine/SCons/Tool/rpcgen.xml | 2 +- src/engine/SCons/Tool/rpm.py | 4 +- src/engine/SCons/Tool/rpmutils.py | 4 +- src/engine/SCons/Tool/sgiar.py | 4 +- src/engine/SCons/Tool/sgiar.xml | 2 +- src/engine/SCons/Tool/sgic++.py | 4 +- src/engine/SCons/Tool/sgic++.xml | 2 +- src/engine/SCons/Tool/sgicc.py | 4 +- src/engine/SCons/Tool/sgicc.xml | 2 +- src/engine/SCons/Tool/sgilink.py | 4 +- src/engine/SCons/Tool/sgilink.xml | 2 +- src/engine/SCons/Tool/sunar.py | 4 +- src/engine/SCons/Tool/sunar.xml | 2 +- src/engine/SCons/Tool/sunc++.py | 4 +- src/engine/SCons/Tool/sunc++.xml | 2 +- src/engine/SCons/Tool/suncc.py | 4 +- src/engine/SCons/Tool/suncc.xml | 2 +- src/engine/SCons/Tool/sunf77.py | 4 +- src/engine/SCons/Tool/sunf77.xml | 2 +- src/engine/SCons/Tool/sunf90.py | 4 +- src/engine/SCons/Tool/sunf90.xml | 2 +- src/engine/SCons/Tool/sunf95.py | 4 +- src/engine/SCons/Tool/sunf95.xml | 2 +- src/engine/SCons/Tool/sunlink.py | 4 +- src/engine/SCons/Tool/sunlink.xml | 2 +- src/engine/SCons/Tool/swig.py | 4 +- src/engine/SCons/Tool/swig.xml | 2 +- src/engine/SCons/Tool/tar.py | 4 +- src/engine/SCons/Tool/tar.xml | 2 +- src/engine/SCons/Tool/tex.py | 4 +- src/engine/SCons/Tool/tex.xml | 2 +- src/engine/SCons/Tool/textfile.py | 4 +- src/engine/SCons/Tool/textfile.xml | 2 +- src/engine/SCons/Tool/tlib.py | 4 +- src/engine/SCons/Tool/tlib.xml | 2 +- src/engine/SCons/Tool/wix.py | 4 +- src/engine/SCons/Tool/wixTests.py | 4 +- src/engine/SCons/Tool/xgettext.py | 4 +- src/engine/SCons/Tool/xgettext.xml | 2 +- src/engine/SCons/Tool/yacc.py | 4 +- src/engine/SCons/Tool/yacc.xml | 2 +- src/engine/SCons/Tool/zip.py | 4 +- src/engine/SCons/Tool/zip.xml | 2 +- src/engine/SCons/Util.py | 4 +- src/engine/SCons/UtilTests.py | 4 +- src/engine/SCons/Variables/BoolVariable.py | 4 +- src/engine/SCons/Variables/BoolVariableTests.py | 4 +- src/engine/SCons/Variables/EnumVariable.py | 4 +- src/engine/SCons/Variables/EnumVariableTests.py | 4 +- src/engine/SCons/Variables/ListVariable.py | 4 +- src/engine/SCons/Variables/ListVariableTests.py | 4 +- src/engine/SCons/Variables/PackageVariable.py | 4 +- src/engine/SCons/Variables/PackageVariableTests.py | 4 +- src/engine/SCons/Variables/PathVariable.py | 4 +- src/engine/SCons/Variables/PathVariableTests.py | 4 +- src/engine/SCons/Variables/VariablesTests.py | 4 +- src/engine/SCons/Variables/__init__.py | 4 +- src/engine/SCons/Warnings.py | 4 +- src/engine/SCons/WarningsTests.py | 4 +- src/engine/SCons/__init__.py | 12 +- src/engine/SCons/compat/__init__.py | 4 +- src/engine/SCons/compat/_scons_builtins.py | 4 +- src/engine/SCons/compat/_scons_collections.py | 4 +- src/engine/SCons/compat/_scons_dbm.py | 4 +- src/engine/SCons/compat/_scons_hashlib.py | 4 +- src/engine/SCons/compat/_scons_io.py | 4 +- src/engine/SCons/cpp.py | 4 +- src/engine/SCons/cppTests.py | 4 +- src/engine/SCons/exitfuncs.py | 4 +- 348 files changed, 2165 insertions(+), 1373 deletions(-) create mode 100644 src/engine/SCons/Tool/f08.py create mode 100644 src/engine/SCons/Tool/f08.xml (limited to 'src/engine') diff --git a/src/engine/SCons/Action.py b/src/engine/SCons/Action.py index aec164f..ca3eddf 100644 --- a/src/engine/SCons/Action.py +++ b/src/engine/SCons/Action.py @@ -76,7 +76,7 @@ way for wrapping up the functions. """ -# Copyright (c) 2001 - 2014 The SCons Foundation +# Copyright (c) 2001 - 2015 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -97,9 +97,7 @@ way for wrapping up the functions. # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -__revision__ = "src/engine/SCons/Action.py 2014/09/27 12:51:43 garyo" - -import SCons.compat +__revision__ = "src/engine/SCons/Action.py pchdll:3325:cd517fae59a4 2015/06/18 06:53:27 bdbaddog" import dis import os @@ -112,7 +110,6 @@ import subprocess import SCons.Debug from SCons.Debug import logInstanceCreation import SCons.Errors -import SCons.Executor import SCons.Util import SCons.Subst @@ -357,21 +354,6 @@ def _do_create_action(act, kw): if isinstance(act, ActionBase): return act - if is_List(act): - return CommandAction(act, **kw) - - if callable(act): - try: - gen = kw['generator'] - del kw['generator'] - except KeyError: - gen = 0 - if gen: - action_type = CommandGeneratorAction - else: - action_type = FunctionAction - return action_type(act, kw) - if is_String(act): var=SCons.Util.get_environment_var(act) if var: @@ -388,6 +370,22 @@ def _do_create_action(act, kw): # The list of string commands may include a LazyAction, so we # reprocess them via _do_create_list_action. return _do_create_list_action(commands, kw) + + if is_List(act): + return CommandAction(act, **kw) + + if callable(act): + try: + gen = kw['generator'] + del kw['generator'] + except KeyError: + gen = 0 + if gen: + action_type = CommandGeneratorAction + else: + action_type = FunctionAction + return action_type(act, kw) + # Catch a common error case with a nice message: if isinstance(act, int) or isinstance(act, float): raise TypeError("Don't know how to create an Action from a number (%s)"%act) diff --git a/src/engine/SCons/Action.xml b/src/engine/SCons/Action.xml index a0a6421..30eb6e7 100644 --- a/src/engine/SCons/Action.xml +++ b/src/engine/SCons/Action.xml @@ -1,6 +1,6 @@ + + +%scons; + +%builders-mod; + +%functions-mod; + +%tools-mod; + +%variables-mod; +]> + + + + + + +Set construction variables for generic POSIX Fortran 08 compilers. + + + +F08 +F08FLAGS +F08COM +F08PPCOM +SHF08 +SHF08FLAGS +SHF08COM +SHF08PPCOM +_F08INCFLAGS + + +F08COMSTR +F08PPCOMSTR +SHF08COMSTR +SHF08PPCOMSTR + + + + + + +The Fortran 08 compiler. +You should normally set the &cv-link-FORTRAN; variable, +which specifies the default Fortran compiler +for all Fortran versions. +You only need to set &cv-link-F08; if you need to use a specific compiler +or compiler version for Fortran 08 files. + + + + + + + +The command line used to compile a Fortran 08 source file to an object file. +You only need to set &cv-link-F08COM; if you need to use a specific +command line for Fortran 08 files. +You should normally set the &cv-link-FORTRANCOM; variable, +which specifies the default command line +for all Fortran versions. + + + + + + + +The string displayed when a Fortran 08 source file +is compiled to an object file. +If this is not set, then &cv-link-F08COM; or &cv-link-FORTRANCOM; +(the command line) is displayed. + + + + + + + +The list of file extensions for which the F08 dialect will be used. By +default, this is ['.f08'] + + + + + + + +The list of file extensions for which the compilation + preprocessor pass for +F08 dialect will be used. By default, this is empty + + + + + + + +General user-specified options that are passed to the Fortran 08 compiler. +Note that this variable does +not +contain + +(or similar) include search path options +that scons generates automatically from &cv-link-F08PATH;. +See +&cv-link-_F08INCFLAGS; +below, +for the variable that expands to those options. +You only need to set &cv-link-F08FLAGS; if you need to define specific +user options for Fortran 08 files. +You should normally set the &cv-link-FORTRANFLAGS; variable, +which specifies the user-specified options +passed to the default Fortran compiler +for all Fortran versions. + + + + + + + +An automatically-generated construction variable +containing the Fortran 08 compiler command-line options +for specifying directories to be searched for include files. +The value of &cv-link-_F08INCFLAGS; is created +by appending &cv-link-INCPREFIX; and &cv-link-INCSUFFIX; +to the beginning and end +of each directory in &cv-link-F08PATH;. + + + + + + + +The list of directories that the Fortran 08 compiler will search for include +directories. The implicit dependency scanner will search these +directories for include files. Don't explicitly put include directory +arguments in &cv-link-F08FLAGS; because the result will be non-portable +and the directories will not be searched by the dependency scanner. Note: +directory names in &cv-link-F08PATH; will be looked-up relative to the SConscript +directory when they are used in a command. To force +&scons; +to look-up a directory relative to the root of the source tree use #: +You only need to set &cv-link-F08PATH; if you need to define a specific +include path for Fortran 08 files. +You should normally set the &cv-link-FORTRANPATH; variable, +which specifies the include path +for the default Fortran compiler +for all Fortran versions. + + + +env = Environment(F08PATH='#/include') + + + +The directory look-up can also be forced using the +&Dir;() +function: + + + +include = Dir('include') +env = Environment(F08PATH=include) + + + +The directory list will be added to command lines +through the automatically-generated +&cv-link-_F08INCFLAGS; +construction variable, +which is constructed by +appending the values of the +&cv-link-INCPREFIX; and &cv-link-INCSUFFIX; +construction variables +to the beginning and end +of each directory in &cv-link-F08PATH;. +Any command lines you define that need +the F08PATH directory list should +include &cv-link-_F08INCFLAGS;: + + + +env = Environment(F08COM="my_compiler $_F08INCFLAGS -c -o $TARGET $SOURCE") + + + + + + + +The command line used to compile a Fortran 08 source file to an object file +after first running the file through the C preprocessor. +Any options specified in the &cv-link-F08FLAGS; and &cv-link-CPPFLAGS; construction variables +are included on this command line. +You only need to set &cv-link-F08PPCOM; if you need to use a specific +C-preprocessor command line for Fortran 08 files. +You should normally set the &cv-link-FORTRANPPCOM; variable, +which specifies the default C-preprocessor command line +for all Fortran versions. + + + + + + + +The string displayed when a Fortran 08 source file +is compiled to an object file +after first running the file through the C preprocessor. +If this is not set, then &cv-link-F08PPCOM; or &cv-link-FORTRANPPCOM; +(the command line) is displayed. + + + + + + + +The Fortran 08 compiler used for generating shared-library objects. +You should normally set the &cv-link-SHFORTRAN; variable, +which specifies the default Fortran compiler +for all Fortran versions. +You only need to set &cv-link-SHF08; if you need to use a specific compiler +or compiler version for Fortran 08 files. + + + + + + + +The command line used to compile a Fortran 08 source file +to a shared-library object file. +You only need to set &cv-link-SHF08COM; if you need to use a specific +command line for Fortran 08 files. +You should normally set the &cv-link-SHFORTRANCOM; variable, +which specifies the default command line +for all Fortran versions. + + + + + + + +The string displayed when a Fortran 08 source file +is compiled to a shared-library object file. +If this is not set, then &cv-link-SHF08COM; or &cv-link-SHFORTRANCOM; +(the command line) is displayed. + + + + + + + +Options that are passed to the Fortran 08 compiler +to generated shared-library objects. +You only need to set &cv-link-SHF08FLAGS; if you need to define specific +user options for Fortran 08 files. +You should normally set the &cv-link-SHFORTRANFLAGS; variable, +which specifies the user-specified options +passed to the default Fortran compiler +for all Fortran versions. + + + + + + + +The command line used to compile a Fortran 08 source file to a +shared-library object file +after first running the file through the C preprocessor. +Any options specified in the &cv-link-SHF08FLAGS; and &cv-link-CPPFLAGS; construction variables +are included on this command line. +You only need to set &cv-link-SHF08PPCOM; if you need to use a specific +C-preprocessor command line for Fortran 08 files. +You should normally set the &cv-link-SHFORTRANPPCOM; variable, +which specifies the default C-preprocessor command line +for all Fortran versions. + + + + + + + +The string displayed when a Fortran 08 source file +is compiled to a shared-library object file +after first running the file through the C preprocessor. +If this is not set, then &cv-link-SHF08PPCOM; or &cv-link-SHFORTRANPPCOM; +(the command line) is displayed. + + + + + diff --git a/src/engine/SCons/Tool/f77.py b/src/engine/SCons/Tool/f77.py index bcedb87..91c1f62 100644 --- a/src/engine/SCons/Tool/f77.py +++ b/src/engine/SCons/Tool/f77.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001 - 2014 The SCons Foundation +# Copyright (c) 2001 - 2015 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/f77.py 2014/09/27 12:51:43 garyo" +__revision__ = "src/engine/SCons/Tool/f77.py pchdll:3325:cd517fae59a4 2015/06/18 06:53:27 bdbaddog" import SCons.Defaults import SCons.Scanner.Fortran diff --git a/src/engine/SCons/Tool/f77.xml b/src/engine/SCons/Tool/f77.xml index f1ac1dc..cd632d6 100644 --- a/src/engine/SCons/Tool/f77.xml +++ b/src/engine/SCons/Tool/f77.xml @@ -1,6 +1,6 @@ - + %scons; - + %builders-mod; - + %functions-mod; - + %tools-mod; - + %variables-mod; ]> - - - - - - -Sets construction variables for Microsoft Visual Studio. - - - -MSVSPROJECTCOM -MSVSSOLUTIONCOM -MSVSSCONSCRIPT -MSVSSCONS -MSVSSCONSFLAGS -MSVSSCONSCOM -MSVSBUILDCOM -MSVSREBUILDCOM -MSVSCLEANCOM -MSVSENCODING - - - - - - - - -Builds a Microsoft Visual Studio project file, -and by default builds a solution file as well. - - - -This builds a Visual Studio project file, based on the version of -Visual Studio that is configured (either the latest installed version, -or the version specified by -&cv-link-MSVS_VERSION; -in the Environment constructor). -For Visual Studio 6, it will generate a -.dsp -file. -For Visual Studio 7 (.NET) and later versions, it will generate a -.vcproj -file. - - - -By default, -this also generates a solution file -for the specified project, -a -.dsw -file for Visual Studio 6 -or a -.sln -file for Visual Studio 7 (.NET). -This behavior may be disabled by specifying -auto_build_solution=0 -when you call -&b-MSVSProject;, -in which case you presumably want to -build the solution file(s) -by calling the -&b-MSVSSolution; -Builder (see below). - - - -The &b-MSVSProject; builder -takes several lists of filenames -to be placed into the project file. -These are currently limited to -srcs, -incs, -localincs, -resources, -and -misc. -These are pretty self-explanatory, but it should be noted that these -lists are added to the &cv-link-SOURCES; construction variable as strings, -NOT as SCons File Nodes. This is because they represent file -names to be added to the project file, not the source files used to -build the project file. - - - -The above filename lists are all optional, -although at least one must be specified -for the resulting project file to be non-empty. - - - -In addition to the above lists of values, -the following values may be specified: - - - -target: -The name of the target -.dsp -or -.vcproj -file. -The correct -suffix for the version of Visual Studio must be used, -but the -&cv-link-MSVSPROJECTSUFFIX; -construction variable -will be defined to the correct value (see example below). - - - -variant: -The name of this particular variant. -For Visual Studio 7 projects, -this can also be a list of variant names. -These are typically things like "Debug" or "Release", but really -can be anything you want. -For Visual Studio 7 projects, -they may also specify a target platform -separated from the variant name by a -| -(vertical pipe) -character: -Debug|Xbox. -The default target platform is Win32. -Multiple calls to -&b-MSVSProject; -with different variants are allowed; -all variants will be added to the project file with their appropriate -build targets and sources. - - - -buildtarget: -An optional string, node, or list of strings or nodes -(one per build variant), to tell the Visual Studio debugger -what output target to use in what build variant. -The number of -buildtarget -entries must match the number of -variant -entries. - - - -runfile: -The name of the file that Visual Studio 7 and later -will run and debug. -This appears as the value of the -Output -field in the resutling Visual Studio project file. -If this is not specified, -the default is the same as the specified -buildtarget -value. - - - -Note that because &SCons; always executes its build commands -from the directory in which the &SConstruct; file is located, -if you generate a project file in a different directory -than the &SConstruct; directory, -users will not be able to double-click -on the file name in compilation error messages -displayed in the Visual Studio console output window. -This can be remedied by adding the -Visual C/C++ -/FC -compiler option to the &cv-link-CCFLAGS; variable -so that the compiler will print -the full path name of any -files that cause compilation errors. - - - -Example usage: - - - -barsrcs = ['bar.cpp'], + +Sets construction variables for Microsoft Visual Studio. + MSVSPROJECTCOM MSVSSOLUTIONCOM +MSVSSCONSCRIPT MSVSSCONS MSVSSCONSFLAGS +MSVSSCONSCOM MSVSBUILDCOM +MSVSREBUILDCOM MSVSCLEANCOM +MSVSENCODING Builds a Microsoft Visual Studio project +file, and by default builds a solution file as well. This +builds a Visual Studio project file, based on the version of Visual Studio +that is configured (either the latest installed version, or the version +specified by &cv-link-MSVS_VERSION; in the Environment constructor). For +Visual Studio 6, it will generate a .dsp file. For Visual +Studio 7 (.NET) and later versions, it will generate a +.vcproj file. By default, this also +generates a solution file for the specified project, a +.dsw file for Visual Studio 6 or a +.sln file for Visual Studio 7 (.NET). This behavior may +be disabled by specifying auto_build_solution=0 when you +call &b-MSVSProject;, in which case you presumably want to build the solution +file(s) by calling the &b-MSVSSolution; Builder (see below). +The &b-MSVSProject; builder takes several lists of filenames to be placed into +the project file. These are currently limited to srcs, +incs, localincs, +resources, and misc. These are pretty +self-explanatory, but it should be noted that these lists are added to the +&cv-link-SOURCES; construction variable as strings, NOT as SCons File Nodes. +This is because they represent file names to be added to the project file, not +the source files used to build the project file. The above +filename lists are all optional, although at least one must be specified for +the resulting project file to be non-empty. In addition to the +above lists of values, the following values may be specified: + + + target + + + The name of the target .dsp or + .vcproj file. The correct suffix for the version + of Visual Studio must be used, but the &cv-link-MSVSPROJECTSUFFIX; + construction variable will be defined to the correct value (see + example below). + + + + + variant + + + The name of this particular variant. For Visual Studio 7 + projects, this can also be a list of variant names. These are + typically things like "Debug" or "Release", but really can be anything + you want. For Visual Studio 7 projects, they may also specify a target + platform separated from the variant name by a | + (vertical pipe) character: Debug|Xbox. The default + target platform is Win32. Multiple calls to &b-MSVSProject; with + different variants are allowed; all variants will be added to the + project file with their appropriate build targets and + sources. + + + + + cmdargs + + + Additional command line arguments for the different + variants. The number of cmdargs entries must match + the number of variant entries, or be empty (not + specified). If you give only one, it will automatically be propagated + to all variants. + + + + + buildtarget + + + An optional string, node, or list of strings or nodes (one + per build variant), to tell the Visual Studio debugger what output + target to use in what build variant. The number of + buildtarget entries must match the number of + variant entries. + + + + + runfile + + + The name of the file that Visual Studio 7 and later will + run and debug. This appears as the value of the + Output field in the resulting Visual Studio project + file. If this is not specified, the default is the same as the + specified buildtarget value. + + + Note that because &SCons; always executes its build +commands from the directory in which the &SConstruct; file is located, if you +generate a project file in a different directory than the &SConstruct; +directory, users will not be able to double-click on the file name in +compilation error messages displayed in the Visual Studio console output +window. This can be remedied by adding the Visual C/C++ /FC +compiler option to the &cv-link-CCFLAGS; variable so that the compiler will +print the full path name of any files that cause compilation errors. + Example usage: barsrcs = ['bar.cpp'], barincs = ['bar.h'], barlocalincs = ['StdAfx.h'] barresources = ['bar.rc','resource.h'] @@ -218,440 +145,374 @@ env.MSVSProject(target = 'Bar' + env['MSVSPROJECTSUFFIX'], buildtarget = dll, variant = 'Release') - - - - - - -Builds a Microsoft Visual Studio solution file. - - - -This builds a Visual Studio solution file, -based on the version of Visual Studio that is configured -(either the latest installed version, -or the version specified by -&cv-link-MSVS_VERSION; -in the construction environment). -For Visual Studio 6, it will generate a -.dsw -file. -For Visual Studio 7 (.NET), it will -generate a -.sln -file. - - - -The following values must be specified: - - - -target: -The name of the target .dsw or .sln file. The correct -suffix for the version of Visual Studio must be used, but the value -&cv-link-MSVSSOLUTIONSUFFIX; -will be defined to the correct value (see example below). - - - -variant: -The name of this particular variant, or a list of variant -names (the latter is only supported for MSVS 7 solutions). These are -typically things like "Debug" or "Release", but really can be anything -you want. For MSVS 7 they may also specify target platform, like this -"Debug|Xbox". Default platform is Win32. - - - -projects: -A list of project file names, or Project nodes returned by calls to the -&b-MSVSProject; -Builder, -to be placed into the solution file. -It should be noted that these file names are NOT added to the $SOURCES -environment variable in form of files, but rather as strings. This -is because they represent file names to be added to the solution file, -not the source files used to build the solution file. - - - -Example Usage: - - - -env.MSVSSolution(target = 'Bar' + env['MSVSSOLUTIONSUFFIX'], - projects = ['bar' + env['MSVSPROJECTSUFFIX']], - variant = 'Release') - - - - - - - -When the Microsoft Visual Studio tools are initialized, they set up -this dictionary with the following keys: - - - -VERSION: -the version of MSVS being used (can be set via -&cv-link-MSVS_VERSION;) - - - -VERSIONS: -the available versions of MSVS installed - - - -VCINSTALLDIR: -installed directory of Visual C++ - - - -VSINSTALLDIR: -installed directory of Visual Studio - - - -FRAMEWORKDIR: -installed directory of the .NET framework - - - -FRAMEWORKVERSIONS: -list of installed versions of the .NET framework, sorted latest to oldest. - - - -FRAMEWORKVERSION: -latest installed version of the .NET framework - - - -FRAMEWORKSDKDIR: -installed location of the .NET SDK. - - - -PLATFORMSDKDIR: -installed location of the Platform SDK. - - - -PLATFORMSDK_MODULES: -dictionary of installed Platform SDK modules, -where the dictionary keys are keywords for the various modules, and -the values are 2-tuples where the first is the release date, and the -second is the version number. - - - -If a value isn't set, it wasn't available in the registry. - - - - - - - -Sets the architecture for which the generated project(s) should build. - - - -The default value is x86. -amd64 is also supported -by &SCons; for some Visual Studio versions. -Trying to set &cv-MSVS_ARCH; to an architecture that's not -supported for a given Visual Studio version -will generate an error. - - - - - - - -The string -placed in a generated Microsoft Visual Studio project file -as the value of the -ProjectGUID -attribute. -There is no default value. If not defined, a new GUID is generated. - - - - - - - -The path name -placed in a generated Microsoft Visual Studio project file -as the value of the -SccAuxPath -attribute -if the -MSVS_SCC_PROVIDER -construction variable is also set. -There is no default value. - - - - - - - -The root path of projects in your SCC workspace, i.e the path under which -all project and solution files will be generated. It is used as a -reference path from which the relative paths of the generated -Microsoft Visual Studio project and solution files are computed. -The relative project file path is placed as the value of the -SccLocalPath -attribute -of the project file -and as the values of the -SccProjectFilePathRelativizedFromConnection[i] -(where [i] ranges from 0 to the number of projects in the solution) -attributes of the -GlobalSection(SourceCodeControl) -section of the Microsoft Visual Studio solution file. -Similarly the relative solution file path is placed as the values of the -SccLocalPath[i] -(where [i] ranges from 0 to the number of projects in the solution) -attributes of the -GlobalSection(SourceCodeControl) -section of the Microsoft Visual Studio solution file. -This is used only -if the -MSVS_SCC_PROVIDER -construction variable is also set. -The default value is the current working directory. - - - - - - - -The project name -placed in a generated Microsoft Visual Studio project file -as the value of the -SccProjectName -attribute -if the -MSVS_SCC_PROVIDER -construction variable is also set. -In this case the string is also placed in the -SccProjectName0 -attribute of the -GlobalSection(SourceCodeControl) -section of the Microsoft Visual Studio solution file. -There is no default value. - - - - - - - -The string -placed in a generated Microsoft Visual Studio project file -as the value of the -SccProvider -attribute. -The string is also placed in the -SccProvider0 -attribute of the -GlobalSection(SourceCodeControl) -section of the Microsoft Visual Studio solution file. -There is no default value. - - - - - - - -Sets the preferred version of Microsoft Visual Studio to use. - - - -If &cv-MSVS_VERSION; is not set, -&SCons; will (by default) select the latest version -of Visual Studio installed on your system. -So, if you have version 6 and version 7 (MSVS .NET) installed, -it will prefer version 7. -You can override this by -specifying the -MSVS_VERSION -variable in the Environment initialization, setting it to the -appropriate version ('6.0' or '7.0', for example). -If the specified version isn't installed, -tool initialization will fail. - - - -This is obsolete: use &cv-MSVC_VERSION; instead. If &cv-MSVS_VERSION; is set and -&cv-MSVC_VERSION; is not, &cv-MSVC_VERSION; will be set automatically to &cv-MSVS_VERSION;. -If both are set to different values, scons will raise an error. - - - - - - - -The build command line placed in -a generated Microsoft Visual Studio project file. -The default is to have Visual Studio invoke SCons with any specified -build targets. - - - - - - - -The clean command line placed in -a generated Microsoft Visual Studio project file. -The default is to have Visual Studio invoke SCons with the -c option -to remove any specified targets. - - - - - - - -The encoding string placed in -a generated Microsoft Visual Studio project file. -The default is encoding -Windows-1252. - - - - - - - -The action used to generate Microsoft Visual Studio project files. - - - - - - - -The suffix used for Microsoft Visual Studio project (DSP) files. -The default value is -.vcproj -when using Visual Studio version 7.x (.NET) -or later version, -and -.dsp -when using earlier versions of Visual Studio. - - - - - - - -The rebuild command line placed in -a generated Microsoft Visual Studio project file. -The default is to have Visual Studio invoke SCons with any specified -rebuild targets. - - - - - - - -The SCons used in generated Microsoft Visual Studio project files. -The default is the version of SCons being -used to generate the project file. - - - - - - - -The SCons flags used in generated Microsoft Visual Studio -project files. - - - - - - - -The default SCons command used in generated Microsoft Visual Studio -project files. - - - - - - - -The sconscript file -(that is, -&SConstruct; -or -&SConscript; -file) -that will be invoked by Visual Studio -project files -(through the -&cv-link-MSVSSCONSCOM; -variable). -The default is the same sconscript file -that contains the call to -&b-MSVSProject; -to build the project file. - - - - - - - -The action used to generate Microsoft Visual Studio solution files. - - - - - - - -The suffix used for Microsoft Visual Studio solution (DSW) files. -The default value is -.sln -when using Visual Studio version 7.x (.NET), -and -.dsw -when using earlier versions of Visual Studio. - - - - - - - -The (optional) path to the SCons library directory, -initialized from the external environment. -If set, this is used to construct a shorter and more -efficient search path in the -&cv-link-MSVSSCONS; -command line executed -from Microsoft Visual Studio project files. - - - - - +Starting with version 2.4 of +SCons it's also possible to specify the optional argument +DebugSettings, which creates files for debugging under +Visual Studio: + + DebugSettings + + + A dictionary of debug settings that get written to the + .vcproj.user or the + .vcxproj.user file, depending on the version + installed. As it is done for cmdargs (see above), you can specify a + DebugSettings dictionary per variant. If you + give only one, it will be propagated to all variants. + + + Currently, only Visual Studio v9.0 and Visual Studio +version v11 are implemented, for other versions no file is generated. To +generate the user file, you just need to add a +DebugSettings dictionary to the environment with the +right parameters for your MSVS version. If the dictionary is empty, or does +not contain any good value, no file will be generated.Following +is a more contrived example, involving the setup of a project for variants and +DebugSettings:# Assuming you store your defaults in a file +vars = Variables('variables.py') +msvcver = vars.args.get('vc', '9') + +# Check command args to force one Microsoft Visual Studio version +if msvcver == '9' or msvcver == '11': + env = Environment(MSVC_VERSION=msvcver+'.0', MSVC_BATCH=False) +else: + env = Environment() + +AddOption('--userfile', action='store_true', dest='userfile', default=False, + help="Create Visual Studio Project user file") + +# +# 1. Configure your Debug Setting dictionary with options you want in the list +# of allowed options, for instance if you want to create a user file to launch +# a specific application for testing your dll with Microsoft Visual Studio 2008 (v9): +# +V9DebugSettings = { + 'Command':'c:\\myapp\\using\\thisdll.exe', + 'WorkingDirectory': 'c:\\myapp\\using\\', + 'CommandArguments': '-p password', +# 'Attach':'false', +# 'DebuggerType':'3', +# 'Remote':'1', +# 'RemoteMachine': None, +# 'RemoteCommand': None, +# 'HttpUrl': None, +# 'PDBPath': None, +# 'SQLDebugging': None, +# 'Environment': '', +# 'EnvironmentMerge':'true', +# 'DebuggerFlavor': None, +# 'MPIRunCommand': None, +# 'MPIRunArguments': None, +# 'MPIRunWorkingDirectory': None, +# 'ApplicationCommand': None, +# 'ApplicationArguments': None, +# 'ShimCommand': None, +# 'MPIAcceptMode': None, +# 'MPIAcceptFilter': None, +} + +# +# 2. Because there are a lot of different options depending on the Microsoft +# Visual Studio version, if you use more than one version you have to +# define a dictionary per version, for instance if you want to create a user +# file to launch a specific application for testing your dll with Microsoft +# Visual Studio 2012 (v11): +# +V10DebugSettings = { + 'LocalDebuggerCommand': 'c:\\myapp\\using\\thisdll.exe', + 'LocalDebuggerWorkingDirectory': 'c:\\myapp\\using\\', + 'LocalDebuggerCommandArguments': '-p password', +# 'LocalDebuggerEnvironment': None, +# 'DebuggerFlavor': 'WindowsLocalDebugger', +# 'LocalDebuggerAttach': None, +# 'LocalDebuggerDebuggerType': None, +# 'LocalDebuggerMergeEnvironment': None, +# 'LocalDebuggerSQLDebugging': None, +# 'RemoteDebuggerCommand': None, +# 'RemoteDebuggerCommandArguments': None, +# 'RemoteDebuggerWorkingDirectory': None, +# 'RemoteDebuggerServerName': None, +# 'RemoteDebuggerConnection': None, +# 'RemoteDebuggerDebuggerType': None, +# 'RemoteDebuggerAttach': None, +# 'RemoteDebuggerSQLDebugging': None, +# 'DeploymentDirectory': None, +# 'AdditionalFiles': None, +# 'RemoteDebuggerDeployDebugCppRuntime': None, +# 'WebBrowserDebuggerHttpUrl': None, +# 'WebBrowserDebuggerDebuggerType': None, +# 'WebServiceDebuggerHttpUrl': None, +# 'WebServiceDebuggerDebuggerType': None, +# 'WebServiceDebuggerSQLDebugging': None, +} + +# +# 3. Select the dictionary you want depending on the version of visual Studio +# Files you want to generate. +# +if not env.GetOption('userfile'): + dbgSettings = None +elif env.get('MSVC_VERSION', None) == '9.0': + dbgSettings = V9DebugSettings +elif env.get('MSVC_VERSION', None) == '11.0': + dbgSettings = V10DebugSettings +else: + dbgSettings = None + +# +# 4. Add the dictionary to the DebugSettings keyword. +# +barsrcs = ['bar.cpp', 'dllmain.cpp', 'stdafx.cpp'] +barincs = ['targetver.h'] +barlocalincs = ['StdAfx.h'] +barresources = ['bar.rc','resource.h'] +barmisc = ['ReadMe.txt'] + +dll = env.SharedLibrary(target = 'bar.dll', + source = barsrcs) + +env.MSVSProject(target = 'Bar' + env['MSVSPROJECTSUFFIX'], + srcs = barsrcs, + incs = barincs, + localincs = barlocalincs, + resources = barresources, + misc = barmisc, + buildtarget = [dll[0]] * 2, + variant = ('Debug|Win32', 'Release|Win32'), + cmdargs = 'vc=%s' % msvcver, + DebugSettings = (dbgSettings, {})) + Builds a Microsoft Visual Studio solution +file. This builds a Visual Studio solution file, based on the +version of Visual Studio that is configured (either the latest installed +version, or the version specified by &cv-link-MSVS_VERSION; in the +construction environment). For Visual Studio 6, it will generate a +.dsw file. For Visual Studio 7 (.NET), it will generate a +.sln file. The following values must be +specified: + + target + + + The name of the target .dsw or .sln file. The correct + suffix for the version of Visual Studio must be used, but the value + &cv-link-MSVSSOLUTIONSUFFIX; will be defined to the correct value (see + example below). + + + + + variant + + + The name of this particular variant, or a list of variant + names (the latter is only supported for MSVS 7 solutions). These are + typically things like "Debug" or "Release", but really can be anything + you want. For MSVS 7 they may also specify target platform, like this + "Debug|Xbox". Default platform is Win32. + + + + + projects + + + A list of project file names, or Project nodes returned by + calls to the &b-MSVSProject; Builder, to be placed into the solution + file. It should be noted that these file names are NOT added to the + $SOURCES environment variable in form of files, but rather as strings. + This is because they represent file names to be added to the solution + file, not the source files used to build the solution + file. + + + Example Usage: +env.MSVSSolution(target = 'Bar' + env['MSVSSOLUTIONSUFFIX'], projects = ['bar' ++ env['MSVSPROJECTSUFFIX']], variant = 'Release') + +When the Microsoft Visual Studio tools are initialized, they set up this +dictionary with the following keys: + + VERSION + + + the version of MSVS being used (can be set via + &cv-link-MSVS_VERSION;) + + + + + VERSIONS + + + the available versions of MSVS installed + + + + + VCINSTALLDIR + + + installed directory of Visual C++ + + + + + VSINSTALLDIR + + + installed directory of Visual Studio + + + + + FRAMEWORKDIR + + + installed directory of the .NET framework + + + + + FRAMEWORKVERSIONS + + + list of installed versions of the .NET framework, sorted + latest to oldest. + + + + + FRAMEWORKVERSION + + + latest installed version of the .NET + framework + + + + + FRAMEWORKSDKDIR + + + installed location of the .NET SDK. + + + + + PLATFORMSDKDIR + + + installed location of the Platform SDK. + + + + + PLATFORMSDK_MODULES + + + dictionary of installed Platform SDK modules, where the + dictionary keys are keywords for the various modules, and the values + are 2-tuples where the first is the release date, and the second is + the version number. + + + If a value isn't set, it wasn't available in the +registry. Sets +the architecture for which the generated project(s) should build. +The default value is x86. amd64 is +also supported by &SCons; for some Visual Studio versions. Trying to set +&cv-MSVS_ARCH; to an architecture that's not supported for a given Visual +Studio version will generate an error. The string placed in a generated +Microsoft Visual Studio project file as the value of the +ProjectGUID attribute. There is no default value. If not +defined, a new GUID is generated. The path name placed in a generated +Microsoft Visual Studio project file as the value of the +SccAuxPath attribute if the +MSVS_SCC_PROVIDER construction variable is also set. There is +no default value. The root path of projects in +your SCC workspace, i.e the path under which all project and solution files +will be generated. It is used as a reference path from which the relative +paths of the generated Microsoft Visual Studio project and solution files are +computed. The relative project file path is placed as the value of the +SccLocalPath attribute of the project file and as the +values of the +SccProjectFilePathRelativizedFromConnection[i] (where [i] +ranges from 0 to the number of projects in the solution) attributes of the +GlobalSection(SourceCodeControl) section of the Microsoft +Visual Studio solution file. Similarly the relative solution file path is +placed as the values of the SccLocalPath[i] (where [i] +ranges from 0 to the number of projects in the solution) attributes of the +GlobalSection(SourceCodeControl) section of the Microsoft +Visual Studio solution file. This is used only if the +MSVS_SCC_PROVIDER construction variable is also set. The +default value is the current working directory. + The project name placed in +a generated Microsoft Visual Studio project file as the value of the +SccProjectName attribute if the +MSVS_SCC_PROVIDER construction variable is also set. In this +case the string is also placed in the SccProjectName0 +attribute of the GlobalSection(SourceCodeControl) section +of the Microsoft Visual Studio solution file. There is no default value. + The +string placed in a generated Microsoft Visual Studio project file as the value +of the SccProvider attribute. The string is also placed in +the SccProvider0 attribute of the +GlobalSection(SourceCodeControl) section of the Microsoft +Visual Studio solution file. There is no default value. + Sets the preferred version +of Microsoft Visual Studio to use. If &cv-MSVS_VERSION; is not +set, &SCons; will (by default) select the latest version of Visual Studio +installed on your system. So, if you have version 6 and version 7 (MSVS .NET) +installed, it will prefer version 7. You can override this by specifying the +MSVS_VERSION variable in the Environment initialization, +setting it to the appropriate version ('6.0' or '7.0', for example). If the +specified version isn't installed, tool initialization will fail. +This is obsolete: use &cv-MSVC_VERSION; instead. If &cv-MSVS_VERSION; is +set and &cv-MSVC_VERSION; is not, &cv-MSVC_VERSION; will be set automatically +to &cv-MSVS_VERSION;. If both are set to different values, scons will raise an +error. +The build command line placed in a generated Microsoft Visual Studio +project file. The default is to have Visual Studio invoke SCons with any +specified build targets. + The clean command line placed in a generated Microsoft Visual +Studio project file. The default is to have Visual Studio invoke SCons with +the -c option to remove any specified targets. + The encoding string placed in a +generated Microsoft Visual Studio project file. The default is encoding +Windows-1252. The action used to generate Microsoft +Visual Studio project files. The suffix used for Microsoft Visual +Studio project (DSP) files. The default value is .vcproj +when using Visual Studio version 7.x (.NET) or later version, and +.dsp when using earlier versions of Visual Studio. + The +rebuild command line placed in a generated Microsoft Visual Studio project +file. The default is to have Visual Studio invoke SCons with any specified +rebuild targets. +The SCons used in generated Microsoft Visual Studio project files. The +default is the version of SCons being used to generate the project file. + The +SCons flags used in generated Microsoft Visual Studio project files. + The default +SCons command used in generated Microsoft Visual Studio project files. + The sconscript +file (that is, &SConstruct; or &SConscript; file) that will be invoked by +Visual Studio project files (through the &cv-link-MSVSSCONSCOM; variable). The +default is the same sconscript file that contains the call to &b-MSVSProject; +to build the project file. The action used to generate Microsoft +Visual Studio solution files. The suffix used for Microsoft +Visual Studio solution (DSW) files. The default value is +.sln when using Visual Studio version 7.x (.NET), and +.dsw when using earlier versions of Visual Studio. + The +(optional) path to the SCons library directory, initialized from the external +environment. If set, this is used to construct a shorter and more efficient +search path in the &cv-link-MSVSSCONS; command line executed from Microsoft +Visual Studio project files. diff --git a/src/engine/SCons/Tool/msvsTests.py b/src/engine/SCons/Tool/msvsTests.py index 600085f..3454c6c 100644 --- a/src/engine/SCons/Tool/msvsTests.py +++ b/src/engine/SCons/Tool/msvsTests.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001 - 2014 The SCons Foundation +# Copyright (c) 2001 - 2015 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/msvsTests.py 2014/09/27 12:51:43 garyo" +__revision__ = "src/engine/SCons/Tool/msvsTests.py pchdll:3325:cd517fae59a4 2015/06/18 06:53:27 bdbaddog" import os import sys @@ -40,6 +40,7 @@ from SCons.Tool.MSCommon.common import debug from SCons.Tool.MSCommon import get_default_version, \ query_versions +from SCons.Tool.msvs import _GenerateV6DSP, _GenerateV7DSP, _GenerateV10DSP regdata_6a = r'''[HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio] [HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\6.0] @@ -591,6 +592,84 @@ class msvsTestCase(unittest.TestCase): assert not v1 or str(v1[0]) == self.highest_version, \ (v1, self.highest_version) assert len(v1) == self.number_of_versions, v1 + + def test_config_generation(self): + """Test _DSPGenerator.__init__(...)""" + if not self.highest_version : + return + + # Initialize 'static' variables + version_num, suite = msvs_parse_version(self.highest_version) + if version_num >= 10.0: + function_test = _GenerateV10DSP + elif version_num >= 7.0: + function_test = _GenerateV7DSP + else: + function_test = _GenerateV6DSP + + str_function_test = str(function_test.__init__) + dspfile = 'test.dsp' + source = 'test.cpp' + + # Create the cmdargs test list + list_variant = ['Debug|Win32','Release|Win32', + 'Debug|x64', 'Release|x64'] + list_cmdargs = ['debug=True target_arch=32', + 'debug=False target_arch=32', + 'debug=True target_arch=x64', + 'debug=False target_arch=x64'] + + # Tuple list : (parameter, dictionary of expected result per variant) + tests_cmdargs = [(None, dict.fromkeys(list_variant, '')), + ('', dict.fromkeys(list_variant, '')), + (list_cmdargs[0], dict.fromkeys(list_variant, list_cmdargs[0])), + (list_cmdargs, dict(zip(list_variant, list_cmdargs)))] + + # Run the test for each test case + for param_cmdargs, expected_cmdargs in tests_cmdargs: + debug('Testing %s. with :\n variant = %s \n cmdargs = "%s"' % \ + (str_function_test, list_variant, param_cmdargs)) + param_configs = [] + expected_configs = {} + for platform in ['Win32', 'x64']: + for variant in ['Debug', 'Release']: + variant_platform = '%s|%s' % (variant, platform) + runfile = '%s\\%s\\test.exe' % (platform, variant) + buildtarget = '%s\\%s\\test.exe' % (platform, variant) + outdir = '%s\\%s' % (platform, variant) + + # Create parameter list for this variant_platform + param_configs.append([variant_platform, runfile, buildtarget, outdir]) + + # Create expected dictionary result for this variant_platform + expected_configs[variant_platform] = \ + {'variant': variant, 'platform': platform, + 'runfile': runfile, + 'buildtarget': buildtarget, + 'outdir': outdir, + 'cmdargs': expected_cmdargs[variant_platform]} + + # Create parameter environment with final parameter dictionary + param_dict = dict(zip(('variant', 'runfile', 'buildtarget', 'outdir'), + [list(l) for l in zip(*param_configs)])) + param_dict['cmdargs'] = param_cmdargs + + # Hack to be able to run the test with a 'DummyEnv' + class _DummyEnv(DummyEnv): + def subst(self, string) : + return string + + env = _DummyEnv(param_dict) + env['MSVSSCONSCRIPT'] = '' + env['MSVS_VERSION'] = self.highest_version + + # Call function to test + genDSP = function_test(dspfile, source, env) + + # Check expected result + self.assertListEqual(genDSP.configs.keys(), expected_configs.keys()) + for key in genDSP.configs.keys(): + self.assertDictEqual(genDSP.configs[key].__dict__, expected_configs[key]) class msvs6aTestCase(msvsTestCase): """Test MSVS 6 Registry""" diff --git a/src/engine/SCons/Tool/mwcc.py b/src/engine/SCons/Tool/mwcc.py index ae0d030..8e69a2a 100644 --- a/src/engine/SCons/Tool/mwcc.py +++ b/src/engine/SCons/Tool/mwcc.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001 - 2014 The SCons Foundation +# Copyright (c) 2001 - 2015 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -30,7 +30,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/mwcc.py 2014/09/27 12:51:43 garyo" +__revision__ = "src/engine/SCons/Tool/mwcc.py pchdll:3325:cd517fae59a4 2015/06/18 06:53:27 bdbaddog" import os import os.path diff --git a/src/engine/SCons/Tool/mwcc.xml b/src/engine/SCons/Tool/mwcc.xml index 8f90ec3..a9432dd 100644 --- a/src/engine/SCons/Tool/mwcc.xml +++ b/src/engine/SCons/Tool/mwcc.xml @@ -1,6 +1,6 @@