Update the version of gyp in the repository
authormrobinson@webkit.org <mrobinson@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 29 Mar 2013 19:27:52 +0000 (19:27 +0000)
committermrobinson@webkit.org <mrobinson@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 29 Mar 2013 19:27:52 +0000 (19:27 +0000)
https://bugs.webkit.org/show_bug.cgi?id=113540

Reviewed by Nico Weber.

* gyp: Update gyp to r1605.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@147239 268f45cc-cd09-0410-ab3c-d52691b4dbfc

795 files changed:
Source/ThirdParty/ChangeLog
Source/ThirdParty/gyp/AUTHORS
Source/ThirdParty/gyp/DEPS
Source/ThirdParty/gyp/OWNERS [new file with mode: 0644]
Source/ThirdParty/gyp/PRESUBMIT.py
Source/ThirdParty/gyp/README.WebKit
Source/ThirdParty/gyp/buildbot/buildbot_run.py [new file with mode: 0644]
Source/ThirdParty/gyp/data/win/large-pdb-shim.cc [new file with mode: 0644]
Source/ThirdParty/gyp/gyptest.py
Source/ThirdParty/gyp/pylib/gyp/MSVSNew.py
Source/ThirdParty/gyp/pylib/gyp/MSVSProject.py
Source/ThirdParty/gyp/pylib/gyp/MSVSSettings.py
Source/ThirdParty/gyp/pylib/gyp/MSVSSettings_test.py
Source/ThirdParty/gyp/pylib/gyp/MSVSToolFile.py
Source/ThirdParty/gyp/pylib/gyp/MSVSUserFile.py
Source/ThirdParty/gyp/pylib/gyp/MSVSUtil.py [new file with mode: 0644]
Source/ThirdParty/gyp/pylib/gyp/MSVSVersion.py
Source/ThirdParty/gyp/pylib/gyp/SCons.py
Source/ThirdParty/gyp/pylib/gyp/__init__.py
Source/ThirdParty/gyp/pylib/gyp/common.py
Source/ThirdParty/gyp/pylib/gyp/common_test.py [new file with mode: 0644]
Source/ThirdParty/gyp/pylib/gyp/easy_xml.py
Source/ThirdParty/gyp/pylib/gyp/easy_xml_test.py
Source/ThirdParty/gyp/pylib/gyp/generator/android.py [new file with mode: 0644]
Source/ThirdParty/gyp/pylib/gyp/generator/dump_dependency_json.py [new file with mode: 0644]
Source/ThirdParty/gyp/pylib/gyp/generator/eclipse.py [new file with mode: 0644]
Source/ThirdParty/gyp/pylib/gyp/generator/gypd.py
Source/ThirdParty/gyp/pylib/gyp/generator/gypsh.py
Source/ThirdParty/gyp/pylib/gyp/generator/make.py
Source/ThirdParty/gyp/pylib/gyp/generator/msvs.py
Source/ThirdParty/gyp/pylib/gyp/generator/msvs_test.py [new file with mode: 0644]
Source/ThirdParty/gyp/pylib/gyp/generator/ninja.py [new file with mode: 0644]
Source/ThirdParty/gyp/pylib/gyp/generator/ninja_test.py [new file with mode: 0644]
Source/ThirdParty/gyp/pylib/gyp/generator/scons.py
Source/ThirdParty/gyp/pylib/gyp/generator/xcode.py
Source/ThirdParty/gyp/pylib/gyp/input.py
Source/ThirdParty/gyp/pylib/gyp/mac_tool.py [new file with mode: 0644]
Source/ThirdParty/gyp/pylib/gyp/msvs_emulation.py [new file with mode: 0644]
Source/ThirdParty/gyp/pylib/gyp/ninja_syntax.py [new file with mode: 0644]
Source/ThirdParty/gyp/pylib/gyp/sun_tool.py [new file with mode: 0644]
Source/ThirdParty/gyp/pylib/gyp/win_tool.py [new file with mode: 0644]
Source/ThirdParty/gyp/pylib/gyp/xcode_emulation.py [new file with mode: 0644]
Source/ThirdParty/gyp/pylib/gyp/xcodeproj_file.py
Source/ThirdParty/gyp/pylib/gyp/xml_fix.py
Source/ThirdParty/gyp/pylintrc [new file with mode: 0644]
Source/ThirdParty/gyp/test/actions-bare/src/bare.py
Source/ThirdParty/gyp/test/actions-multiple/gyptest-all.py
Source/ThirdParty/gyp/test/actions-multiple/src/actions.gyp
Source/ThirdParty/gyp/test/actions-multiple/src/copy.py
Source/ThirdParty/gyp/test/actions-multiple/src/filter.py
Source/ThirdParty/gyp/test/actions-none/gyptest-none.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/actions-none/src/fake_cross.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/actions-none/src/foo.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/actions-none/src/none_with_source_files.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/actions/gyptest-all.py
Source/ThirdParty/gyp/test/actions/gyptest-default.py
Source/ThirdParty/gyp/test/actions/gyptest-errors.py
Source/ThirdParty/gyp/test/actions/src/confirm-dep-files.py
Source/ThirdParty/gyp/test/additional-targets/gyptest-additional.py
Source/ThirdParty/gyp/test/additional-targets/src/dir1/emit.py
Source/ThirdParty/gyp/test/assembly/gyptest-assembly.py
Source/ThirdParty/gyp/test/assembly/gyptest-override.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/assembly/src/assembly.gyp
Source/ThirdParty/gyp/test/assembly/src/lib1.S
Source/ThirdParty/gyp/test/assembly/src/override.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/assembly/src/override_asm.asm [new file with mode: 0644]
Source/ThirdParty/gyp/test/build-option/gyptest-build.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/build-option/hello.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/build-option/hello.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/builddir/gyptest-all.py
Source/ThirdParty/gyp/test/builddir/gyptest-default.py
Source/ThirdParty/gyp/test/builddir/src/builddir.gypi
Source/ThirdParty/gyp/test/cflags/gyptest-cflags.py
Source/ThirdParty/gyp/test/compiler-override/compiler-global-settings.gyp.in [new file with mode: 0644]
Source/ThirdParty/gyp/test/compiler-override/compiler-host.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/compiler-override/compiler.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/compiler-override/cxxtest.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/compiler-override/gyptest-compiler-env.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/compiler-override/gyptest-compiler-global-settings.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/compiler-override/my_cc.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/compiler-override/my_cxx.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/compiler-override/my_ld.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/compiler-override/test.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/configurations/invalid/gyptest-configurations.py
Source/ThirdParty/gyp/test/configurations/invalid/standalone_static_library.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/configurations/x64/configurations.gyp
Source/ThirdParty/gyp/test/configurations/x64/gyptest-x86.py
Source/ThirdParty/gyp/test/copies/gyptest-samedir.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/copies/gyptest-slash.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/copies/gyptest-updir.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/copies/src/copies-samedir.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/copies/src/copies-slash.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/copies/src/copies-updir.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/custom-generator/gyptest-custom-generator.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/custom-generator/mygenerator.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/custom-generator/test.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/cxxflags/gyptest-cxxflags.py
Source/ThirdParty/gyp/test/defines-escaping/gyptest-defines-escaping.py
Source/ThirdParty/gyp/test/defines/defines.c
Source/ThirdParty/gyp/test/defines/defines.gyp
Source/ThirdParty/gyp/test/defines/gyptest-defines-env-regyp.py
Source/ThirdParty/gyp/test/defines/gyptest-defines.py
Source/ThirdParty/gyp/test/dependencies/b/b.gyp
Source/ThirdParty/gyp/test/dependencies/b/b3.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/dependencies/double_dependency.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/dependencies/double_dependent.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/dependencies/gyptest-double-dependency.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/dependencies/gyptest-lib-only.py
Source/ThirdParty/gyp/test/dependencies/gyptest-none-traversal.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/dependencies/main.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/dependencies/none_traversal.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/errors/duplicate_basenames.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/errors/duplicate_node.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/errors/duplicate_rule.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/errors/duplicate_targets.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/errors/gyptest-errors.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/errors/missing_dep.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/errors/missing_targets.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/escaping/colon/test.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/escaping/gyptest-colon.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/external-cross-compile/gyptest-cross.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/external-cross-compile/src/bogus1.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/external-cross-compile/src/bogus2.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/external-cross-compile/src/cross.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/external-cross-compile/src/cross_compile.gypi [new file with mode: 0644]
Source/ThirdParty/gyp/test/external-cross-compile/src/fake_cross.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/external-cross-compile/src/program.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/external-cross-compile/src/test1.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/external-cross-compile/src/test2.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/external-cross-compile/src/test3.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/external-cross-compile/src/test4.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/external-cross-compile/src/tochar.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/generator-output/gyptest-actions.py
Source/ThirdParty/gyp/test/generator-output/gyptest-copies.py
Source/ThirdParty/gyp/test/generator-output/gyptest-mac-bundle.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/generator-output/gyptest-relocate.py
Source/ThirdParty/gyp/test/generator-output/gyptest-rules.py
Source/ThirdParty/gyp/test/generator-output/gyptest-subdir2-deep.py
Source/ThirdParty/gyp/test/generator-output/gyptest-symlink.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/generator-output/gyptest-top-all.py
Source/ThirdParty/gyp/test/generator-output/mac-bundle/Info.plist [new file with mode: 0644]
Source/ThirdParty/gyp/test/generator-output/mac-bundle/app.order [new file with mode: 0644]
Source/ThirdParty/gyp/test/generator-output/mac-bundle/header.h [new file with mode: 0644]
Source/ThirdParty/gyp/test/generator-output/mac-bundle/main.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/generator-output/mac-bundle/resource.sb [new file with mode: 0644]
Source/ThirdParty/gyp/test/generator-output/mac-bundle/test.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/gyp-defines/defines.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/gyp-defines/echo.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/gyp-defines/gyptest-multiple-values.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/gyp-defines/gyptest-regyp.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/hard_dependency/gyptest-exported-hard-dependency.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/hard_dependency/gyptest-no-exported-hard-dependency.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/hard_dependency/src/a.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/hard_dependency/src/a.h [new file with mode: 0644]
Source/ThirdParty/gyp/test/hard_dependency/src/b.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/hard_dependency/src/b.h [new file with mode: 0644]
Source/ThirdParty/gyp/test/hard_dependency/src/c.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/hard_dependency/src/c.h [new file with mode: 0644]
Source/ThirdParty/gyp/test/hard_dependency/src/d.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/hard_dependency/src/emit.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/hard_dependency/src/hard_dependency.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/hello/gyptest-all.py
Source/ThirdParty/gyp/test/hello/gyptest-default.py
Source/ThirdParty/gyp/test/hello/gyptest-regyp.py
Source/ThirdParty/gyp/test/hello/gyptest-target.py
Source/ThirdParty/gyp/test/home_dot_gyp/gyptest-home-includes-regyp.py
Source/ThirdParty/gyp/test/home_dot_gyp/gyptest-home-includes.py
Source/ThirdParty/gyp/test/intermediate_dir/gyptest-intermediate-dir.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/intermediate_dir/src/script.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/intermediate_dir/src/shared_infile.txt [new file with mode: 0644]
Source/ThirdParty/gyp/test/intermediate_dir/src/test.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/intermediate_dir/src/test2.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/ios/deployment-target/check-version-min.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/ios/deployment-target/deployment-target.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/ios/gyptest-deployment-target.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/lib/TestCmd.py
Source/ThirdParty/gyp/test/lib/TestCommon.py
Source/ThirdParty/gyp/test/lib/TestGyp.py
Source/ThirdParty/gyp/test/library/gyptest-shared-obj-install-path.py
Source/ThirdParty/gyp/test/library/src/library.gyp
Source/ThirdParty/gyp/test/link-objects/gyptest-all.py
Source/ThirdParty/gyp/test/linux/gyptest-implicit-rpath.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/linux/implicit-rpath/file.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/linux/implicit-rpath/main.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/linux/implicit-rpath/test.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/action-envvars/action/action.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/action-envvars/action/action.sh [new file with mode: 0755]
Source/ThirdParty/gyp/test/mac/app-bundle/TestApp/English.lproj/InfoPlist-error.strings [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/app-bundle/TestApp/English.lproj/InfoPlist.strings [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/app-bundle/TestApp/English.lproj/MainMenu.xib [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/app-bundle/TestApp/TestApp-Info.plist [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/app-bundle/TestApp/TestAppAppDelegate.h [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/app-bundle/TestApp/TestAppAppDelegate.m [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/app-bundle/TestApp/main.m [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/app-bundle/test-error.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/app-bundle/test.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/archs/my_file.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/archs/my_main_file.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/archs/test-archs-x86_64.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/archs/test-no-archs.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/cflags/ccfile.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/cflags/ccfile_withcflags.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/cflags/cfile.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/cflags/cppfile.cpp [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/cflags/cppfile_withcflags.cpp [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/cflags/cxxfile.cxx [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/cflags/cxxfile_withcflags.cxx [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/cflags/mfile.m [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/cflags/mmfile.mm [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/cflags/mmfile_withcflags.mm [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/cflags/test.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/clang-cxx-language-standard/c++11.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/clang-cxx-language-standard/c++98.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/clang-cxx-language-standard/clang-cxx-language-standard.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/clang-cxx-library/clang-cxx-library.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/clang-cxx-library/libc++.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/clang-cxx-library/libstdc++.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/copy-dylib/empty.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/copy-dylib/test.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/debuginfo/file.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/debuginfo/test.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/depend-on-bundle/English.lproj/InfoPlist.strings [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/depend-on-bundle/Info.plist [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/depend-on-bundle/bundle.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/depend-on-bundle/executable.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/depend-on-bundle/test.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/deployment-target/check-version-min.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/deployment-target/deployment-target.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/framework-dirs/calculate.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/framework-dirs/framework-dirs.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/framework-headers/myframework.h [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/framework-headers/myframework.m [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/framework-headers/test.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/framework/TestFramework/English.lproj/InfoPlist.strings [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/framework/TestFramework/Info.plist [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/framework/TestFramework/ObjCVector.h [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/framework/TestFramework/ObjCVector.mm [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/framework/TestFramework/ObjCVectorInternal.h [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/framework/TestFramework/TestFramework_Prefix.pch [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/framework/framework.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/global-settings/src/dir1/dir1.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/global-settings/src/dir2/dir2.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/global-settings/src/dir2/file.txt [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/gyptest-action-envvars.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/gyptest-app-error.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/gyptest-app.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/gyptest-archs.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/gyptest-cflags.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/gyptest-clang-cxx-language-standard.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/gyptest-clang-cxx-library.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/gyptest-copies.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/gyptest-copy-dylib.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/gyptest-debuginfo.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/gyptest-depend-on-bundle.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/gyptest-deployment-target.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/gyptest-framework-dirs.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/gyptest-framework-headers.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/gyptest-framework.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/gyptest-global-settings.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/gyptest-infoplist-process.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/gyptest-installname.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/gyptest-ldflags-passed-to-libtool.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/gyptest-ldflags.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/gyptest-libraries.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/gyptest-loadable-module.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/gyptest-missing-cfbundlesignature.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/gyptest-non-strs-flattened-to-env.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/gyptest-objc-gc.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/gyptest-postbuild-copy-bundle.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/gyptest-postbuild-defaults.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/gyptest-postbuild-fail.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/gyptest-postbuild-multiple-configurations.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/gyptest-postbuild-static-library.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/gyptest-postbuild.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/gyptest-prefixheader.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/gyptest-rebuild.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/gyptest-rpath.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/gyptest-sdkroot.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/gyptest-sourceless-module.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/gyptest-strip.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/gyptest-type-envvars.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/gyptest-xcode-env-order.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/gyptest-xcode-gcc.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/infoplist-process/Info.plist [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/infoplist-process/main.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/infoplist-process/test1.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/infoplist-process/test2.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/infoplist-process/test3.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/installname/Info.plist [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/installname/file.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/installname/main.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/installname/test.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/ldflags-libtool/file.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/ldflags-libtool/test.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/ldflags/subdirectory/Info.plist [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/ldflags/subdirectory/file.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/ldflags/subdirectory/symbol_list.def [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/ldflags/subdirectory/test.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/libraries/subdir/README.txt [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/libraries/subdir/hello.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/libraries/subdir/mylib.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/libraries/subdir/test.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/loadable-module/Info.plist [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/loadable-module/module.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/loadable-module/test.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/missing-cfbundlesignature/Info.plist [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/missing-cfbundlesignature/Other-Info.plist [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/missing-cfbundlesignature/Third-Info.plist [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/missing-cfbundlesignature/file.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/missing-cfbundlesignature/test.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/non-strs-flattened-to-env/Info.plist [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/non-strs-flattened-to-env/main.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/non-strs-flattened-to-env/test.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/objc-gc/c-file.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/objc-gc/cc-file.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/objc-gc/main.m [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/objc-gc/needs-gc-mm.mm [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/objc-gc/needs-gc.m [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/objc-gc/test.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/postbuild-copy-bundle/Framework-Info.plist [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/postbuild-copy-bundle/TestApp-Info.plist [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/postbuild-copy-bundle/copied.txt [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/postbuild-copy-bundle/main.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/postbuild-copy-bundle/postbuild-copy-framework.sh [new file with mode: 0755]
Source/ThirdParty/gyp/test/mac/postbuild-copy-bundle/resource_file.sb [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/postbuild-copy-bundle/test.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/postbuild-defaults/Info.plist [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/postbuild-defaults/main.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/postbuild-defaults/postbuild-defaults.sh [new file with mode: 0755]
Source/ThirdParty/gyp/test/mac/postbuild-defaults/test.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/postbuild-fail/file.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/postbuild-fail/postbuild-fail.sh [new file with mode: 0755]
Source/ThirdParty/gyp/test/mac/postbuild-fail/test.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/postbuild-fail/touch-dynamic.sh [new file with mode: 0755]
Source/ThirdParty/gyp/test/mac/postbuild-fail/touch-static.sh [new file with mode: 0755]
Source/ThirdParty/gyp/test/mac/postbuild-multiple-configurations/main.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/postbuild-multiple-configurations/postbuild-touch-file.sh [new file with mode: 0755]
Source/ThirdParty/gyp/test/mac/postbuild-multiple-configurations/test.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/postbuild-static-library/empty.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/postbuild-static-library/postbuild-touch-file.sh [new file with mode: 0755]
Source/ThirdParty/gyp/test/mac/postbuild-static-library/test.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/postbuilds/copy.sh [new file with mode: 0755]
Source/ThirdParty/gyp/test/mac/postbuilds/file.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/postbuilds/file_g.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/postbuilds/file_h.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/postbuilds/script/shared_library_postbuild.sh [new file with mode: 0755]
Source/ThirdParty/gyp/test/mac/postbuilds/script/static_library_postbuild.sh [new file with mode: 0755]
Source/ThirdParty/gyp/test/mac/postbuilds/subdirectory/copied_file.txt [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/postbuilds/subdirectory/nested_target.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/postbuilds/test.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/prefixheader/file.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/prefixheader/file.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/prefixheader/file.m [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/prefixheader/file.mm [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/prefixheader/header.h [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/prefixheader/test.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/rebuild/TestApp-Info.plist [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/rebuild/delay-touch.sh [new file with mode: 0755]
Source/ThirdParty/gyp/test/mac/rebuild/main.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/rebuild/test.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/rpath/file.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/rpath/main.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/rpath/test.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/sdkroot/file.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/sdkroot/test.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/sdkroot/test_shorthand.sh [new file with mode: 0755]
Source/ThirdParty/gyp/test/mac/sourceless-module/empty.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/sourceless-module/test.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/strip/file.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/strip/strip.saves [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/strip/subdirectory/nested_file.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/strip/subdirectory/nested_strip.saves [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/strip/subdirectory/subdirectory.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/strip/subdirectory/test_reading_save_file_from_postbuild.sh [new file with mode: 0755]
Source/ThirdParty/gyp/test/mac/strip/test.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/type_envvars/file.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/type_envvars/test.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/type_envvars/test_bundle_executable.sh [new file with mode: 0755]
Source/ThirdParty/gyp/test/mac/type_envvars/test_bundle_loadable_module.sh [new file with mode: 0755]
Source/ThirdParty/gyp/test/mac/type_envvars/test_bundle_shared_library.sh [new file with mode: 0755]
Source/ThirdParty/gyp/test/mac/type_envvars/test_nonbundle_executable.sh [new file with mode: 0755]
Source/ThirdParty/gyp/test/mac/type_envvars/test_nonbundle_loadable_module.sh [new file with mode: 0755]
Source/ThirdParty/gyp/test/mac/type_envvars/test_nonbundle_none.sh [new file with mode: 0755]
Source/ThirdParty/gyp/test/mac/type_envvars/test_nonbundle_shared_library.sh [new file with mode: 0755]
Source/ThirdParty/gyp/test/mac/type_envvars/test_nonbundle_static_library.sh [new file with mode: 0755]
Source/ThirdParty/gyp/test/mac/xcode-env-order/Info.plist [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/xcode-env-order/main.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/xcode-env-order/test.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/xcode-gcc/test.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/xcode-gcc/valid_c.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/xcode-gcc/valid_cc.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/xcode-gcc/valid_m.m [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/xcode-gcc/valid_mm.mm [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/xcode-gcc/warn_about_invalid_offsetof_macro.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/mac/xcode-gcc/warn_about_missing_newline.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/make/gyptest-dependencies.py
Source/ThirdParty/gyp/test/make_global_settings/basics/gyptest-make_global_settings.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/make_global_settings/basics/make_global_settings.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/make_global_settings/wrapper/gyptest-wrapper.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/make_global_settings/wrapper/wrapper.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/many-actions/gyptest-many-actions-unsorted.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/many-actions/gyptest-many-actions.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/many-actions/many-actions-unsorted.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/many-actions/many-actions.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/module/gyptest-default.py
Source/ThirdParty/gyp/test/module/src/module.gyp
Source/ThirdParty/gyp/test/module/src/program.c
Source/ThirdParty/gyp/test/msvs/config_attrs/gyptest-config_attrs.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/msvs/config_attrs/hello.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/msvs/config_attrs/hello.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/msvs/list_excluded/gyptest-all.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/msvs/list_excluded/hello.cpp [new file with mode: 0644]
Source/ThirdParty/gyp/test/msvs/list_excluded/hello_exclude.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/msvs/list_excluded/hello_mac.cpp [new file with mode: 0644]
Source/ThirdParty/gyp/test/msvs/missing_sources/gyptest-missing.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/msvs/missing_sources/hello_missing.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/msvs/props/AppName.props [new file with mode: 0644]
Source/ThirdParty/gyp/test/msvs/props/AppName.vsprops [new file with mode: 0644]
Source/ThirdParty/gyp/test/msvs/props/gyptest-props.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/msvs/props/hello.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/msvs/props/hello.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/msvs/shared_output/common.gypi [new file with mode: 0644]
Source/ThirdParty/gyp/test/msvs/shared_output/gyptest-shared_output.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/msvs/shared_output/hello.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/msvs/shared_output/hello.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/msvs/shared_output/there/there.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/msvs/shared_output/there/there.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/msvs/uldi2010/gyptest-all.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/msvs/uldi2010/hello.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/msvs/uldi2010/hello.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/msvs/uldi2010/hello2.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/ninja/action_dependencies/gyptest-action-dependencies.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/ninja/action_dependencies/src/a.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/ninja/action_dependencies/src/a.h [new file with mode: 0644]
Source/ThirdParty/gyp/test/ninja/action_dependencies/src/action_dependencies.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/ninja/action_dependencies/src/b.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/ninja/action_dependencies/src/b.h [new file with mode: 0644]
Source/ThirdParty/gyp/test/ninja/action_dependencies/src/c.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/ninja/action_dependencies/src/c.h [new file with mode: 0644]
Source/ThirdParty/gyp/test/ninja/action_dependencies/src/emit.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/ninja/chained-dependency/chained-dependency.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/ninja/chained-dependency/chained.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/ninja/chained-dependency/gyptest-chained-dependency.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/ninja/normalize-paths-win/gyptest-normalize-paths.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/ninja/normalize-paths-win/hello.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/ninja/normalize-paths-win/normalize-paths.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/ninja/s-needs-no-depfiles/empty.s [new file with mode: 0644]
Source/ThirdParty/gyp/test/ninja/s-needs-no-depfiles/gyptest-s-needs-no-depfiles.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/ninja/s-needs-no-depfiles/s-needs-no-depfiles.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/ninja/solibs_avoid_relinking/gyptest-solibs-avoid-relinking.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/ninja/solibs_avoid_relinking/main.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/ninja/solibs_avoid_relinking/solib.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/ninja/solibs_avoid_relinking/solibs_avoid_relinking.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/ninja/use-custom-environment-files/gyptest-use-custom-environment-files.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/ninja/use-custom-environment-files/use-custom-environment-files.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/ninja/use-custom-environment-files/use-custom-environment-files.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/no-output/gyptest-no-output.py
Source/ThirdParty/gyp/test/product/gyptest-product.py
Source/ThirdParty/gyp/test/relative/foo/a/a.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/relative/foo/a/a.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/relative/foo/a/c/c.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/relative/foo/a/c/c.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/relative/foo/b/b.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/relative/foo/b/b.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/relative/gyptest-default.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/rename/filecase/file.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/rename/filecase/test-casesensitive.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/rename/filecase/test.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/rename/gyptest-filecase.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/restat/gyptest-restat.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/restat/src/create_intermediate.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/restat/src/restat.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/restat/src/touch.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/rules-dirname/gyptest-dirname.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/rules-dirname/src/actions.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/rules-dirname/src/copy-file.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/rules-dirname/src/subdir/a/b/c.gencc [new file with mode: 0644]
Source/ThirdParty/gyp/test/rules-dirname/src/subdir/a/b/c.printvars [new file with mode: 0644]
Source/ThirdParty/gyp/test/rules-dirname/src/subdir/foo/bar/baz.gencc [new file with mode: 0644]
Source/ThirdParty/gyp/test/rules-dirname/src/subdir/foo/bar/baz.printvars [new file with mode: 0644]
Source/ThirdParty/gyp/test/rules-dirname/src/subdir/input-rule-dirname.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/rules-dirname/src/subdir/main.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/rules-dirname/src/subdir/printvars.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/rules-rebuild/gyptest-all.py
Source/ThirdParty/gyp/test/rules-rebuild/gyptest-default.py
Source/ThirdParty/gyp/test/rules-rebuild/src/make-sources.py
Source/ThirdParty/gyp/test/rules-variables/gyptest-rules-variables.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/rules-variables/src/input_ext.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/rules-variables/src/input_name/test.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/rules-variables/src/input_path/subdir/test.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/rules-variables/src/subdir/input_dirname.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/rules-variables/src/subdir/test.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/rules-variables/src/test.input_root.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/rules-variables/src/variables.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/rules/gyptest-all.py
Source/ThirdParty/gyp/test/rules/gyptest-default.py
Source/ThirdParty/gyp/test/rules/gyptest-input-root.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/rules/gyptest-special-variables.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/rules/src/actions.gyp
Source/ThirdParty/gyp/test/rules/src/an_asm.S [new file with mode: 0644]
Source/ThirdParty/gyp/test/rules/src/as.bat [new file with mode: 0644]
Source/ThirdParty/gyp/test/rules/src/external/external.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/rules/src/external/file1.in [new file with mode: 0644]
Source/ThirdParty/gyp/test/rules/src/external/file2.in [new file with mode: 0644]
Source/ThirdParty/gyp/test/rules/src/input-root.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/rules/src/noaction/file1.in [new file with mode: 0644]
Source/ThirdParty/gyp/test/rules/src/noaction/no_action_with_rules_fails.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/rules/src/rule.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/rules/src/special-variables.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/rules/src/subdir2/no_action.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/rules/src/subdir4/asm-function.assem [new file with mode: 0644]
Source/ThirdParty/gyp/test/rules/src/subdir4/build-asm.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/rules/src/subdir4/program.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/same-gyp-name/gyptest-all.py
Source/ThirdParty/gyp/test/same-gyp-name/gyptest-default.py
Source/ThirdParty/gyp/test/same-gyp-name/gyptest-library.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/same-gyp-name/library/one/sub.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/same-gyp-name/library/test.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/same-gyp-name/library/two/sub.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/same-rule-output-file-name/gyptest-all.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/same-rule-output-file-name/src/subdir1/subdir1.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/same-rule-output-file-name/src/subdir2/subdir2.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/same-rule-output-file-name/src/subdirs.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/same-rule-output-file-name/src/touch.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/same-source-file-name/gyptest-all.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/same-source-file-name/gyptest-default.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/same-source-file-name/gyptest-fail-shared.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/same-source-file-name/gyptest-fail-static.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/same-source-file-name/gyptest-pass-executable.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/same-source-file-name/src/all.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/same-source-file-name/src/double-executable.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/same-source-file-name/src/double-shared.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/same-source-file-name/src/double-static.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/same-source-file-name/src/func.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/same-source-file-name/src/prog1.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/same-source-file-name/src/prog2.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/same-source-file-name/src/prog3.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/same-source-file-name/src/subdir1/func.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/same-source-file-name/src/subdir2/func.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/same-target-name-different-directory/gyptest-all.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/same-target-name-different-directory/src/subdir1/subdir1.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/same-target-name-different-directory/src/subdir2/subdir2.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/same-target-name-different-directory/src/subdirs.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/same-target-name-different-directory/src/touch.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/sanitize-rule-names/gyptest-sanitize-rule-names.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/sanitize-rule-names/hello.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/sanitize-rule-names/sanitize-rule-names.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/sanitize-rule-names/script.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/self-dependency/common.gypi [new file with mode: 0644]
Source/ThirdParty/gyp/test/self-dependency/dep.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/self-dependency/gyptest-self-dependency.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/self-dependency/self_dependency.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/sibling/gyptest-all.py
Source/ThirdParty/gyp/test/sibling/gyptest-relocate.py
Source/ThirdParty/gyp/test/sibling/src/prog1/prog1.gyp
Source/ThirdParty/gyp/test/sibling/src/prog2/prog2.gyp
Source/ThirdParty/gyp/test/small/gyptest-small.py
Source/ThirdParty/gyp/test/standalone-static-library/gyptest-standalone-static-library.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/standalone-static-library/invalid.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/standalone-static-library/mylib.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/standalone-static-library/mylib.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/standalone-static-library/prog.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/standalone/gyptest-standalone.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/standalone/standalone.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/subdirectory/gyptest-subdir-all.py
Source/ThirdParty/gyp/test/subdirectory/gyptest-subdir-default.py
Source/ThirdParty/gyp/test/toolsets/toolsets.gyp
Source/ThirdParty/gyp/test/toplevel-dir/gyptest-toplevel-dir.py
Source/ThirdParty/gyp/test/variables/commands/commands-repeated.gyp.stdout
Source/ThirdParty/gyp/test/variables/commands/commands.gyp
Source/ThirdParty/gyp/test/variables/commands/commands.gyp.ignore-env.stdout
Source/ThirdParty/gyp/test/variables/commands/commands.gyp.stdout
Source/ThirdParty/gyp/test/variables/commands/commands.gypd.golden
Source/ThirdParty/gyp/test/variables/commands/gyptest-commands-ignore-env.py
Source/ThirdParty/gyp/test/variables/commands/gyptest-commands-repeated.py
Source/ThirdParty/gyp/test/variables/commands/gyptest-commands.py
Source/ThirdParty/gyp/test/variables/commands/test.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/variables/filelist/filelist.gyp.stdout
Source/ThirdParty/gyp/test/variables/filelist/gyptest-filelist.py
Source/ThirdParty/gyp/test/variables/latelate/gyptest-latelate.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/variables/latelate/src/latelate.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/variables/latelate/src/program.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/variables/variable-in-path/C1/hello.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/variables/variable-in-path/gyptest-variable-in-path.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/variables/variable-in-path/variable-in-path.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/asm-files/asm-files.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/asm-files/hello.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/batch-file-action/batch-file-action.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/batch-file-action/infile [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/batch-file-action/somecmd.bat [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/command-quote/bat with spaces.bat [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/command-quote/command-quote.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/command-quote/go.bat [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/command-quote/subdir/and/another/in-subdir.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/compiler-flags/additional-include-dirs.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/compiler-flags/additional-include-dirs.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/compiler-flags/additional-options.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/compiler-flags/additional-options.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/compiler-flags/analysis.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/compiler-flags/buffer-security-check.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/compiler-flags/buffer-security.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/compiler-flags/character-set-mbcs.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/compiler-flags/character-set-unicode.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/compiler-flags/character-set.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/compiler-flags/debug-format.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/compiler-flags/default-char-is-unsigned.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/compiler-flags/default-char-is-unsigned.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/compiler-flags/exception-handling-on.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/compiler-flags/exception-handling.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/compiler-flags/force-include-files.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/compiler-flags/force-include-files.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/compiler-flags/function-level-linking.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/compiler-flags/function-level-linking.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/compiler-flags/hello.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/compiler-flags/optimizations.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/compiler-flags/pdbname-override.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/compiler-flags/pdbname.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/compiler-flags/pdbname.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/compiler-flags/rtti-on.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/compiler-flags/rtti.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/compiler-flags/runtime-checks.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/compiler-flags/runtime-checks.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/compiler-flags/runtime-library-md.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/compiler-flags/runtime-library-mdd.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/compiler-flags/runtime-library-mt.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/compiler-flags/runtime-library-mtd.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/compiler-flags/runtime-library.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/compiler-flags/treat-wchar-t-as-built-in-type.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/compiler-flags/treat-wchar-t-as-built-in-type1.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/compiler-flags/treat-wchar-t-as-built-in-type2.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/compiler-flags/uninit.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/compiler-flags/warning-as-error.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/compiler-flags/warning-as-error.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/compiler-flags/warning-level.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/compiler-flags/warning-level1.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/compiler-flags/warning-level2.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/compiler-flags/warning-level3.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/compiler-flags/warning-level4.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/gyptest-asm-files.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/gyptest-cl-additional-include-dirs.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/gyptest-cl-additional-options.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/gyptest-cl-analysis.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/gyptest-cl-buffer-security-check.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/gyptest-cl-character-set.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/gyptest-cl-debug-format.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/gyptest-cl-default-char-is-unsigned.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/gyptest-cl-exception-handling.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/gyptest-cl-force-include-files.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/gyptest-cl-function-level-linking.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/gyptest-cl-optimizations.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/gyptest-cl-pdbname-override.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/gyptest-cl-pdbname.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/gyptest-cl-rtti.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/gyptest-cl-runtime-checks.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/gyptest-cl-runtime-library.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/gyptest-cl-treat-wchar-t-as-built-in-type.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/gyptest-cl-warning-as-error.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/gyptest-cl-warning-level.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/gyptest-command-quote.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/gyptest-lib-ltcg.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/gyptest-link-additional-deps.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/gyptest-link-additional-options.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/gyptest-link-aslr.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/gyptest-link-debug-info.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/gyptest-link-default-libs.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/gyptest-link-deffile.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/gyptest-link-delay-load-dlls.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/gyptest-link-entrypointsymbol.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/gyptest-link-fixed-base.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/gyptest-link-generate-manifest.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/gyptest-link-incremental.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/gyptest-link-large-address-aware.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/gyptest-link-large-pdb.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/gyptest-link-library-adjust.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/gyptest-link-library-directories.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/gyptest-link-nodefaultlib.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/gyptest-link-nxcompat.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/gyptest-link-opt-icf.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/gyptest-link-opt-ref.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/gyptest-link-outputfile.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/gyptest-link-pdb.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/gyptest-link-profile.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/gyptest-link-restat-importlib.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/gyptest-link-shard.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/gyptest-link-subsystem.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/gyptest-link-tsaware.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/gyptest-link-uldi.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/gyptest-long-command-line.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/gyptest-macro-projectname.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/gyptest-macro-vcinstalldir.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/gyptest-macros-containing-gyp.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/gyptest-macros-in-inputs-and-outputs.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/gyptest-midl-rules.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/gyptest-quoting-commands.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/gyptest-rc-build.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/idl-rules/basic-idl.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/idl-rules/history_indexer.idl [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/idl-rules/history_indexer_user.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/importlib/has-exports.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/importlib/hello.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/importlib/importlib.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/large-pdb/dllmain.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/large-pdb/large-pdb.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/large-pdb/main.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/lib-flags/answer.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/lib-flags/answer.h [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/lib-flags/ltcg.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/linker-flags/additional-deps.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/linker-flags/additional-deps.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/linker-flags/additional-options.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/linker-flags/aslr.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/linker-flags/debug-info.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/linker-flags/deffile-multiple.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/linker-flags/deffile.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/linker-flags/deffile.def [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/linker-flags/deffile.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/linker-flags/delay-load-dlls.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/linker-flags/delay-load.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/linker-flags/entrypointsymbol.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/linker-flags/entrypointsymbol.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/linker-flags/extra.manifest [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/linker-flags/extra2.manifest [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/linker-flags/fixed-base.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/linker-flags/generate-manifest.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/linker-flags/hello.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/linker-flags/incremental.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/linker-flags/large-address-aware.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/linker-flags/library-adjust.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/linker-flags/library-adjust.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/linker-flags/library-directories-define.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/linker-flags/library-directories-reference.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/linker-flags/library-directories.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/linker-flags/no-default-libs.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/linker-flags/no-default-libs.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/linker-flags/nodefaultlib.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/linker-flags/nodefaultlib.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/linker-flags/nxcompat.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/linker-flags/opt-icf.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/linker-flags/opt-icf.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/linker-flags/opt-ref.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/linker-flags/opt-ref.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/linker-flags/outputfile.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/linker-flags/profile.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/linker-flags/program-database.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/linker-flags/subdir/library.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/linker-flags/subsystem-windows.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/linker-flags/subsystem.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/linker-flags/tsaware.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/long-command-line/function.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/long-command-line/hello.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/long-command-line/long-command-line.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/precompiled/gyptest-all.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/precompiled/hello.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/precompiled/hello.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/precompiled/hello2.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/precompiled/precomp.c [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/rc-build/Resource.h [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/rc-build/hello.cpp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/rc-build/hello.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/rc-build/hello.h [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/rc-build/hello.rc [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/rc-build/subdir/hello2.rc [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/rc-build/subdir/include.h [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/rc-build/targetver.h [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/shard/hello1.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/shard/hello2.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/shard/hello3.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/shard/hello4.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/shard/shard.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/uldi/a.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/uldi/b.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/uldi/main.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/uldi/uldi.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/vs-macros/as.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/vs-macros/containing-gyp.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/vs-macros/do_stuff.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/vs-macros/hello.cc [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/vs-macros/input-output-macros.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/vs-macros/projectname.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/vs-macros/stuff.blah [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/vs-macros/test_exists.py [new file with mode: 0644]
Source/ThirdParty/gyp/test/win/vs-macros/vcinstalldir.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/tools/Xcode/README [new file with mode: 0644]
Source/ThirdParty/gyp/tools/Xcode/Specifications/gyp.pbfilespec [new file with mode: 0644]
Source/ThirdParty/gyp/tools/Xcode/Specifications/gyp.xclangspec [new file with mode: 0644]
Source/ThirdParty/gyp/tools/emacs/README [new file with mode: 0644]
Source/ThirdParty/gyp/tools/emacs/gyp-tests.el [new file with mode: 0644]
Source/ThirdParty/gyp/tools/emacs/gyp.el [new file with mode: 0644]
Source/ThirdParty/gyp/tools/emacs/run-unit-tests.sh [new file with mode: 0755]
Source/ThirdParty/gyp/tools/emacs/testdata/media.gyp [new file with mode: 0644]
Source/ThirdParty/gyp/tools/emacs/testdata/media.gyp.fontified [new file with mode: 0644]
Source/ThirdParty/gyp/tools/graphviz.py [new file with mode: 0644]
Source/ThirdParty/gyp/tools/pretty_gyp.py
Source/ThirdParty/gyp/tools/pretty_sln.py
Source/ThirdParty/gyp/tools/pretty_vcproj.py

index 5e60564..93d431c 100644 (file)
@@ -1,3 +1,12 @@
+2013-03-29  Martin Robinson  <mrobinson@igalia.com>
+
+        Update the version of gyp in the repository
+        https://bugs.webkit.org/show_bug.cgi?id=113540
+
+        Reviewed by Nico Weber.
+
+        * gyp: Update gyp to r1605.
+
 2013-03-21  Zan Dobersek  <zdobersek@igalia.com>
 
         [GTK] Move libLevelDB.la setup into a separate GNUmakefile.am
index f0b6752..8977761 100644 (file)
@@ -2,4 +2,7 @@
 # Name or Organization <email address>
 
 Google Inc.
+Bloomberg Finance L.P.
+
 Steven Knight <knight@baldmt.com>
+Ryan Norton <rnorton10@gmail.com>
index 0e56c06..c17571a 100644 (file)
@@ -2,7 +2,25 @@
 #
 # (You don't need to use gclient for normal GYP development work.)
 
+vars = {
+  "chrome_trunk": "http://src.chromium.org/svn/trunk",
+  "googlecode_url": "http://%s.googlecode.com/svn",
+}
+
 deps = {
   "scons":
-    "http://src.chromium.org/svn/trunk/src/third_party/scons@44099",
+    Var("chrome_trunk") + "/src/third_party/scons@44099",
+}
+
+deps_os = {
+  "win": {
+    "third_party/cygwin":
+      Var("chrome_trunk") + "/deps/third_party/cygwin@66844",
+
+    "third_party/python_26":
+      Var("chrome_trunk") + "/tools/third_party/python_26@89111",
+
+    "src/third_party/pefile":
+      (Var("googlecode_url") % "pefile") + "/trunk@63",
+  },
 }
diff --git a/Source/ThirdParty/gyp/OWNERS b/Source/ThirdParty/gyp/OWNERS
new file mode 100644 (file)
index 0000000..72e8ffc
--- /dev/null
@@ -0,0 +1 @@
+*
index 4c99288..6523566 100755 (executable)
-# Copyright 2010, Google Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-#     * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#     * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-#     * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-EXCLUDED_PATHS = ()
+# Copyright (c) 2012 Google Inc. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+
+"""Top-level presubmit script for GYP.
+
+See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
+for more details about the presubmit API built into gcl.
+"""
+
+
+PYLINT_BLACKLIST = [
+    # TODO: fix me.
+    # From SCons, not done in google style.
+    'test/lib/TestCmd.py',
+    'test/lib/TestCommon.py',
+    'test/lib/TestGyp.py',
+    # Needs style fix.
+    'pylib/gyp/generator/scons.py',
+    'pylib/gyp/generator/xcode.py',
+]
+
+
+PYLINT_DISABLED_WARNINGS = [
+    # TODO: fix me.
+    # Many tests include modules they don't use.
+    'W0611',
+    # Include order doesn't properly include local files?
+    'F0401',
+    # Some use of built-in names.
+    'W0622',
+    # Some unused variables.
+    'W0612',
+    # Operator not preceded/followed by space.
+    'C0323',
+    'C0322',
+    # Unnecessary semicolon.
+    'W0301',
+    # Unused argument.
+    'W0613',
+    # String has no effect (docstring in wrong place).
+    'W0105',
+    # Comma not followed by space.
+    'C0324',
+    # Access to a protected member.
+    'W0212',
+    # Bad indent.
+    'W0311',
+    # Line too long.
+    'C0301',
+    # Undefined variable.
+    'E0602',
+    # Not exception type specified.
+    'W0702',
+    # No member of that name.
+    'E1101',
+    # Dangerous default {}.
+    'W0102',
+    # Others, too many to sort.
+    'W0201', 'W0232', 'E1103', 'W0621', 'W0108', 'W0223', 'W0231',
+    'R0201', 'E0101', 'C0321',
+    # ************* Module copy
+    # W0104:427,12:_test.odict.__setitem__: Statement seems to have no effect
+    'W0104',
+]
 
 
 def CheckChangeOnUpload(input_api, output_api):
   report = []
-  black_list = input_api.DEFAULT_BLACK_LIST + EXCLUDED_PATHS
-  sources = lambda x: input_api.FilterSourceFile(x, black_list=black_list)
-  report.extend(input_api.canned_checks.CheckChangeSvnEolStyle(
-      input_api, output_api, sources))
+  report.extend(input_api.canned_checks.PanProjectChecks(
+      input_api, output_api))
   return report
 
 
 def CheckChangeOnCommit(input_api, output_api):
   report = []
-  black_list = input_api.DEFAULT_BLACK_LIST + EXCLUDED_PATHS
-  sources = lambda x: input_api.FilterSourceFile(x, black_list=black_list)
-  report.extend(input_api.canned_checks.CheckChangeSvnEolStyle(
-      input_api, output_api, sources))
+
+  # Accept any year number from 2009 to the current year.
+  current_year = int(input_api.time.strftime('%Y'))
+  allowed_years = (str(s) for s in reversed(xrange(2009, current_year + 1)))
+  years_re = '(' + '|'.join(allowed_years) + ')'
+
+  # The (c) is deprecated, but tolerate it until it's removed from all files.
+  license = (
+      r'.*? Copyright (\(c\) )?%(year)s Google Inc\. All rights reserved\.\n'
+      r'.*? Use of this source code is governed by a BSD-style license that '
+        r'can be\n'
+      r'.*? found in the LICENSE file\.\n'
+  ) % {
+      'year': years_re,
+  }
+
+  report.extend(input_api.canned_checks.PanProjectChecks(
+      input_api, output_api, license_header=license))
   report.extend(input_api.canned_checks.CheckTreeIsOpen(
       input_api, output_api,
       'http://gyp-status.appspot.com/status',
       'http://gyp-status.appspot.com/current'))
+
+  import sys
+  old_sys_path = sys.path
+  try:
+    sys.path = ['pylib', 'test/lib'] + sys.path
+    report.extend(input_api.canned_checks.RunPylint(
+        input_api,
+        output_api,
+        black_list=PYLINT_BLACKLIST,
+        disabled_warnings=PYLINT_DISABLED_WARNINGS))
+  finally:
+    sys.path = old_sys_path
   return report
+
+
+def GetPreferredTrySlaves():
+  return ['gyp-win32', 'gyp-win64', 'gyp-linux', 'gyp-mac', 'gyp-android']
index 9eed075..558b740 100644 (file)
@@ -1 +1 @@
-This directory is a copy of http://gyp.googlecode.com/svn/trunk/ at revision 903.
+This directory is a copy of http://gyp.googlecode.com/svn/trunk/ at revision 1605.
diff --git a/Source/ThirdParty/gyp/buildbot/buildbot_run.py b/Source/ThirdParty/gyp/buildbot/buildbot_run.py
new file mode 100644 (file)
index 0000000..5da386f
--- /dev/null
@@ -0,0 +1,150 @@
+#!/usr/bin/env python
+# Copyright (c) 2012 Google Inc. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+
+"""Argument-less script to select what to run on the buildbots."""
+
+
+import os
+import shutil
+import subprocess
+import sys
+
+
+if sys.platform in ['win32', 'cygwin']:
+  EXE_SUFFIX = '.exe'
+else:
+  EXE_SUFFIX = ''
+
+
+BUILDBOT_DIR = os.path.dirname(os.path.abspath(__file__))
+TRUNK_DIR = os.path.dirname(BUILDBOT_DIR)
+ROOT_DIR = os.path.dirname(TRUNK_DIR)
+ANDROID_DIR = os.path.join(ROOT_DIR, 'android')
+OUT_DIR = os.path.join(TRUNK_DIR, 'out')
+
+
+def CallSubProcess(*args, **kwargs):
+  """Wrapper around subprocess.call which treats errors as build exceptions."""
+  retcode = subprocess.call(*args, **kwargs)
+  if retcode != 0:
+    print '@@@STEP_EXCEPTION@@@'
+    sys.exit(1)
+
+
+def PrepareAndroidTree():
+  """Prepare an Android tree to run 'android' format tests."""
+  if os.environ['BUILDBOT_CLOBBER'] == '1':
+    print '@@@BUILD_STEP Clobber Android checkout@@@'
+    shutil.rmtree(ANDROID_DIR)
+
+  # The release of Android we use is static, so there's no need to do anything
+  # if the directory already exists.
+  if os.path.isdir(ANDROID_DIR):
+    return
+
+  print '@@@BUILD_STEP Initialize Android checkout@@@'
+  os.mkdir(ANDROID_DIR)
+  CallSubProcess(['git', 'config', '--global', 'user.name', 'trybot'])
+  CallSubProcess(['git', 'config', '--global',
+                  'user.email', 'chrome-bot@google.com'])
+  CallSubProcess(['git', 'config', '--global', 'color.ui', 'false'])
+  CallSubProcess(
+      ['repo', 'init',
+       '-u', 'https://android.googlesource.com/platform/manifest',
+       '-b', 'android-4.2.1_r1',
+       '-g', 'all,-notdefault,-device,-darwin,-mips,-x86'],
+      cwd=ANDROID_DIR)
+
+  print '@@@BUILD_STEP Sync Android@@@'
+  CallSubProcess(['repo', 'sync', '-j4'], cwd=ANDROID_DIR)
+
+  print '@@@BUILD_STEP Build Android@@@'
+  CallSubProcess(
+      ['/bin/bash',
+       '-c', 'source build/envsetup.sh && lunch full-eng && make -j4'],
+      cwd=ANDROID_DIR)
+
+
+def GypTestFormat(title, format=None, msvs_version=None):
+  """Run the gyp tests for a given format, emitting annotator tags.
+
+  See annotator docs at:
+    https://sites.google.com/a/chromium.org/dev/developers/testing/chromium-build-infrastructure/buildbot-annotations
+  Args:
+    format: gyp format to test.
+  Returns:
+    0 for sucesss, 1 for failure.
+  """
+  if not format:
+    format = title
+
+  print '@@@BUILD_STEP ' + title + '@@@'
+  sys.stdout.flush()
+  env = os.environ.copy()
+  if msvs_version:
+    env['GYP_MSVS_VERSION'] = msvs_version
+  command = ' '.join(
+      [sys.executable, 'trunk/gyptest.py',
+       '--all',
+       '--passed',
+       '--format', format,
+       '--chdir', 'trunk',
+       '--path', '../scons'])
+  if format == 'android':
+    # gyptest needs the environment setup from envsetup/lunch in order to build
+    # using the 'android' backend, so this is done in a single shell.
+    retcode = subprocess.call(
+        ['/bin/bash',
+         '-c', 'source build/envsetup.sh && lunch full-eng && cd %s && %s'
+         % (ROOT_DIR, command)],
+        cwd=ANDROID_DIR, env=env)
+  else:
+    retcode = subprocess.call(command, cwd=ROOT_DIR, env=env, shell=True)
+  if retcode:
+    # Emit failure tag, and keep going.
+    print '@@@STEP_FAILURE@@@'
+    return 1
+  return 0
+
+
+def GypBuild():
+  # Dump out/ directory.
+  print '@@@BUILD_STEP cleanup@@@'
+  print 'Removing %s...' % OUT_DIR
+  shutil.rmtree(OUT_DIR, ignore_errors=True)
+  print 'Done.'
+
+  retcode = 0
+  # The Android gyp bot runs on linux so this must be tested first.
+  if os.environ['BUILDBOT_BUILDERNAME'] == 'gyp-android':
+    PrepareAndroidTree()
+    retcode += GypTestFormat('android')
+  elif sys.platform.startswith('linux'):
+    retcode += GypTestFormat('ninja')
+    retcode += GypTestFormat('scons')
+    retcode += GypTestFormat('make')
+  elif sys.platform == 'darwin':
+    retcode += GypTestFormat('ninja')
+    retcode += GypTestFormat('xcode')
+    retcode += GypTestFormat('make')
+  elif sys.platform == 'win32':
+    retcode += GypTestFormat('ninja')
+    retcode += GypTestFormat('msvs-2008', format='msvs', msvs_version='2008')
+    if os.environ['BUILDBOT_BUILDERNAME'] == 'gyp-win64':
+      retcode += GypTestFormat('msvs-2010', format='msvs', msvs_version='2010')
+  else:
+    raise Exception('Unknown platform')
+  if retcode:
+    # TODO(bradnelson): once the annotator supports a postscript (section for
+    #     after the build proper that could be used for cumulative failures),
+    #     use that instead of this. This isolates the final return value so
+    #     that it isn't misattributed to the last stage.
+    print '@@@BUILD_STEP failures@@@'
+    sys.exit(retcode)
+
+
+if __name__ == '__main__':
+  GypBuild()
diff --git a/Source/ThirdParty/gyp/data/win/large-pdb-shim.cc b/Source/ThirdParty/gyp/data/win/large-pdb-shim.cc
new file mode 100644 (file)
index 0000000..8bca510
--- /dev/null
@@ -0,0 +1,12 @@
+// Copyright (c) 2013 Google Inc. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// This file is used to generate an empty .pdb -- with a 4KB pagesize -- that is
+// then used during the final link for modules that have large PDBs. Otherwise,
+// the linker will generate a pdb with a page size of 1KB, which imposes a limit
+// of 1GB on the .pdb. By generating an initial empty .pdb with the compiler
+// (rather than the linker), this limit is avoided. With this in place PDBs may
+// grow to 2GB.
+//
+// This file is referenced by the msvs_large_pdb mechanism in MSVSUtil.py.
index d9677db..efa75a7 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 
-# Copyright (c) 2009 Google Inc. All rights reserved.
+# Copyright (c) 2012 Google Inc. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
 
@@ -153,6 +153,8 @@ def main(argv=None):
             help="chdir to the specified directory")
   parser.add_option("-f", "--format", action="store", default='',
             help="run tests with the specified formats")
+  parser.add_option("-G", '--gyp_option', action="append", default=[],
+            help="Add -G options to the gyp command line")
   parser.add_option("-l", "--list", action="store_true",
             help="list available tests and exit")
   parser.add_option("-n", "--no-exec", action="store_true",
@@ -169,7 +171,9 @@ def main(argv=None):
     os.chdir(opts.chdir)
 
   if opts.path:
-    os.environ['PATH'] += ':' + ':'.join(opts.path)
+    extra_path = [os.path.abspath(p) for p in opts.path]
+    extra_path = os.pathsep.join(extra_path)
+    os.environ['PATH'] += os.pathsep + extra_path
 
   if not args:
     if not opts.all:
@@ -205,22 +209,30 @@ def main(argv=None):
     format_list = opts.format.split(',')
   else:
     # TODO:  not duplicate this mapping from pylib/gyp/__init__.py
-    format_list = [ {
-      'freebsd7': 'make',
-      'freebsd8': 'make',
-      'cygwin':   'msvs',
-      'win32':    'msvs',
-      'linux2':   'make',
-      'darwin':   'xcode',
-    }[sys.platform] ]
+    format_list = {
+      'freebsd7': ['make'],
+      'freebsd8': ['make'],
+      'openbsd5': ['make'],
+      'cygwin':   ['msvs'],
+      'win32':    ['msvs', 'ninja'],
+      'linux2':   ['make', 'ninja'],
+      'linux3':   ['make', 'ninja'],
+      'darwin':   ['make', 'ninja', 'xcode'],
+    }[sys.platform]
 
   for format in format_list:
     os.environ['TESTGYP_FORMAT'] = format
     if not opts.quiet:
       sys.stdout.write('TESTGYP_FORMAT=%s\n' % format)
 
+    gyp_options = []
+    for option in opts.gyp_option:
+      gyp_options += ['-G', option]
+    if gyp_options and not opts.quiet:
+      sys.stdout.write('Extra Gyp options: %s\n' % gyp_options)
+
     for test in tests:
-      status = cr.run([sys.executable, test],
+      status = cr.run([sys.executable, test] + gyp_options,
                       stdout=sys.stdout,
                       stderr=sys.stderr)
       if status == 2:
index 1277d4a..253fe61 100644 (file)
@@ -1,12 +1,9 @@
-#!/usr/bin/python2.4
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
+# Copyright (c) 2012 Google Inc. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
 
 """New implementation of Visual Studio project generation for SCons."""
 
-import common
 import os
 import random
 
@@ -62,7 +59,13 @@ def MakeGuid(name, seed='msvs_new'):
 #------------------------------------------------------------------------------
 
 
-class MSVSFolder:
+class MSVSSolutionEntry(object):
+  def __cmp__(self, other):
+    # Sort by name then guid (so things are in order on vs2008).
+    return cmp((self.name, self.get_guid()), (other.name, other.get_guid()))
+
+
+class MSVSFolder(MSVSSolutionEntry):
   """Folder in a Visual Studio project or solution."""
 
   def __init__(self, path, name = None, entries = None,
@@ -88,7 +91,7 @@ class MSVSFolder:
     self.guid = guid
 
     # Copy passed lists (or set to empty lists)
-    self.entries = list(entries or [])
+    self.entries = sorted(list(entries or []))
     self.items = list(items or [])
 
     self.entry_type_guid = ENTRY_TYPE_GUIDS['folder']
@@ -103,7 +106,7 @@ class MSVSFolder:
 #------------------------------------------------------------------------------
 
 
-class MSVSProject:
+class MSVSProject(MSVSSolutionEntry):
   """Visual Studio project."""
 
   def __init__(self, path, name = None, dependencies = None, guid = None,
@@ -141,10 +144,11 @@ class MSVSProject:
     else:
       self.config_platform_overrides = {}
     self.fixpath_prefix = fixpath_prefix
+    self.msbuild_toolset = None
 
   def set_dependencies(self, dependencies):
     self.dependencies = list(dependencies or [])
-  
+
   def get_guid(self):
     if self.guid is None:
       # Set GUID from path
@@ -162,6 +166,9 @@ class MSVSProject:
       self.guid = MakeGuid(self.name)
     return self.guid
 
+  def set_msbuild_toolset(self, msbuild_toolset):
+    self.msbuild_toolset = msbuild_toolset
+
 #------------------------------------------------------------------------------
 
 
@@ -206,41 +213,29 @@ class MSVSSolution:
     self.Write()
 
 
-  def Write(self, writer=common.WriteOnDiff):
+  def Write(self, writer=gyp.common.WriteOnDiff):
     """Writes the solution file to disk.
 
     Raises:
       IndexError: An entry appears multiple times.
     """
     # Walk the entry tree and collect all the folders and projects.
-    all_entries = []
+    all_entries = set()
     entries_to_check = self.entries[:]
     while entries_to_check:
-      # Pop from the beginning of the list to preserve the user's order.
       e = entries_to_check.pop(0)
 
-      # A project or folder can only appear once in the solution's folder tree.
-      # This also protects from cycles.
+      # If this entry has been visited, nothing to do.
       if e in all_entries:
-        #raise IndexError('Entry "%s" appears more than once in solution' %
-        #                 e.name)
         continue
 
-      all_entries.append(e)
+      all_entries.add(e)
 
       # If this is a folder, check its entries too.
       if isinstance(e, MSVSFolder):
         entries_to_check += e.entries
 
-    # Sort by name then guid (so things are in order on vs2008).
-    def NameThenGuid(a, b):
-      if a.name < b.name: return -1
-      if a.name > b.name: return 1
-      if a.get_guid() < b.get_guid(): return -1
-      if a.get_guid() > b.get_guid(): return 1
-      return 0
-
-    all_entries = sorted(all_entries, NameThenGuid)
+    all_entries = sorted(all_entries)
 
     # Open file and print header
     f = writer(self.path)
@@ -252,10 +247,13 @@ class MSVSSolution:
     sln_root = os.path.split(self.path)[0]
     for e in all_entries:
       relative_path = gyp.common.RelativePath(e.path, sln_root)
+      # msbuild does not accept an empty folder_name.
+      # use '.' in case relative_path is empty.
+      folder_name = relative_path.replace('/', '\\') or '.'
       f.write('Project("%s") = "%s", "%s", "%s"\r\n' % (
           e.entry_type_guid,          # Entry type GUID
           e.name,                     # Folder name
-          relative_path.replace('/', '\\'),  # Folder name (again)
+          folder_name,                # Folder name (again)
           e.get_guid(),               # Entry GUID
       ))
 
index 1246fdd..db1ceed 100644 (file)
@@ -1,14 +1,11 @@
-#!/usr/bin/python2.4
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
+# Copyright (c) 2012 Google Inc. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
 
 """Visual Studio project reader/writer."""
 
-import common
-import xml.dom
-import xml_fix
+import gyp.common
+import gyp.easy_xml as easy_xml
 
 #------------------------------------------------------------------------------
 
@@ -23,24 +20,16 @@ class Tool(object):
       name: Tool name.
       attrs: Dict of tool attributes; may be None.
     """
-    self.name = name
-    self.attrs = attrs or {}
+    self._attrs = attrs or {}
+    self._attrs['Name'] = name
 
-  def CreateElement(self, doc):
+  def _GetSpecification(self):
     """Creates an element for the tool.
 
-    Args:
-      doc: xml.dom.Document object to use for node creation.
-
     Returns:
       A new xml.dom.Element for the tool.
     """
-    node = doc.createElement('Tool')
-    node.setAttribute('Name', self.name)
-    for k, v in self.attrs.items():
-      node.setAttribute(k, v)
-    return node
-
+    return ['Tool', self._attrs]
 
 class Filter(object):
   """Visual Studio filter - that is, a virtual folder."""
@@ -62,24 +51,18 @@ class Filter(object):
 class Writer(object):
   """Visual Studio XML project writer."""
 
-  def __init__(self, project_path, version):
+  def __init__(self, project_path, version, name, guid=None, platforms=None):
     """Initializes the project.
 
     Args:
       project_path: Path to the project file.
       version: Format version to emit.
-    """
-    self.project_path = project_path
-    self.doc = None
-    self.version = version
-
-  def Create(self, name, guid=None, platforms=None):
-    """Creates the project document.
-
-    Args:
       name: Name of the project.
       guid: GUID to use for project, if not None.
+      platforms: Array of string, the supported platforms.  If null, ['Win32']
     """
+    self.project_path = project_path
+    self.version = version
     self.name = name
     self.guid = guid
 
@@ -87,46 +70,16 @@ class Writer(object):
     if not platforms:
       platforms = ['Win32']
 
-    # Create XML doc
-    xml_impl = xml.dom.getDOMImplementation()
-    self.doc = xml_impl.createDocument(None, 'VisualStudioProject', None)
-
-    # Add attributes to root element
-    self.n_root = self.doc.documentElement
-    self.n_root.setAttribute('ProjectType', 'Visual C++')
-    self.n_root.setAttribute('Version', self.version.ProjectVersion())
-    self.n_root.setAttribute('Name', self.name)
-    self.n_root.setAttribute('ProjectGUID', self.guid)
-    self.n_root.setAttribute('RootNamespace', self.name)
-    self.n_root.setAttribute('Keyword', 'Win32Proj')
-
-    # Add platform list
-    n_platform = self.doc.createElement('Platforms')
-    self.n_root.appendChild(n_platform)
+    # Initialize the specifications of the various sections.
+    self.platform_section = ['Platforms']
     for platform in platforms:
-      n = self.doc.createElement('Platform')
-      n.setAttribute('Name', platform)
-      n_platform.appendChild(n)
-
-    # Add tool files section
-    self.n_tool_files = self.doc.createElement('ToolFiles')
-    self.n_root.appendChild(self.n_tool_files)
-
-    # Add configurations section
-    self.n_configs = self.doc.createElement('Configurations')
-    self.n_root.appendChild(self.n_configs)
-
-    # Add empty References section
-    self.n_root.appendChild(self.doc.createElement('References'))
+      self.platform_section.append(['Platform', {'Name': platform}])
+    self.tool_files_section = ['ToolFiles']
+    self.configurations_section = ['Configurations']
+    self.files_section = ['Files']
 
-    # Add files section
-    self.n_files = self.doc.createElement('Files')
-    self.n_root.appendChild(self.n_files)
     # Keep a dict keyed on filename to speed up access.
-    self.n_files_dict = dict()
-
-    # Add empty Globals section
-    self.n_root.appendChild(self.doc.createElement('Globals'))
+    self.files_dict = dict()
 
   def AddToolFile(self, path):
     """Adds a tool file to the project.
@@ -134,20 +87,17 @@ class Writer(object):
     Args:
       path: Relative path from project to tool file.
     """
-    n_tool = self.doc.createElement('ToolFile')
-    n_tool.setAttribute('RelativePath', path)
-    self.n_tool_files.appendChild(n_tool)
+    self.tool_files_section.append(['ToolFile', {'RelativePath': path}])
 
-  def _AddConfigToNode(self, parent, config_type, config_name, attrs=None,
-                       tools=None):
-    """Adds a configuration to the parent node.
+  def _GetSpecForConfiguration(self, config_type, config_name, attrs, tools):
+    """Returns the specification for a configuration.
 
     Args:
-      parent: Destination node.
       config_type: Type of configuration node.
       config_name: Configuration name.
       attrs: Dict of configuration attributes; may be None.
       tools: List of tools (strings or Tool objects); may be None.
+    Returns:
     """
     # Handle defaults
     if not attrs:
@@ -156,19 +106,19 @@ class Writer(object):
       tools = []
 
     # Add configuration node and its attributes
-    n_config = self.doc.createElement(config_type)
-    n_config.setAttribute('Name', config_name)
-    for k, v in attrs.items():
-      n_config.setAttribute(k, v)
-    parent.appendChild(n_config)
+    node_attrs = attrs.copy()
+    node_attrs['Name'] = config_name
+    specification = [config_type, node_attrs]
 
     # Add tool nodes and their attributes
     if tools:
       for t in tools:
         if isinstance(t, Tool):
-          n_config.appendChild(t.CreateElement(self.doc))
+          specification.append(t._GetSpecification())
         else:
-          n_config.appendChild(Tool(t).CreateElement(self.doc))
+          specification.append(Tool(t)._GetSpecification())
+    return specification
+
 
   def AddConfig(self, name, attrs=None, tools=None):
     """Adds a configuration to the project.
@@ -178,7 +128,8 @@ class Writer(object):
       attrs: Dict of configuration attributes; may be None.
       tools: List of tools (strings or Tool objects); may be None.
     """
-    self._AddConfigToNode(self.n_configs, 'Configuration', name, attrs, tools)
+    spec = self._GetSpecForConfiguration('Configuration', name, attrs, tools)
+    self.configurations_section.append(spec)
 
   def _AddFilesToNode(self, parent, files):
     """Adds files and/or filters to the parent node.
@@ -191,14 +142,12 @@ class Writer(object):
     """
     for f in files:
       if isinstance(f, Filter):
-        node = self.doc.createElement('Filter')
-        node.setAttribute('Name', f.name)
+        node = ['Filter', {'Name': f.name}]
         self._AddFilesToNode(node, f.contents)
       else:
-        node = self.doc.createElement('File')
-        node.setAttribute('RelativePath', f)
-        self.n_files_dict[f] = node
-      parent.appendChild(node)
+        node = ['File', {'RelativePath': f}]
+        self.files_dict[f] = node
+      parent.append(node)
 
   def AddFiles(self, files):
     """Adds files to the project.
@@ -210,7 +159,7 @@ class Writer(object):
     later add files to a Filter object which was passed into a previous call
     to AddFiles(), it will not be reflected in this project.
     """
-    self._AddFilesToNode(self.n_files, files)
+    self._AddFilesToNode(self.files_section, files)
     # TODO(rspangler) This also doesn't handle adding files to an existing
     # filter.  That is, it doesn't merge the trees.
 
@@ -227,19 +176,33 @@ class Writer(object):
       ValueError: Relative path does not match any file added via AddFiles().
     """
     # Find the file node with the right relative path
-    parent = self.n_files_dict.get(path)
+    parent = self.files_dict.get(path)
     if not parent:
       raise ValueError('AddFileConfig: file "%s" not in project.' % path)
 
     # Add the config to the file node
-    self._AddConfigToNode(parent, 'FileConfiguration', config, attrs, tools)
+    spec = self._GetSpecForConfiguration('FileConfiguration', config, attrs,
+                                         tools)
+    parent.append(spec)
 
-  def Write(self, writer=common.WriteOnDiff):
+  def WriteIfChanged(self):
     """Writes the project file."""
-    f = writer(self.project_path)
-    fix = xml_fix.XmlFix()
-    self.doc.writexml(f, encoding='Windows-1252', addindent='  ', newl='\r\n')
-    fix.Cleanup()
-    f.close()
-
-#------------------------------------------------------------------------------
+    # First create XML content definition
+    content = [
+        'VisualStudioProject',
+        {'ProjectType': 'Visual C++',
+         'Version': self.version.ProjectVersion(),
+         'Name': self.name,
+         'ProjectGUID': self.guid,
+         'RootNamespace': self.name,
+         'Keyword': 'Win32Proj'
+        },
+        self.platform_section,
+        self.tool_files_section,
+        self.configurations_section,
+        ['References'],  # empty section
+        self.files_section,
+        ['Globals']  # empty section
+    ]
+    easy_xml.WriteXmlIfChanged(content, self.project_path,
+                               encoding="Windows-1252")
index 5b79dd5..d0d4990 100644 (file)
@@ -1,13 +1,11 @@
-#!/usr/bin/python
-
-# Copyright (c) 2011 Google Inc. All rights reserved.
+# Copyright (c) 2012 Google Inc. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
 
-""" Code to validate and convert settings of the Microsoft build tools.
+"""Code to validate and convert settings of the Microsoft build tools.
 
 This file contains code to validate and convert settings of the Microsoft
-build tools.  The function ConvertToMsBuildSettings(), ValidateMSVSSettings(),
+build tools.  The function ConvertToMSBuildSettings(), ValidateMSVSSettings(),
 and ValidateMSBuildSettings() are the entry points.
 
 This file was created by comparing the projects created by Visual Studio 2008
@@ -17,7 +15,7 @@ MSBuild install directory, e.g. c:\Program Files (x86)\MSBuild
 """
 
 import sys
-
+import re
 
 # Dictionaries of settings validators. The key is the tool name, the value is
 # a dictionary mapping setting names to validation functions.
@@ -34,111 +32,151 @@ _msvs_to_msbuild_converters = {}
 _msbuild_name_of_tool = {}
 
 
-def _AddTool(names):
-  """ Adds a tool to the four dictionaries used to process settings.
+class _Tool(object):
+  """Represents a tool used by MSVS or MSBuild.
+
+  Attributes:
+      msvs_name: The name of the tool in MSVS.
+      msbuild_name: The name of the tool in MSBuild.
+  """
+
+  def __init__(self, msvs_name, msbuild_name):
+    self.msvs_name = msvs_name
+    self.msbuild_name = msbuild_name
+
+
+def _AddTool(tool):
+  """Adds a tool to the four dictionaries used to process settings.
 
   This only defines the tool.  Each setting also needs to be added.
 
   Args:
-    names: a dictionary of the MSVS and MSBuild names of this tool.
+    tool: The _Tool object to be added.
   """
-  msvs_name = names['msvs']
-  msbuild_name = names['msbuild']
-  _msvs_validators[msvs_name] = {}
-  _msbuild_validators[msbuild_name] = {}
-  _msvs_to_msbuild_converters[msvs_name] = {}
-  _msbuild_name_of_tool[msvs_name] = msbuild_name
-
+  _msvs_validators[tool.msvs_name] = {}
+  _msbuild_validators[tool.msbuild_name] = {}
+  _msvs_to_msbuild_converters[tool.msvs_name] = {}
+  _msbuild_name_of_tool[tool.msvs_name] = tool.msbuild_name
 
-def _GetMsBuildToolSettings(msbuild_settings, tool):
-  """ Returns an MSBuild tool dictionary.  Creates it if needed. """
-  tool_name = tool['msbuild']
-  return _GetOrCreateSubDictionary(msbuild_settings, tool_name)
 
+def _GetMSBuildToolSettings(msbuild_settings, tool):
+  """Returns an MSBuild tool dictionary.  Creates it if needed."""
+  return msbuild_settings.setdefault(tool.msbuild_name, {})
 
-def _GetOrCreateSubDictionary(dict, name):
-  """ Returns or creates one of the sub-dictionary of dict. """
-  if not name in dict:
-    dict[name] = {}
-  return dict[name]
 
+class _Type(object):
+  """Type of settings (Base class)."""
 
-class _Type:
-  """ Type of settings (Base class). """
   def ValidateMSVS(self, value):
-    """ Raises ValueError if value is not valid for MSVS. """
-    pass
+    """Verifies that the value is legal for MSVS.
+
+    Args:
+      value: the value to check for this type.
+
+    Raises:
+      ValueError if value is not valid for MSVS.
+    """
+
   def ValidateMSBuild(self, value):
-    """ Raises ValueError if value is not valid for MSBuild. """
-    pass
+    """Verifies that the value is legal for MSBuild.
+
+    Args:
+      value: the value to check for this type.
+
+    Raises:
+      ValueError if value is not valid for MSBuild.
+    """
+
   def ConvertToMSBuild(self, value):
-    """ Returns the MSBuild equivalent of the MSVS value given.
+    """Returns the MSBuild equivalent of the MSVS value given.
+
+    Args:
+      value: the MSVS value to convert.
+
+    Returns:
+      the MSBuild equivalent.
 
-    Raises ValueError if value is not valid.
+    Raises:
+      ValueError if value is not valid.
     """
     return value
 
 
 class _String(_Type):
-  """ A setting that's just a string. """
+  """A setting that's just a string."""
+
   def ValidateMSVS(self, value):
-    if not isinstance(value, str):
-      raise ValueError
+    if not isinstance(value, basestring):
+      raise ValueError('expected string; got %r' % value)
+
   def ValidateMSBuild(self, value):
-    if not isinstance(value, str):
-      raise ValueError
+    if not isinstance(value, basestring):
+      raise ValueError('expected string; got %r' % value)
+
   def ConvertToMSBuild(self, value):
     # Convert the macros
-    return _ConvertVCMacrosToMsBuild(value)
+    return ConvertVCMacrosToMSBuild(value)
 
 
 class _StringList(_Type):
-  """ A settings that's a list of strings. """
+  """A settings that's a list of strings."""
+
   def ValidateMSVS(self, value):
-    if not isinstance(value, str) and not isinstance(value, list):
-      raise ValueError
+    if not isinstance(value, basestring) and not isinstance(value, list):
+      raise ValueError('expected string list; got %r' % value)
+
   def ValidateMSBuild(self, value):
-    if not isinstance(value, str) and not isinstance(value, list):
-      raise ValueError
+    if not isinstance(value, basestring) and not isinstance(value, list):
+      raise ValueError('expected string list; got %r' % value)
+
   def ConvertToMSBuild(self, value):
     # Convert the macros
     if isinstance(value, list):
-      return [_ConvertVCMacrosToMsBuild(i) for i in value]
+      return [ConvertVCMacrosToMSBuild(i) for i in value]
     else:
-      return _ConvertVCMacrosToMsBuild(value)
+      return ConvertVCMacrosToMSBuild(value)
 
 
 class _Boolean(_Type):
-  """ Boolean settings, can have the values 'false' or 'true'. """
+  """Boolean settings, can have the values 'false' or 'true'."""
+
   def _Validate(self, value):
     if value != 'true' and value != 'false':
-      raise ValueError
+      raise ValueError('expected bool; got %r' % value)
+
   def ValidateMSVS(self, value):
     self._Validate(value)
+
   def ValidateMSBuild(self, value):
     self._Validate(value)
+
   def ConvertToMSBuild(self, value):
     self._Validate(value)
     return value
 
 
 class _Integer(_Type):
-  """ Integer settings. """
+  """Integer settings."""
+
   def __init__(self, msbuild_base=10):
-    self.msbuild_base = msbuild_base
+    _Type.__init__(self)
+    self._msbuild_base = msbuild_base
+
   def ValidateMSVS(self, value):
     # Try to convert, this will raise ValueError if invalid.
     self.ConvertToMSBuild(value)
+
   def ValidateMSBuild(self, value):
     # Try to convert, this will raise ValueError if invalid.
-    int(value, self.msbuild_base)
+    int(value, self._msbuild_base)
+
   def ConvertToMSBuild(self, value):
-    format = (self.msbuild_base == 10) and '%d' or '0x%04x'
-    return format % int(value)
+    msbuild_format = (self._msbuild_base == 10) and '%d' or '0x%04x'
+    return msbuild_format % int(value)
 
 
 class _Enumeration(_Type):
-  """ Type of settings that is an enumeration.
+  """Type of settings that is an enumeration.
 
   In MSVS, the values are indexes like '0', '1', and '2'.
   MSBuild uses text labels that are more representative, like 'Win32'.
@@ -149,27 +187,31 @@ class _Enumeration(_Type):
         used in the array to indicate the unused spot.
     new: an array of labels that are new to MSBuild.
   """
-  def __init__(self, label_list, new=[]):
-    self.label_list = label_list
-    self.msbuild_values = set()
-    for value in label_list:
-      if not value is None:
-        self.msbuild_values.add(value)
-    for value in new:
-      self.msbuild_values.add(value)
+
+  def __init__(self, label_list, new=None):
+    _Type.__init__(self)
+    self._label_list = label_list
+    self._msbuild_values = set(value for value in label_list
+                               if value is not None)
+    if new is not None:
+      self._msbuild_values.update(new)
+
   def ValidateMSVS(self, value):
     # Try to convert.  It will raise an exception if not valid.
     self.ConvertToMSBuild(value)
+
   def ValidateMSBuild(self, value):
-    if not value in self.msbuild_values:
-      raise ValueError
+    if value not in self._msbuild_values:
+      raise ValueError('unrecognized enumerated value %s' % value)
+
   def ConvertToMSBuild(self, value):
     index = int(value)
-    if index < 0 or index >= len(self.label_list):
-      raise ValueError
-    label = self.label_list[index]
+    if index < 0 or index >= len(self._label_list):
+      raise ValueError('index value (%d) not in expected range [0, %d)' %
+                       (index, len(self._label_list)))
+    label = self._label_list[index]
     if label is None:
-      raise ValueError
+      raise ValueError('converted value for %s not specified.' % value)
     return label
 
 
@@ -188,162 +230,187 @@ _string_list = _StringList()
 _newly_boolean = _Enumeration(['', 'false', 'true'])
 
 
-def _Same(tool, name, type):
-  """ Defines a setting that has the same name in MSVS and MSBuild.
+def _Same(tool, name, setting_type):
+  """Defines a setting that has the same name in MSVS and MSBuild.
 
   Args:
     tool: a dictionary that gives the names of the tool for MSVS and MSBuild.
     name: the name of the setting.
-    type: the type of this setting.
+    setting_type: the type of this setting.
   """
-  _Renamed(tool, name, name, type)
+  _Renamed(tool, name, name, setting_type)
 
 
-def _Renamed(tool, msvs_name, msbuild_name, type):
-  """ Defines a setting for which the name has changed.
+def _Renamed(tool, msvs_name, msbuild_name, setting_type):
+  """Defines a setting for which the name has changed.
 
   Args:
     tool: a dictionary that gives the names of the tool for MSVS and MSBuild.
     msvs_name: the name of the MSVS setting.
     msbuild_name: the name of the MSBuild setting.
-    type: the type of this setting.
+    setting_type: the type of this setting.
   """
+
   def _Translate(value, msbuild_settings):
-    msbuild_tool_settings = _GetMsBuildToolSettings(msbuild_settings, tool)
-    msbuild_tool_settings[msbuild_name] = type.ConvertToMSBuild(value)
-  msvs_tool_name = tool['msvs']
-  msbuild_tool_name = tool['msbuild']
-  _msvs_validators[msvs_tool_name][msvs_name] = type.ValidateMSVS
-  _msbuild_validators[msbuild_tool_name][msbuild_name] = type.ValidateMSBuild
-  _msvs_to_msbuild_converters[msvs_tool_name][msvs_name] = _Translate
+    msbuild_tool_settings = _GetMSBuildToolSettings(msbuild_settings, tool)
+    msbuild_tool_settings[msbuild_name] = setting_type.ConvertToMSBuild(value)
 
+  _msvs_validators[tool.msvs_name][msvs_name] = setting_type.ValidateMSVS
+  _msbuild_validators[tool.msbuild_name][msbuild_name] = (
+      setting_type.ValidateMSBuild)
+  _msvs_to_msbuild_converters[tool.msvs_name][msvs_name] = _Translate
 
-def _Moved(tool, settings_name, msbuild_tool_name, type):
-    _MovedAndRenamed(tool, settings_name, msbuild_tool_name, settings_name,
-                     type)
+
+def _Moved(tool, settings_name, msbuild_tool_name, setting_type):
+  _MovedAndRenamed(tool, settings_name, msbuild_tool_name, settings_name,
+                   setting_type)
 
 
 def _MovedAndRenamed(tool, msvs_settings_name, msbuild_tool_name,
-                     msbuild_settings_name, type):
-  """ Defines a setting that may have moved to a new section.
+                     msbuild_settings_name, setting_type):
+  """Defines a setting that may have moved to a new section.
 
   Args:
     tool: a dictionary that gives the names of the tool for MSVS and MSBuild.
     msvs_settings_name: the MSVS name of the setting.
     msbuild_tool_name: the name of the MSBuild tool to place the setting under.
     msbuild_settings_name: the MSBuild name of the setting.
-    type: the type of this setting.
+    setting_type: the type of this setting.
   """
+
   def _Translate(value, msbuild_settings):
-    tool_settings = _GetOrCreateSubDictionary(msbuild_settings,
-                                              msbuild_tool_name)
-    tool_settings[msbuild_settings_name] = type.ConvertToMSBuild(value)
-  msvs_tool_name = tool['msvs']
-  _msvs_validators[msvs_tool_name][msvs_settings_name] = type.ValidateMSVS
-  validator = type.ValidateMSBuild
+    tool_settings = msbuild_settings.setdefault(msbuild_tool_name, {})
+    tool_settings[msbuild_settings_name] = setting_type.ConvertToMSBuild(value)
+
+  _msvs_validators[tool.msvs_name][msvs_settings_name] = (
+      setting_type.ValidateMSVS)
+  validator = setting_type.ValidateMSBuild
   _msbuild_validators[msbuild_tool_name][msbuild_settings_name] = validator
-  _msvs_to_msbuild_converters[msvs_tool_name][msvs_settings_name] = _Translate
+  _msvs_to_msbuild_converters[tool.msvs_name][msvs_settings_name] = _Translate
 
 
-def _MSVSOnly(tool, name, type):
-  """ Defines a setting that is only found in MSVS.
+def _MSVSOnly(tool, name, setting_type):
+  """Defines a setting that is only found in MSVS.
 
   Args:
     tool: a dictionary that gives the names of the tool for MSVS and MSBuild.
     name: the name of the setting.
-    type: the type of this setting.
+    setting_type: the type of this setting.
   """
-  def _Translate(value, msbuild_settings):
+
+  def _Translate(unused_value, unused_msbuild_settings):
+    # Since this is for MSVS only settings, no translation will happen.
     pass
-  msvs_tool_name = tool['msvs']
-  _msvs_validators[msvs_tool_name][name] = type.ValidateMSVS
-  _msvs_to_msbuild_converters[msvs_tool_name][name] = _Translate
+
+  _msvs_validators[tool.msvs_name][name] = setting_type.ValidateMSVS
+  _msvs_to_msbuild_converters[tool.msvs_name][name] = _Translate
 
 
-def _MSBuildOnly(tool, name, type):
-  """ Defines a setting that is only found in MSBuild.
+def _MSBuildOnly(tool, name, setting_type):
+  """Defines a setting that is only found in MSBuild.
 
   Args:
     tool: a dictionary that gives the names of the tool for MSVS and MSBuild.
     name: the name of the setting.
-    type: the type of this setting.
+    setting_type: the type of this setting.
   """
-  msbuild_tool_name = tool['msbuild']
-  _msbuild_validators[msbuild_tool_name][name] = type.ValidateMSBuild
+  _msbuild_validators[tool.msbuild_name][name] = setting_type.ValidateMSBuild
 
 
 def _ConvertedToAdditionalOption(tool, msvs_name, flag):
-  """ Defines a setting that's handled via a command line option in MSBuild.
+  """Defines a setting that's handled via a command line option in MSBuild.
 
   Args:
     tool: a dictionary that gives the names of the tool for MSVS and MSBuild.
     msvs_name: the name of the MSVS setting that if 'true' becomes a flag
     flag: the flag to insert at the end of the AdditionalOptions
   """
+
   def _Translate(value, msbuild_settings):
     if value == 'true':
-      tool_settings = _GetMsBuildToolSettings(msbuild_settings, tool)
+      tool_settings = _GetMSBuildToolSettings(msbuild_settings, tool)
       if 'AdditionalOptions' in tool_settings:
-        new_flags = "%s %s" % (tool_settings['AdditionalOptions'], flag)
+        new_flags = '%s %s' % (tool_settings['AdditionalOptions'], flag)
       else:
         new_flags = flag
       tool_settings['AdditionalOptions'] = new_flags
-  msvs_tool_name = tool['msvs']
-  _msvs_validators[msvs_tool_name][msvs_name] = _boolean.ValidateMSVS
-  _msvs_to_msbuild_converters[msvs_tool_name][msvs_name] = _Translate
+  _msvs_validators[tool.msvs_name][msvs_name] = _boolean.ValidateMSVS
+  _msvs_to_msbuild_converters[tool.msvs_name][msvs_name] = _Translate
 
 
 def _CustomGeneratePreprocessedFile(tool, msvs_name):
   def _Translate(value, msbuild_settings):
-      tool_settings = _GetMsBuildToolSettings(msbuild_settings, tool)
-      if value == '0':
-        tool_settings['PreprocessToFile'] = 'false'
-        tool_settings['PreprocessSuppressLineNumbers'] = 'false'
-      elif value == '1':  # /P
-        tool_settings['PreprocessToFile'] = 'true'
-        tool_settings['PreprocessSuppressLineNumbers'] = 'false'
-      elif value == '2':  # /EP /P
-        tool_settings['PreprocessToFile'] = 'true'
-        tool_settings['PreprocessSuppressLineNumbers'] = 'true'
-      else:
-        raise ValueError
-  msvs_tool_name = tool['msvs']
+    tool_settings = _GetMSBuildToolSettings(msbuild_settings, tool)
+    if value == '0':
+      tool_settings['PreprocessToFile'] = 'false'
+      tool_settings['PreprocessSuppressLineNumbers'] = 'false'
+    elif value == '1':  # /P
+      tool_settings['PreprocessToFile'] = 'true'
+      tool_settings['PreprocessSuppressLineNumbers'] = 'false'
+    elif value == '2':  # /EP /P
+      tool_settings['PreprocessToFile'] = 'true'
+      tool_settings['PreprocessSuppressLineNumbers'] = 'true'
+    else:
+      raise ValueError('value must be one of [0, 1, 2]; got %s' % value)
   # Create a bogus validator that looks for '0', '1', or '2'
   msvs_validator = _Enumeration(['a', 'b', 'c']).ValidateMSVS
-  _msvs_validators[msvs_tool_name][msvs_name] = msvs_validator
+  _msvs_validators[tool.msvs_name][msvs_name] = msvs_validator
   msbuild_validator = _boolean.ValidateMSBuild
-  msbuild_tool_validators = _msbuild_validators[tool['msbuild']]
+  msbuild_tool_validators = _msbuild_validators[tool.msbuild_name]
   msbuild_tool_validators['PreprocessToFile'] = msbuild_validator
   msbuild_tool_validators['PreprocessSuppressLineNumbers'] = msbuild_validator
-  _msvs_to_msbuild_converters[msvs_tool_name][msvs_name] = _Translate
-
-
-def _ConvertVCMacrosToMsBuild(s):
-  if (s.find('$') >= 0):
-    s = s.replace('$(ConfigurationName)', '$(Configuration)')
-    s = s.replace('$(InputDir)', '%(RootDir)%(Directory)')
-    s = s.replace('$(InputExt)', '%(Extension)')
-    s = s.replace('$(InputFileName)', '%(Filename)%(Extension)')
-    s = s.replace('$(InputName)', '%(Filename)')
-    s = s.replace('$(InputPath)', '%(FullPath)')
-    s = s.replace('$(ParentName)', '$(ProjectFileName)')
-    s = s.replace('$(PlatformName)', '$(Platform)')
-    s = s.replace('$(SafeInputName)', '%(Filename)')
-
-    s = s.replace('$(IntDir)\\', '$(IntDir)')
-    s = s.replace('$(OutDir)\\', '$(OutDir)')
-    s = s.replace('$(IntDir)/', '$(IntDir)')
-    s = s.replace('$(OutDir)/', '$(OutDir)')
+  _msvs_to_msbuild_converters[tool.msvs_name][msvs_name] = _Translate
+
+
+fix_vc_macro_slashes_regex_list = ('IntDir', 'OutDir')
+fix_vc_macro_slashes_regex = re.compile(
+  r'(\$\((?:%s)\))(?:[\\/]+)' % "|".join(fix_vc_macro_slashes_regex_list)
+)
+
+def FixVCMacroSlashes(s):
+  """Replace macros which have excessive following slashes.
+
+  These macros are known to have a built-in trailing slash. Furthermore, many
+  scripts hiccup on processing paths with extra slashes in the middle.
+
+  This list is probably not exhaustive.  Add as needed.
+  """
+  if '$' in s:
+    s = fix_vc_macro_slashes_regex.sub(r'\1', s)
   return s
 
 
-def ConvertToMsBuildSettings(msvs_settings, stderr=sys.stderr):
-  """ Converts MSVS settings (VS2008 and earlier) to MSBuild settings (VS2010+).
+def ConvertVCMacrosToMSBuild(s):
+  """Convert the the MSVS macros found in the string to the MSBuild equivalent.
+
+  This list is probably not exhaustive.  Add as needed.
+  """
+  if '$' in s:
+    replace_map = {
+        '$(ConfigurationName)': '$(Configuration)',
+        '$(InputDir)': '%(RootDir)%(Directory)',
+        '$(InputExt)': '%(Extension)',
+        '$(InputFileName)': '%(Filename)%(Extension)',
+        '$(InputName)': '%(Filename)',
+        '$(InputPath)': '%(FullPath)',
+        '$(ParentName)': '$(ProjectFileName)',
+        '$(PlatformName)': '$(Platform)',
+        '$(SafeInputName)': '%(Filename)',
+    }
+    for old, new in replace_map.iteritems():
+      s = s.replace(old, new)
+    s = FixVCMacroSlashes(s)
+  return s
+
+
+def ConvertToMSBuildSettings(msvs_settings, stderr=sys.stderr):
+  """Converts MSVS settings (VS2008 and earlier) to MSBuild settings (VS2010+).
 
   Args:
       msvs_settings: A dictionary.  The key is the tool name.  The values are
-                     themselves dictionaries of settings and their values.
+          themselves dictionaries of settings and their values.
       stderr: The stream receiving the error messages.
+
   Returns:
       A dictionary of MSBuild settings.  The key is either the MSBuild tool name
       or the empty string (for the global settings).  The values are themselves
@@ -358,14 +425,14 @@ def ConvertToMsBuildSettings(msvs_settings, stderr=sys.stderr):
           # Invoke the translation function.
           try:
             msvs_tool[msvs_setting](msvs_value, msbuild_settings)
-          except ValueError:
-            print >> stderr, ('Warning: unrecognized value "%s" for %s/%s '
-                'while converting to MSBuild.' %
-                (msvs_value, msvs_tool_name, msvs_setting))
+          except ValueError, e:
+            print >> stderr, ('Warning: while converting %s/%s to MSBuild, '
+                              '%s' % (msvs_tool_name, msvs_setting, e))
         else:
           # We don't know this setting.  Give a warning.
           print >> stderr, ('Warning: unrecognized setting %s/%s '
-              'while converting to MSBuild.' % (msvs_tool_name, msvs_setting))
+                            'while converting to MSBuild.' %
+                            (msvs_tool_name, msvs_setting))
     else:
       print >> stderr, ('Warning: unrecognized tool %s while converting to '
                         'MSBuild.' % msvs_tool_name)
@@ -373,36 +440,36 @@ def ConvertToMsBuildSettings(msvs_settings, stderr=sys.stderr):
 
 
 def ValidateMSVSSettings(settings, stderr=sys.stderr):
-  """ Validates that the names of the settings are valid for MSVS.
+  """Validates that the names of the settings are valid for MSVS.
 
   Args:
       settings: A dictionary.  The key is the tool name.  The values are
-                themselves dictionaries of settings and their values.
+          themselves dictionaries of settings and their values.
       stderr: The stream receiving the error messages.
   """
   _ValidateSettings(_msvs_validators, settings, stderr)
 
 
 def ValidateMSBuildSettings(settings, stderr=sys.stderr):
-  """ Validates that the names of the settings are valid for MSBuild.
+  """Validates that the names of the settings are valid for MSBuild.
 
   Args:
       settings: A dictionary.  The key is the tool name.  The values are
-                themselves dictionaries of settings and their values.
+          themselves dictionaries of settings and their values.
       stderr: The stream receiving the error messages.
   """
   _ValidateSettings(_msbuild_validators, settings, stderr)
 
 
 def _ValidateSettings(validators, settings, stderr):
-  """ Validates that the settings are valid for MSBuild or MSVS.
+  """Validates that the settings are valid for MSBuild or MSVS.
 
   We currently only validate the names of the settings, not their values.
 
   Args:
       validators: A dictionary of tools and their validators.
       settings: A dictionary.  The key is the tool name.  The values are
-                themselves dictionaries of settings and their values.
+          themselves dictionaries of settings and their values.
       stderr: The stream receiving the error messages.
   """
   for tool_name in settings:
@@ -412,11 +479,9 @@ def _ValidateSettings(validators, settings, stderr):
         if setting in tool_validators:
           try:
             tool_validators[setting](value)
-          except ValueError:
-            print >> stderr, ('Warning: unrecognized value "%s" for %s/%s' %
-                              (value, tool_name, setting))
-          #except TypeError:  #(jeanluc)
-          #  print ('***value "%s" for %s/%s' % (value, tool_name, setting))
+          except ValueError, e:
+            print >> stderr, ('Warning: for %s/%s, %s' %
+                              (tool_name, setting, e))
         else:
           print >> stderr, ('Warning: unrecognized setting %s/%s' %
                             (tool_name, setting))
@@ -425,12 +490,12 @@ def _ValidateSettings(validators, settings, stderr):
 
 
 # MSVS and MBuild names of the tools.
-_compile = {'msvs': 'VCCLCompilerTool', 'msbuild': 'ClCompile'}
-_link = {'msvs': 'VCLinkerTool', 'msbuild': 'Link'}
-_midl = {'msvs': 'VCMIDLTool', 'msbuild': 'Midl'}
-_rc = {'msvs': 'VCResourceCompilerTool', 'msbuild': 'ResourceCompile'}
-_lib = {'msvs': 'VCLibrarianTool', 'msbuild': 'Lib'}
-_manifest = {'msvs': 'VCManifestTool', 'msbuild': 'Mt'}
+_compile = _Tool('VCCLCompilerTool', 'ClCompile')
+_link = _Tool('VCLinkerTool', 'Link')
+_midl = _Tool('VCMIDLTool', 'Midl')
+_rc = _Tool('VCResourceCompilerTool', 'ResourceCompile')
+_lib = _Tool('VCLibrarianTool', 'Lib')
+_manifest = _Tool('VCManifestTool', 'Manifest')
 
 
 _AddTool(_compile)
@@ -573,7 +638,7 @@ _Renamed(_compile, 'EnableIntrinsicFunctions', 'IntrinsicFunctions',
 _Renamed(_compile, 'KeepComments', 'PreprocessKeepComments', _boolean)  # /C
 _Renamed(_compile, 'ObjectFile', 'ObjectFileName', _file_name)  # /Fo
 _Renamed(_compile, 'OpenMP', 'OpenMPSupport', _boolean)  # /openmp
-_Renamed(_compile, 'PrecompiledHeaderThrough',  'PrecompiledHeaderFile',
+_Renamed(_compile, 'PrecompiledHeaderThrough', 'PrecompiledHeaderFile',
          _file_name)  # Used with /Yc and /Yu
 _Renamed(_compile, 'PrecompiledHeaderFile', 'PrecompiledHeaderOutputFile',
          _file_name)  # /Fp
@@ -616,7 +681,8 @@ _CustomGeneratePreprocessedFile(_compile, 'GeneratePreprocessedFile')
 # Options that have the same name in MSVS and MSBuild
 _Same(_link, 'AdditionalDependencies', _file_list)
 _Same(_link, 'AdditionalLibraryDirectories', _folder_list)  # /LIBPATH
-_Same(_link, 'AdditionalManifestDependencies', _file_list) # /MANIFESTDEPENDENCY
+#  /MANIFESTDEPENDENCY:
+_Same(_link, 'AdditionalManifestDependencies', _file_list)
 _Same(_link, 'AdditionalOptions', _string_list)
 _Same(_link, 'AddModuleNamesToAssembly', _file_list)  # /ASSEMBLYMODULE
 _Same(_link, 'AllowIsolation', _boolean)  # /ALLOWISOLATION
@@ -672,37 +738,37 @@ _Same(_link, 'OptimizeReferences', _newly_boolean)  # /OPT:REF
 _Same(_link, 'RandomizedBaseAddress', _newly_boolean)  # /DYNAMICBASE
 _Same(_link, 'TerminalServerAware', _newly_boolean)  # /TSAWARE
 
-_subsystem_enumeration = _Enumeration([
-    'NotSet',
-    'Console',  # /SUBSYSTEM:CONSOLE
-    'Windows',  # /SUBSYSTEM:WINDOWS
-    'Native',  # /SUBSYSTEM:NATIVE
-    'EFI Application',  # /SUBSYSTEM:EFI_APPLICATION
-    'EFI Boot Service Driver',  # /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
-    'EFI ROM',  # /SUBSYSTEM:EFI_ROM
-    'EFI Runtime',  # /SUBSYSTEM:EFI_RUNTIME_DRIVER
-    'WindowsCE'],  # /SUBSYSTEM:WINDOWSCE
+_subsystem_enumeration = _Enumeration(
+    ['NotSet',
+     'Console',  # /SUBSYSTEM:CONSOLE
+     'Windows',  # /SUBSYSTEM:WINDOWS
+     'Native',  # /SUBSYSTEM:NATIVE
+     'EFI Application',  # /SUBSYSTEM:EFI_APPLICATION
+     'EFI Boot Service Driver',  # /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
+     'EFI ROM',  # /SUBSYSTEM:EFI_ROM
+     'EFI Runtime',  # /SUBSYSTEM:EFI_RUNTIME_DRIVER
+     'WindowsCE'],  # /SUBSYSTEM:WINDOWSCE
     new=['POSIX'])  # /SUBSYSTEM:POSIX
 
-_target_machine_enumeration = _Enumeration([
-    'NotSet',
-    'MachineX86',  # /MACHINE:X86
-    None,
-    'MachineARM',  # /MACHINE:ARM
-    'MachineEBC',  # /MACHINE:EBC
-    'MachineIA64',  # /MACHINE:IA64
-    None,
-    'MachineMIPS',  # /MACHINE:MIPS
-    'MachineMIPS16',  # /MACHINE:MIPS16
-    'MachineMIPSFPU',  # /MACHINE:MIPSFPU
-    'MachineMIPSFPU16',  # /MACHINE:MIPSFPU16
-    None,
-    None,
-    None,
-    'MachineSH4',  # /MACHINE:SH4
-    None,
-    'MachineTHUMB',  # /MACHINE:THUMB
-    'MachineX64'])  # /MACHINE:X64
+_target_machine_enumeration = _Enumeration(
+    ['NotSet',
+     'MachineX86',  # /MACHINE:X86
+     None,
+     'MachineARM',  # /MACHINE:ARM
+     'MachineEBC',  # /MACHINE:EBC
+     'MachineIA64',  # /MACHINE:IA64
+     None,
+     'MachineMIPS',  # /MACHINE:MIPS
+     'MachineMIPS16',  # /MACHINE:MIPS16
+     'MachineMIPSFPU',  # /MACHINE:MIPSFPU
+     'MachineMIPSFPU16',  # /MACHINE:MIPSFPU16
+     None,
+     None,
+     None,
+     'MachineSH4',  # /MACHINE:SH4
+     None,
+     'MachineTHUMB',  # /MACHINE:THUMB
+     'MachineX64'])  # /MACHINE:X64
 
 _Same(_link, 'AssemblyDebug',
       _Enumeration(['',
@@ -786,7 +852,8 @@ _MSBuildOnly(_link, 'SectionAlignment', _integer)  # /ALIGN
 _MSBuildOnly(_link, 'SpecifySectionAttributes', _string)  # /SECTION
 _MSBuildOnly(_link, 'ForceFileOutput',
              _Enumeration([], new=['Enabled',  # /FORCE
-                                   'MultiplyDefinedSymbolOnly', #/FORCE:MULTIPLE
+                                   # /FORCE:MULTIPLE
+                                   'MultiplyDefinedSymbolOnly',
                                    'UndefinedSymbolOnly']))  # /FORCE:UNRESOLVED
 _MSBuildOnly(_link, 'CreateHotPatchableImage',
              _Enumeration([], new=['Enabled',  # /FUNCTIONPADMIN
@@ -912,6 +979,7 @@ _Same(_lib, 'ModuleDefinitionFile', _file_name)  # /DEF
 _Same(_lib, 'OutputFile', _file_name)  # /OUT
 _Same(_lib, 'SuppressStartupBanner', _boolean)  # /NOLOGO
 _Same(_lib, 'UseUnicodeResponseFiles', _boolean)
+_Same(_lib, 'LinkTimeCodeGeneration', _boolean)  # /LTCG
 
 # TODO(jeanluc) _link defines the same value that gets moved to
 # ProjectReference.  We may want to validate that they are consistent.
@@ -926,7 +994,6 @@ _MSBuildOnly(_lib, 'ErrorReporting',
                                    'QueueForNextLogin',  # /ERRORREPORT:QUEUE
                                    'SendErrorReport',  # /ERRORREPORT:SEND
                                    'NoErrorReport']))  # /ERRORREPORT:NONE
-_MSBuildOnly(_lib, 'LinkTimeCodeGeneration', _boolean)  # /LTCG
 _MSBuildOnly(_lib, 'MinimumRequiredVersion', _string)
 _MSBuildOnly(_lib, 'Name', _file_name)  # /NAME
 _MSBuildOnly(_lib, 'RemoveObjects', _file_list)  # /REMOVE
@@ -977,4 +1044,3 @@ _MSBuildOnly(_manifest, 'ManifestFromManagedAssembly',
 _MSBuildOnly(_manifest, 'OutputResourceManifests', _string)  # /outputresource
 _MSBuildOnly(_manifest, 'SuppressDependencyElement', _boolean)  # /nodependency
 _MSBuildOnly(_manifest, 'TrackerLogDirectory', _folder_name)
-
index c9ca7fd..4e06da3 100644 (file)
@@ -1,15 +1,14 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 
-# Copyright (c) 2011 Google Inc. All rights reserved.
+# Copyright (c) 2012 Google Inc. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
 
-""" Unit tests for the MSVSSettings.py file. """
+"""Unit tests for the MSVSSettings.py file."""
 
-import sys
-import unittest
-import MSVSSettings
 import StringIO
+import unittest
+import gyp.MSVSSettings as MSVSSettings
 
 
 class TestSequenceFunctions(unittest.TestCase):
@@ -18,32 +17,32 @@ class TestSequenceFunctions(unittest.TestCase):
     self.stderr = StringIO.StringIO()
 
   def _ExpectedWarnings(self, expected):
-    """ Compares recorded lines to expected warnings. """
+    """Compares recorded lines to expected warnings."""
     self.stderr.seek(0)
     actual = self.stderr.read().split('\n')
-    actual = [line for line in actual if line != '']
+    actual = [line for line in actual if line]
     self.assertEqual(sorted(expected), sorted(actual))
 
-  def test_ValidateMSVSSettings_tool_names(self):
-    """ Tests that only MSVS tool names are allowed. """
-    MSVSSettings.ValidateMSVSSettings({
-        'VCCLCompilerTool': {},
-        'VCLinkerTool': {},
-        'VCMIDLTool': {},
-        'foo': {},
-        'VCResourceCompilerTool': {},
-        'VCLibrarianTool': {},
-        'VCManifestTool': {},
-        'ClCompile': {}},
+  def testValidateMSVSSettings_tool_names(self):
+    """Tests that only MSVS tool names are allowed."""
+    MSVSSettings.ValidateMSVSSettings(
+        {'VCCLCompilerTool': {},
+         'VCLinkerTool': {},
+         'VCMIDLTool': {},
+         'foo': {},
+         'VCResourceCompilerTool': {},
+         'VCLibrarianTool': {},
+         'VCManifestTool': {},
+         'ClCompile': {}},
         self.stderr)
     self._ExpectedWarnings([
         'Warning: unrecognized tool foo',
         'Warning: unrecognized tool ClCompile'])
 
-  def test_ValidateMSVSSettings_settings(self):
-    """ Tests that for invalid MSVS settings. """
-    MSVSSettings.ValidateMSVSSettings({
-        'VCCLCompilerTool': {
+  def testValidateMSVSSettings_settings(self):
+    """Tests that for invalid MSVS settings."""
+    MSVSSettings.ValidateMSVSSettings(
+        {'VCCLCompilerTool': {
             'AdditionalIncludeDirectories': 'folder1;folder2',
             'AdditionalOptions': ['string1', 'string2'],
             'AdditionalUsingDirectories': 'folder1;folder2',
@@ -108,180 +107,182 @@ class TestSequenceFunctions(unittest.TestCase):
             'WholeProgramOptimization': 'true',
             'XMLDocumentationFileName': 'a_file_name',
             'ZZXYZ': 'bogus'},
-        'VCLinkerTool': {
-            'AdditionalDependencies': 'file1;file2',
-            'AdditionalLibraryDirectories': 'folder1;folder2',
-            'AdditionalManifestDependencies': 'file1;file2',
-            'AdditionalOptions': 'a string1',
-            'AddModuleNamesToAssembly': 'file1;file2',
-            'AllowIsolation': 'true',
-            'AssemblyDebug': '2',
-            'AssemblyLinkResource': 'file1;file2',
-            'BaseAddress': 'a string1',
-            'CLRImageType': '2',
-            'CLRThreadAttribute': '2',
-            'CLRUnmanagedCodeCheck': 'true',
-            'DataExecutionPrevention': '2',
-            'DelayLoadDLLs': 'file1;file2',
-            'DelaySign': 'true',
-            'Driver': '2',
-            'EmbedManagedResourceFile': 'file1;file2',
-            'EnableCOMDATFolding': '2',
-            'EnableUAC': 'true',
-            'EntryPointSymbol': 'a string1',
-            'ErrorReporting': '2',
-            'FixedBaseAddress': '2',
-            'ForceSymbolReferences': 'file1;file2',
-            'FunctionOrder': 'a_file_name',
-            'GenerateDebugInformation': 'true',
-            'GenerateManifest': 'true',
-            'GenerateMapFile': 'true',
-            'HeapCommitSize': 'a string1',
-            'HeapReserveSize': 'a string1',
-            'IgnoreAllDefaultLibraries': 'true',
-            'IgnoreDefaultLibraryNames': 'file1;file2',
-            'IgnoreEmbeddedIDL': 'true',
-            'IgnoreImportLibrary': 'true',
-            'ImportLibrary': 'a_file_name',
-            'KeyContainer': 'a_file_name',
-            'KeyFile': 'a_file_name',
-            'LargeAddressAware': '2',
-            'LinkIncremental': '2',
-            'LinkLibraryDependencies': 'true',
-            'LinkTimeCodeGeneration': '2',
-            'ManifestFile': 'a_file_name',
-            'MapExports': 'true',
-            'MapFileName': 'a_file_name',
-            'MergedIDLBaseFileName': 'a_file_name',
-            'MergeSections': 'a string1',
-            'MidlCommandFile': 'a_file_name',
-            'ModuleDefinitionFile': 'a_file_name',
-            'OptimizeForWindows98': '1',
-            'OptimizeReferences': '2',
-            'OutputFile': 'a_file_name',
-            'PerUserRedirection': 'true',
-            'Profile': 'true',
-            'ProfileGuidedDatabase': 'a_file_name',
-            'ProgramDatabaseFile': 'a_file_name',
-            'RandomizedBaseAddress': '2',
-            'RegisterOutput': 'true',
-            'ResourceOnlyDLL': 'true',
-            'SetChecksum': 'true',
-            'ShowProgress': '2',
-            'StackCommitSize': 'a string1',
-            'StackReserveSize': 'a string1',
-            'StripPrivateSymbols': 'a_file_name',
-            'SubSystem': '2',
-            'SupportUnloadOfDelayLoadedDLL': 'true',
-            'SuppressStartupBanner': 'true',
-            'SwapRunFromCD': 'true',
-            'SwapRunFromNet': 'true',
-            'TargetMachine': '2',
-            'TerminalServerAware': '2',
-            'TurnOffAssemblyGeneration': 'true',
-            'TypeLibraryFile': 'a_file_name',
-            'TypeLibraryResourceID': '33',
-            'UACExecutionLevel': '2',
-            'UACUIAccess': 'true',
-            'UseLibraryDependencyInputs': 'true',
-            'UseUnicodeResponseFiles': 'true',
-            'Version': 'a string1'},
-        'VCMIDLTool': {
-            'AdditionalIncludeDirectories': 'folder1;folder2',
-            'AdditionalOptions': 'a string1',
-            'CPreprocessOptions': 'a string1',
-            'DefaultCharType': '1',
-            'DLLDataFileName': 'a_file_name',
-            'EnableErrorChecks': '1',
-            'ErrorCheckAllocations': 'true',
-            'ErrorCheckBounds': 'true',
-            'ErrorCheckEnumRange': 'true',
-            'ErrorCheckRefPointers': 'true',
-            'ErrorCheckStubData': 'true',
-            'GenerateStublessProxies': 'true',
-            'GenerateTypeLibrary': 'true',
-            'HeaderFileName': 'a_file_name',
-            'IgnoreStandardIncludePath': 'true',
-            'InterfaceIdentifierFileName': 'a_file_name',
-            'MkTypLibCompatible': 'true',
-            'notgood': 'bogus',
-            'OutputDirectory': 'a string1',
-            'PreprocessorDefinitions': 'string1;string2',
-            'ProxyFileName': 'a_file_name',
-            'RedirectOutputAndErrors': 'a_file_name',
-            'StructMemberAlignment': '1',
-            'SuppressStartupBanner': 'true',
-            'TargetEnvironment': '1',
-            'TypeLibraryName': 'a_file_name',
-            'UndefinePreprocessorDefinitions': 'string1;string2',
-            'ValidateParameters': 'true',
-            'WarnAsError': 'true',
-            'WarningLevel': '1'},
-        'VCResourceCompilerTool': {
-            'AdditionalOptions': 'a string1',
-            'AdditionalIncludeDirectories': 'folder1;folder2',
-            'Culture': '1003',
-            'IgnoreStandardIncludePath': 'true',
-            'notgood2': 'bogus',
-            'PreprocessorDefinitions': 'string1;string2',
-            'ResourceOutputFileName': 'a string1',
-            'ShowProgress': 'true',
-            'SuppressStartupBanner': 'true',
-            'UndefinePreprocessorDefinitions': 'string1;string2'},
-        'VCLibrarianTool': {
-            'AdditionalDependencies': 'file1;file2',
-            'AdditionalLibraryDirectories': 'folder1;folder2',
-            'AdditionalOptions': 'a string1',
-            'ExportNamedFunctions': 'string1;string2',
-            'ForceSymbolReferences': 'a string1',
-            'IgnoreAllDefaultLibraries': 'true',
-            'IgnoreSpecificDefaultLibraries': 'file1;file2',
-            'LinkLibraryDependencies': 'true',
-            'ModuleDefinitionFile': 'a_file_name',
-            'OutputFile': 'a_file_name',
-            'SuppressStartupBanner': 'true',
-            'UseUnicodeResponseFiles': 'true'},
-        'VCManifestTool': {
-            'AdditionalManifestFiles': 'file1;file2',
-            'AdditionalOptions': 'a string1',
-            'AssemblyIdentity': 'a string1',
-            'ComponentFileName': 'a_file_name',
-            'DependencyInformationFile': 'a_file_name',
-            'GenerateCatalogFiles': 'true',
-            'InputResourceManifests': 'a string1',
-            'ManifestResourceFile': 'a_file_name',
-            'OutputManifestFile': 'a_file_name',
-            'RegistrarScriptFile': 'a_file_name',
-            'ReplacementsFile': 'a_file_name',
-            'SuppressStartupBanner': 'true',
-            'TypeLibraryFile': 'a_file_name',
-            'UpdateFileHashes': 'truel',
-            'UpdateFileHashesSearchPath': 'a_file_name',
-            'UseFAT32Workaround': 'true',
-            'UseUnicodeResponseFiles': 'true',
-            'VerboseOutput': 'true'}},
+         'VCLinkerTool': {
+             'AdditionalDependencies': 'file1;file2',
+             'AdditionalLibraryDirectories': 'folder1;folder2',
+             'AdditionalManifestDependencies': 'file1;file2',
+             'AdditionalOptions': 'a string1',
+             'AddModuleNamesToAssembly': 'file1;file2',
+             'AllowIsolation': 'true',
+             'AssemblyDebug': '2',
+             'AssemblyLinkResource': 'file1;file2',
+             'BaseAddress': 'a string1',
+             'CLRImageType': '2',
+             'CLRThreadAttribute': '2',
+             'CLRUnmanagedCodeCheck': 'true',
+             'DataExecutionPrevention': '2',
+             'DelayLoadDLLs': 'file1;file2',
+             'DelaySign': 'true',
+             'Driver': '2',
+             'EmbedManagedResourceFile': 'file1;file2',
+             'EnableCOMDATFolding': '2',
+             'EnableUAC': 'true',
+             'EntryPointSymbol': 'a string1',
+             'ErrorReporting': '2',
+             'FixedBaseAddress': '2',
+             'ForceSymbolReferences': 'file1;file2',
+             'FunctionOrder': 'a_file_name',
+             'GenerateDebugInformation': 'true',
+             'GenerateManifest': 'true',
+             'GenerateMapFile': 'true',
+             'HeapCommitSize': 'a string1',
+             'HeapReserveSize': 'a string1',
+             'IgnoreAllDefaultLibraries': 'true',
+             'IgnoreDefaultLibraryNames': 'file1;file2',
+             'IgnoreEmbeddedIDL': 'true',
+             'IgnoreImportLibrary': 'true',
+             'ImportLibrary': 'a_file_name',
+             'KeyContainer': 'a_file_name',
+             'KeyFile': 'a_file_name',
+             'LargeAddressAware': '2',
+             'LinkIncremental': '2',
+             'LinkLibraryDependencies': 'true',
+             'LinkTimeCodeGeneration': '2',
+             'ManifestFile': 'a_file_name',
+             'MapExports': 'true',
+             'MapFileName': 'a_file_name',
+             'MergedIDLBaseFileName': 'a_file_name',
+             'MergeSections': 'a string1',
+             'MidlCommandFile': 'a_file_name',
+             'ModuleDefinitionFile': 'a_file_name',
+             'OptimizeForWindows98': '1',
+             'OptimizeReferences': '2',
+             'OutputFile': 'a_file_name',
+             'PerUserRedirection': 'true',
+             'Profile': 'true',
+             'ProfileGuidedDatabase': 'a_file_name',
+             'ProgramDatabaseFile': 'a_file_name',
+             'RandomizedBaseAddress': '2',
+             'RegisterOutput': 'true',
+             'ResourceOnlyDLL': 'true',
+             'SetChecksum': 'true',
+             'ShowProgress': '2',
+             'StackCommitSize': 'a string1',
+             'StackReserveSize': 'a string1',
+             'StripPrivateSymbols': 'a_file_name',
+             'SubSystem': '2',
+             'SupportUnloadOfDelayLoadedDLL': 'true',
+             'SuppressStartupBanner': 'true',
+             'SwapRunFromCD': 'true',
+             'SwapRunFromNet': 'true',
+             'TargetMachine': '2',
+             'TerminalServerAware': '2',
+             'TurnOffAssemblyGeneration': 'true',
+             'TypeLibraryFile': 'a_file_name',
+             'TypeLibraryResourceID': '33',
+             'UACExecutionLevel': '2',
+             'UACUIAccess': 'true',
+             'UseLibraryDependencyInputs': 'true',
+             'UseUnicodeResponseFiles': 'true',
+             'Version': 'a string1'},
+         'VCMIDLTool': {
+             'AdditionalIncludeDirectories': 'folder1;folder2',
+             'AdditionalOptions': 'a string1',
+             'CPreprocessOptions': 'a string1',
+             'DefaultCharType': '1',
+             'DLLDataFileName': 'a_file_name',
+             'EnableErrorChecks': '1',
+             'ErrorCheckAllocations': 'true',
+             'ErrorCheckBounds': 'true',
+             'ErrorCheckEnumRange': 'true',
+             'ErrorCheckRefPointers': 'true',
+             'ErrorCheckStubData': 'true',
+             'GenerateStublessProxies': 'true',
+             'GenerateTypeLibrary': 'true',
+             'HeaderFileName': 'a_file_name',
+             'IgnoreStandardIncludePath': 'true',
+             'InterfaceIdentifierFileName': 'a_file_name',
+             'MkTypLibCompatible': 'true',
+             'notgood': 'bogus',
+             'OutputDirectory': 'a string1',
+             'PreprocessorDefinitions': 'string1;string2',
+             'ProxyFileName': 'a_file_name',
+             'RedirectOutputAndErrors': 'a_file_name',
+             'StructMemberAlignment': '1',
+             'SuppressStartupBanner': 'true',
+             'TargetEnvironment': '1',
+             'TypeLibraryName': 'a_file_name',
+             'UndefinePreprocessorDefinitions': 'string1;string2',
+             'ValidateParameters': 'true',
+             'WarnAsError': 'true',
+             'WarningLevel': '1'},
+         'VCResourceCompilerTool': {
+             'AdditionalOptions': 'a string1',
+             'AdditionalIncludeDirectories': 'folder1;folder2',
+             'Culture': '1003',
+             'IgnoreStandardIncludePath': 'true',
+             'notgood2': 'bogus',
+             'PreprocessorDefinitions': 'string1;string2',
+             'ResourceOutputFileName': 'a string1',
+             'ShowProgress': 'true',
+             'SuppressStartupBanner': 'true',
+             'UndefinePreprocessorDefinitions': 'string1;string2'},
+         'VCLibrarianTool': {
+             'AdditionalDependencies': 'file1;file2',
+             'AdditionalLibraryDirectories': 'folder1;folder2',
+             'AdditionalOptions': 'a string1',
+             'ExportNamedFunctions': 'string1;string2',
+             'ForceSymbolReferences': 'a string1',
+             'IgnoreAllDefaultLibraries': 'true',
+             'IgnoreSpecificDefaultLibraries': 'file1;file2',
+             'LinkLibraryDependencies': 'true',
+             'ModuleDefinitionFile': 'a_file_name',
+             'OutputFile': 'a_file_name',
+             'SuppressStartupBanner': 'true',
+             'UseUnicodeResponseFiles': 'true'},
+         'VCManifestTool': {
+             'AdditionalManifestFiles': 'file1;file2',
+             'AdditionalOptions': 'a string1',
+             'AssemblyIdentity': 'a string1',
+             'ComponentFileName': 'a_file_name',
+             'DependencyInformationFile': 'a_file_name',
+             'GenerateCatalogFiles': 'true',
+             'InputResourceManifests': 'a string1',
+             'ManifestResourceFile': 'a_file_name',
+             'OutputManifestFile': 'a_file_name',
+             'RegistrarScriptFile': 'a_file_name',
+             'ReplacementsFile': 'a_file_name',
+             'SuppressStartupBanner': 'true',
+             'TypeLibraryFile': 'a_file_name',
+             'UpdateFileHashes': 'truel',
+             'UpdateFileHashesSearchPath': 'a_file_name',
+             'UseFAT32Workaround': 'true',
+             'UseUnicodeResponseFiles': 'true',
+             'VerboseOutput': 'true'}},
         self.stderr)
     self._ExpectedWarnings([
-        'Warning: unrecognized value "5" for VCCLCompilerTool/'
-            'BasicRuntimeChecks',
-        'Warning: unrecognized value "fdkslj" for VCCLCompilerTool/'
-            'BrowseInformation',
-        'Warning: unrecognized value "-1" for VCCLCompilerTool/'
-            'CallingConvention',
-        'Warning: unrecognized value "2" for VCCLCompilerTool/'
-            'DebugInformationFormat',
+        'Warning: for VCCLCompilerTool/BasicRuntimeChecks, '
+        'index value (5) not in expected range [0, 4)',
+        'Warning: for VCCLCompilerTool/BrowseInformation, '
+        "invalid literal for int() with base 10: 'fdkslj'",
+        'Warning: for VCCLCompilerTool/CallingConvention, '
+        'index value (-1) not in expected range [0, 3)',
+        'Warning: for VCCLCompilerTool/DebugInformationFormat, '
+        'converted value for 2 not specified.',
         'Warning: unrecognized setting VCCLCompilerTool/Enableprefast',
         'Warning: unrecognized setting VCCLCompilerTool/ZZXYZ',
-        'Warning: unrecognized value "2" for VCLinkerTool/TargetMachine',
+        'Warning: for VCLinkerTool/TargetMachine, '
+        'converted value for 2 not specified.',
         'Warning: unrecognized setting VCMIDLTool/notgood',
         'Warning: unrecognized setting VCResourceCompilerTool/notgood2',
-        'Warning: unrecognized value "truel" for VCManifestTool/'
-            'UpdateFileHashes'])
+        'Warning: for VCManifestTool/UpdateFileHashes, '
+        "expected bool; got 'truel'"
+        ''])
 
-  def test_ValidateMSBuildSettings_settings(self):
-    """ Tests that for invalid MSBuild settings. """
-    MSVSSettings.ValidateMSBuildSettings({
-        'ClCompile': {
+  def testValidateMSBuildSettings_settings(self):
+    """Tests that for invalid MSBuild settings."""
+    MSVSSettings.ValidateMSBuildSettings(
+        {'ClCompile': {
             'AdditionalIncludeDirectories': 'folder1;folder2',
             'AdditionalOptions': ['string1', 'string2'],
             'AdditionalUsingDirectories': 'folder1;folder2',
@@ -353,219 +354,221 @@ class TestSequenceFunctions(unittest.TestCase):
             'WholeProgramOptimization': 'true',
             'XMLDocumentationFileName': 'a_file_name',
             'ZZXYZ': 'bogus'},
-        'Link': {
-            'AdditionalDependencies': 'file1;file2',
-            'AdditionalLibraryDirectories': 'folder1;folder2',
-            'AdditionalManifestDependencies': 'file1;file2',
-            'AdditionalOptions': 'a string1',
-            'AddModuleNamesToAssembly': 'file1;file2',
-            'AllowIsolation': 'true',
-            'AssemblyDebug': '',
-            'AssemblyLinkResource': 'file1;file2',
-            'BaseAddress': 'a string1',
-            'BuildingInIDE': 'true',
-            'CLRImageType': 'ForceIJWImage',
-            'CLRSupportLastError': 'Enabled',
-            'CLRThreadAttribute': 'MTAThreadingAttribute',
-            'CLRUnmanagedCodeCheck': 'true',
-            'CreateHotPatchableImage': 'X86Image',
-            'DataExecutionPrevention': 'false',
-            'DelayLoadDLLs': 'file1;file2',
-            'DelaySign': 'true',
-            'Driver': 'NotSet',
-            'EmbedManagedResourceFile': 'file1;file2',
-            'EnableCOMDATFolding': 'false',
-            'EnableUAC': 'true',
-            'EntryPointSymbol': 'a string1',
-            'FixedBaseAddress': 'false',
-            'ForceFileOutput': 'Enabled',
-            'ForceSymbolReferences': 'file1;file2',
-            'FunctionOrder': 'a_file_name',
-            'GenerateDebugInformation': 'true',
-            'GenerateMapFile': 'true',
-            'HeapCommitSize': 'a string1',
-            'HeapReserveSize': 'a string1',
-            'IgnoreAllDefaultLibraries': 'true',
-            'IgnoreEmbeddedIDL': 'true',
-            'IgnoreSpecificDefaultLibraries': 'a_file_list',
-            'ImageHasSafeExceptionHandlers': 'true',
-            'ImportLibrary': 'a_file_name',
-            'KeyContainer': 'a_file_name',
-            'KeyFile': 'a_file_name',
-            'LargeAddressAware': 'false',
-            'LinkDLL': 'true',
-            'LinkErrorReporting': 'SendErrorReport',
-            'LinkStatus': 'true',
-            'LinkTimeCodeGeneration': 'UseLinkTimeCodeGeneration',
-            'ManifestFile': 'a_file_name',
-            'MapExports': 'true',
-            'MapFileName': 'a_file_name',
-            'MergedIDLBaseFileName': 'a_file_name',
-            'MergeSections': 'a string1',
-            'MidlCommandFile': 'a_file_name',
-            'MinimumRequiredVersion': 'a string1',
-            'ModuleDefinitionFile': 'a_file_name',
-            'MSDOSStubFileName': 'a_file_name',
-            'NoEntryPoint': 'true',
-            'OptimizeReferences': 'false',
-            'OutputFile': 'a_file_name',
-            'PerUserRedirection': 'true',
-            'PreventDllBinding': 'true',
-            'Profile': 'true',
-            'ProfileGuidedDatabase': 'a_file_name',
-            'ProgramDatabaseFile': 'a_file_name',
-            'RandomizedBaseAddress': 'false',
-            'RegisterOutput': 'true',
-            'SectionAlignment': '33',
-            'SetChecksum': 'true',
-            'ShowProgress': 'LinkVerboseREF',
-            'SpecifySectionAttributes': 'a string1',
-            'StackCommitSize': 'a string1',
-            'StackReserveSize': 'a string1',
-            'StripPrivateSymbols': 'a_file_name',
-            'SubSystem': 'Console',
-            'SupportNobindOfDelayLoadedDLL': 'true',
-            'SupportUnloadOfDelayLoadedDLL': 'true',
-            'SuppressStartupBanner': 'true',
-            'SwapRunFromCD': 'true',
-            'SwapRunFromNET': 'true',
-            'TargetMachine': 'MachineX86',
-            'TerminalServerAware': 'false',
-            'TrackerLogDirectory': 'a_folder',
-            'TreatLinkerWarningAsErrors': 'true',
-            'TurnOffAssemblyGeneration': 'true',
-            'TypeLibraryFile': 'a_file_name',
-            'TypeLibraryResourceID': '33',
-            'UACExecutionLevel': 'AsInvoker',
-            'UACUIAccess': 'true',
-            'Version': 'a string1'},
-        'ResourceCompile': {
-            'AdditionalIncludeDirectories': 'folder1;folder2',
-            'AdditionalOptions': 'a string1',
-            'Culture': '0x236',
-            'IgnoreStandardIncludePath': 'true',
-            'NullTerminateStrings': 'true',
-            'PreprocessorDefinitions': 'string1;string2',
-            'ResourceOutputFileName': 'a string1',
-            'ShowProgress': 'true',
-            'SuppressStartupBanner': 'true',
-            'TrackerLogDirectory': 'a_folder',
-            'UndefinePreprocessorDefinitions': 'string1;string2'},
-        'Midl': {
-            'AdditionalIncludeDirectories': 'folder1;folder2',
-            'AdditionalOptions': 'a string1',
-            'ApplicationConfigurationMode': 'true',
-            'ClientStubFile': 'a_file_name',
-            'CPreprocessOptions': 'a string1',
-            'DefaultCharType': 'Signed',
-            'DllDataFileName': 'a_file_name',
-            'EnableErrorChecks': 'EnableCustom',
-            'ErrorCheckAllocations': 'true',
-            'ErrorCheckBounds': 'true',
-            'ErrorCheckEnumRange': 'true',
-            'ErrorCheckRefPointers': 'true',
-            'ErrorCheckStubData': 'true',
-            'GenerateClientFiles': 'Stub',
-            'GenerateServerFiles': 'None',
-            'GenerateStublessProxies': 'true',
-            'GenerateTypeLibrary': 'true',
-            'HeaderFileName': 'a_file_name',
-            'IgnoreStandardIncludePath': 'true',
-            'InterfaceIdentifierFileName': 'a_file_name',
-            'LocaleID': '33',
-            'MkTypLibCompatible': 'true',
-            'OutputDirectory': 'a string1',
-            'PreprocessorDefinitions': 'string1;string2',
-            'ProxyFileName': 'a_file_name',
-            'RedirectOutputAndErrors': 'a_file_name',
-            'ServerStubFile': 'a_file_name',
-            'StructMemberAlignment': 'NotSet',
-            'SuppressCompilerWarnings': 'true',
-            'SuppressStartupBanner': 'true',
-            'TargetEnvironment': 'Itanium',
-            'TrackerLogDirectory': 'a_folder',
-            'TypeLibFormat': 'NewFormat',
-            'TypeLibraryName': 'a_file_name',
-            'UndefinePreprocessorDefinitions': 'string1;string2',
-            'ValidateAllParameters': 'true',
-            'WarnAsError': 'true',
-            'WarningLevel': '1'},
-        'Lib': {
-            'AdditionalDependencies': 'file1;file2',
-            'AdditionalLibraryDirectories': 'folder1;folder2',
-            'AdditionalOptions': 'a string1',
-            'DisplayLibrary': 'a string1',
-            'ErrorReporting': 'PromptImmediately',
-            'ExportNamedFunctions': 'string1;string2',
-            'ForceSymbolReferences': 'a string1',
-            'IgnoreAllDefaultLibraries': 'true',
-            'IgnoreSpecificDefaultLibraries': 'file1;file2',
-            'LinkTimeCodeGeneration': 'true',
-            'MinimumRequiredVersion': 'a string1',
-            'ModuleDefinitionFile': 'a_file_name',
-            'Name': 'a_file_name',
-            'OutputFile': 'a_file_name',
-            'RemoveObjects': 'file1;file2',
-            'SubSystem': 'Console',
-            'SuppressStartupBanner': 'true',
-            'TargetMachine': 'MachineX86i',
-            'TrackerLogDirectory': 'a_folder',
-            'TreatLibWarningAsErrors': 'true',
-            'UseUnicodeResponseFiles': 'true',
-            'Verbose': 'true'},
-        'Mt': {
-            'AdditionalManifestFiles': 'file1;file2',
-            'AdditionalOptions': 'a string1',
-            'AssemblyIdentity': 'a string1',
-            'ComponentFileName': 'a_file_name',
-            'EnableDPIAwareness': 'fal',
-            'GenerateCatalogFiles': 'truel',
-            'GenerateCategoryTags': 'true',
-            'InputResourceManifests': 'a string1',
-            'ManifestFromManagedAssembly': 'a_file_name',
-            'notgood3': 'bogus',
-            'OutputManifestFile': 'a_file_name',
-            'OutputResourceManifests': 'a string1',
-            'RegistrarScriptFile': 'a_file_name',
-            'ReplacementsFile': 'a_file_name',
-            'SuppressDependencyElement': 'true',
-            'SuppressStartupBanner': 'true',
-            'TrackerLogDirectory': 'a_folder',
-            'TypeLibraryFile': 'a_file_name',
-            'UpdateFileHashes': 'true',
-            'UpdateFileHashesSearchPath': 'a_file_name',
-            'VerboseOutput': 'true'},
-        'ProjectReference': {
-            'LinkLibraryDependencies': 'true',
-            'UseLibraryDependencyInputs': 'true'},
-        'ManifestResourceCompile': {
-            'ResourceOutputFileName': 'a_file_name'},
-        '': {
-            'EmbedManifest': 'true',
-            'GenerateManifest': 'true',
-            'IgnoreImportLibrary': 'true',
-            'LinkIncremental': 'false'}},
+         'Link': {
+             'AdditionalDependencies': 'file1;file2',
+             'AdditionalLibraryDirectories': 'folder1;folder2',
+             'AdditionalManifestDependencies': 'file1;file2',
+             'AdditionalOptions': 'a string1',
+             'AddModuleNamesToAssembly': 'file1;file2',
+             'AllowIsolation': 'true',
+             'AssemblyDebug': '',
+             'AssemblyLinkResource': 'file1;file2',
+             'BaseAddress': 'a string1',
+             'BuildingInIDE': 'true',
+             'CLRImageType': 'ForceIJWImage',
+             'CLRSupportLastError': 'Enabled',
+             'CLRThreadAttribute': 'MTAThreadingAttribute',
+             'CLRUnmanagedCodeCheck': 'true',
+             'CreateHotPatchableImage': 'X86Image',
+             'DataExecutionPrevention': 'false',
+             'DelayLoadDLLs': 'file1;file2',
+             'DelaySign': 'true',
+             'Driver': 'NotSet',
+             'EmbedManagedResourceFile': 'file1;file2',
+             'EnableCOMDATFolding': 'false',
+             'EnableUAC': 'true',
+             'EntryPointSymbol': 'a string1',
+             'FixedBaseAddress': 'false',
+             'ForceFileOutput': 'Enabled',
+             'ForceSymbolReferences': 'file1;file2',
+             'FunctionOrder': 'a_file_name',
+             'GenerateDebugInformation': 'true',
+             'GenerateMapFile': 'true',
+             'HeapCommitSize': 'a string1',
+             'HeapReserveSize': 'a string1',
+             'IgnoreAllDefaultLibraries': 'true',
+             'IgnoreEmbeddedIDL': 'true',
+             'IgnoreSpecificDefaultLibraries': 'a_file_list',
+             'ImageHasSafeExceptionHandlers': 'true',
+             'ImportLibrary': 'a_file_name',
+             'KeyContainer': 'a_file_name',
+             'KeyFile': 'a_file_name',
+             'LargeAddressAware': 'false',
+             'LinkDLL': 'true',
+             'LinkErrorReporting': 'SendErrorReport',
+             'LinkStatus': 'true',
+             'LinkTimeCodeGeneration': 'UseLinkTimeCodeGeneration',
+             'ManifestFile': 'a_file_name',
+             'MapExports': 'true',
+             'MapFileName': 'a_file_name',
+             'MergedIDLBaseFileName': 'a_file_name',
+             'MergeSections': 'a string1',
+             'MidlCommandFile': 'a_file_name',
+             'MinimumRequiredVersion': 'a string1',
+             'ModuleDefinitionFile': 'a_file_name',
+             'MSDOSStubFileName': 'a_file_name',
+             'NoEntryPoint': 'true',
+             'OptimizeReferences': 'false',
+             'OutputFile': 'a_file_name',
+             'PerUserRedirection': 'true',
+             'PreventDllBinding': 'true',
+             'Profile': 'true',
+             'ProfileGuidedDatabase': 'a_file_name',
+             'ProgramDatabaseFile': 'a_file_name',
+             'RandomizedBaseAddress': 'false',
+             'RegisterOutput': 'true',
+             'SectionAlignment': '33',
+             'SetChecksum': 'true',
+             'ShowProgress': 'LinkVerboseREF',
+             'SpecifySectionAttributes': 'a string1',
+             'StackCommitSize': 'a string1',
+             'StackReserveSize': 'a string1',
+             'StripPrivateSymbols': 'a_file_name',
+             'SubSystem': 'Console',
+             'SupportNobindOfDelayLoadedDLL': 'true',
+             'SupportUnloadOfDelayLoadedDLL': 'true',
+             'SuppressStartupBanner': 'true',
+             'SwapRunFromCD': 'true',
+             'SwapRunFromNET': 'true',
+             'TargetMachine': 'MachineX86',
+             'TerminalServerAware': 'false',
+             'TrackerLogDirectory': 'a_folder',
+             'TreatLinkerWarningAsErrors': 'true',
+             'TurnOffAssemblyGeneration': 'true',
+             'TypeLibraryFile': 'a_file_name',
+             'TypeLibraryResourceID': '33',
+             'UACExecutionLevel': 'AsInvoker',
+             'UACUIAccess': 'true',
+             'Version': 'a string1'},
+         'ResourceCompile': {
+             'AdditionalIncludeDirectories': 'folder1;folder2',
+             'AdditionalOptions': 'a string1',
+             'Culture': '0x236',
+             'IgnoreStandardIncludePath': 'true',
+             'NullTerminateStrings': 'true',
+             'PreprocessorDefinitions': 'string1;string2',
+             'ResourceOutputFileName': 'a string1',
+             'ShowProgress': 'true',
+             'SuppressStartupBanner': 'true',
+             'TrackerLogDirectory': 'a_folder',
+             'UndefinePreprocessorDefinitions': 'string1;string2'},
+         'Midl': {
+             'AdditionalIncludeDirectories': 'folder1;folder2',
+             'AdditionalOptions': 'a string1',
+             'ApplicationConfigurationMode': 'true',
+             'ClientStubFile': 'a_file_name',
+             'CPreprocessOptions': 'a string1',
+             'DefaultCharType': 'Signed',
+             'DllDataFileName': 'a_file_name',
+             'EnableErrorChecks': 'EnableCustom',
+             'ErrorCheckAllocations': 'true',
+             'ErrorCheckBounds': 'true',
+             'ErrorCheckEnumRange': 'true',
+             'ErrorCheckRefPointers': 'true',
+             'ErrorCheckStubData': 'true',
+             'GenerateClientFiles': 'Stub',
+             'GenerateServerFiles': 'None',
+             'GenerateStublessProxies': 'true',
+             'GenerateTypeLibrary': 'true',
+             'HeaderFileName': 'a_file_name',
+             'IgnoreStandardIncludePath': 'true',
+             'InterfaceIdentifierFileName': 'a_file_name',
+             'LocaleID': '33',
+             'MkTypLibCompatible': 'true',
+             'OutputDirectory': 'a string1',
+             'PreprocessorDefinitions': 'string1;string2',
+             'ProxyFileName': 'a_file_name',
+             'RedirectOutputAndErrors': 'a_file_name',
+             'ServerStubFile': 'a_file_name',
+             'StructMemberAlignment': 'NotSet',
+             'SuppressCompilerWarnings': 'true',
+             'SuppressStartupBanner': 'true',
+             'TargetEnvironment': 'Itanium',
+             'TrackerLogDirectory': 'a_folder',
+             'TypeLibFormat': 'NewFormat',
+             'TypeLibraryName': 'a_file_name',
+             'UndefinePreprocessorDefinitions': 'string1;string2',
+             'ValidateAllParameters': 'true',
+             'WarnAsError': 'true',
+             'WarningLevel': '1'},
+         'Lib': {
+             'AdditionalDependencies': 'file1;file2',
+             'AdditionalLibraryDirectories': 'folder1;folder2',
+             'AdditionalOptions': 'a string1',
+             'DisplayLibrary': 'a string1',
+             'ErrorReporting': 'PromptImmediately',
+             'ExportNamedFunctions': 'string1;string2',
+             'ForceSymbolReferences': 'a string1',
+             'IgnoreAllDefaultLibraries': 'true',
+             'IgnoreSpecificDefaultLibraries': 'file1;file2',
+             'LinkTimeCodeGeneration': 'true',
+             'MinimumRequiredVersion': 'a string1',
+             'ModuleDefinitionFile': 'a_file_name',
+             'Name': 'a_file_name',
+             'OutputFile': 'a_file_name',
+             'RemoveObjects': 'file1;file2',
+             'SubSystem': 'Console',
+             'SuppressStartupBanner': 'true',
+             'TargetMachine': 'MachineX86i',
+             'TrackerLogDirectory': 'a_folder',
+             'TreatLibWarningAsErrors': 'true',
+             'UseUnicodeResponseFiles': 'true',
+             'Verbose': 'true'},
+         'Manifest': {
+             'AdditionalManifestFiles': 'file1;file2',
+             'AdditionalOptions': 'a string1',
+             'AssemblyIdentity': 'a string1',
+             'ComponentFileName': 'a_file_name',
+             'EnableDPIAwareness': 'fal',
+             'GenerateCatalogFiles': 'truel',
+             'GenerateCategoryTags': 'true',
+             'InputResourceManifests': 'a string1',
+             'ManifestFromManagedAssembly': 'a_file_name',
+             'notgood3': 'bogus',
+             'OutputManifestFile': 'a_file_name',
+             'OutputResourceManifests': 'a string1',
+             'RegistrarScriptFile': 'a_file_name',
+             'ReplacementsFile': 'a_file_name',
+             'SuppressDependencyElement': 'true',
+             'SuppressStartupBanner': 'true',
+             'TrackerLogDirectory': 'a_folder',
+             'TypeLibraryFile': 'a_file_name',
+             'UpdateFileHashes': 'true',
+             'UpdateFileHashesSearchPath': 'a_file_name',
+             'VerboseOutput': 'true'},
+         'ProjectReference': {
+             'LinkLibraryDependencies': 'true',
+             'UseLibraryDependencyInputs': 'true'},
+         'ManifestResourceCompile': {
+             'ResourceOutputFileName': 'a_file_name'},
+         '': {
+             'EmbedManifest': 'true',
+             'GenerateManifest': 'true',
+             'IgnoreImportLibrary': 'true',
+             'LinkIncremental': 'false'}},
         self.stderr)
     self._ExpectedWarnings([
         'Warning: unrecognized setting ClCompile/Enableprefast',
         'Warning: unrecognized setting ClCompile/ZZXYZ',
-        'Warning: unrecognized setting Mt/notgood3',
-        'Warning: unrecognized value "truel" for Mt/GenerateCatalogFiles',
-        'Warning: unrecognized value "MachineX86i" for Lib/TargetMachine',
-        'Warning: unrecognized value "fal" for Mt/EnableDPIAwareness'])
+        'Warning: unrecognized setting Manifest/notgood3',
+        'Warning: for Manifest/GenerateCatalogFiles, '
+        "expected bool; got 'truel'",
+        'Warning: for Lib/TargetMachine, unrecognized enumerated value '
+        'MachineX86i',
+        "Warning: for Manifest/EnableDPIAwareness, expected bool; got 'fal'"])
 
-  def test_ConvertToMsBuildSettings_empty(self):
-    """ Tests an empty conversion. """
+  def testConvertToMSBuildSettings_empty(self):
+    """Tests an empty conversion."""
     msvs_settings = {}
     expected_msbuild_settings = {}
-    actual_msbuild_settings = MSVSSettings.ConvertToMsBuildSettings(
+    actual_msbuild_settings = MSVSSettings.ConvertToMSBuildSettings(
         msvs_settings,
         self.stderr)
     self.assertEqual(expected_msbuild_settings, actual_msbuild_settings)
     self._ExpectedWarnings([])
 
-  def test_ConvertToMsBuildSettings_minimal(self):
-    """ Tests a minimal conversion. """
+  def testConvertToMSBuildSettings_minimal(self):
+    """Tests a minimal conversion."""
     msvs_settings = {
         'VCCLCompilerTool': {
             'AdditionalIncludeDirectories': 'dir1',
@@ -590,14 +593,14 @@ class TestSequenceFunctions(unittest.TestCase):
             'DataExecutionPrevention': 'true',
             },
         }
-    actual_msbuild_settings = MSVSSettings.ConvertToMsBuildSettings(
+    actual_msbuild_settings = MSVSSettings.ConvertToMSBuildSettings(
         msvs_settings,
         self.stderr)
     self.assertEqual(expected_msbuild_settings, actual_msbuild_settings)
     self._ExpectedWarnings([])
 
-  def test_ConvertToMsBuildSettings_warnings(self):
-    """ Tests conversion that generates warnings. """
+  def testConvertToMSBuildSettings_warnings(self):
+    """Tests conversion that generates warnings."""
     msvs_settings = {
         'VCCLCompilerTool': {
             'AdditionalIncludeDirectories': '1',
@@ -624,32 +627,32 @@ class TestSequenceFunctions(unittest.TestCase):
         'ResourceCompile': {
             # Custom
             'Culture': '0x03eb'}}
-    actual_msbuild_settings = MSVSSettings.ConvertToMsBuildSettings(
+    actual_msbuild_settings = MSVSSettings.ConvertToMSBuildSettings(
         msvs_settings,
         self.stderr)
     self.assertEqual(expected_msbuild_settings, actual_msbuild_settings)
     self._ExpectedWarnings([
-        'Warning: unrecognized value "12" for VCCLCompilerTool/'
-            'BasicRuntimeChecks while converting to MSBuild.',
-        'Warning: unrecognized value "21" for VCCLCompilerTool/'
-            'BrowseInformation while converting to MSBuild.',
-        'Warning: unrecognized value "13" for VCCLCompilerTool/'
-            'UsePrecompiledHeader while converting to MSBuild.',
-        'Warning: unrecognized value "14" for VCCLCompilerTool/'
-            'GeneratePreprocessedFile while converting to MSBuild.',
+        'Warning: while converting VCCLCompilerTool/BasicRuntimeChecks to '
+        'MSBuild, index value (12) not in expected range [0, 4)',
+        'Warning: while converting VCCLCompilerTool/BrowseInformation to '
+        'MSBuild, index value (21) not in expected range [0, 3)',
+        'Warning: while converting VCCLCompilerTool/UsePrecompiledHeader to '
+        'MSBuild, index value (13) not in expected range [0, 3)',
+        'Warning: while converting VCCLCompilerTool/GeneratePreprocessedFile to '
+        'MSBuild, value must be one of [0, 1, 2]; got 14',
 
-        'Warning: unrecognized value "10" for VCLinkerTool/'
-            'Driver while converting to MSBuild.',
-        'Warning: unrecognized value "31" for VCLinkerTool/'
-            'LinkTimeCodeGeneration while converting to MSBuild.',
-        'Warning: unrecognized value "21" for VCLinkerTool/'
-            'ErrorReporting while converting to MSBuild.',
-        'Warning: unrecognized value "6" for VCLinkerTool/'
-            'FixedBaseAddress while converting to MSBuild.',
+        'Warning: while converting VCLinkerTool/Driver to '
+        'MSBuild, index value (10) not in expected range [0, 4)',
+        'Warning: while converting VCLinkerTool/LinkTimeCodeGeneration to '
+        'MSBuild, index value (31) not in expected range [0, 5)',
+        'Warning: while converting VCLinkerTool/ErrorReporting to '
+        'MSBuild, index value (21) not in expected range [0, 3)',
+        'Warning: while converting VCLinkerTool/FixedBaseAddress to '
+        'MSBuild, index value (6) not in expected range [0, 3)',
         ])
 
-  def test_ConvertToMsBuildSettings_full_synthetic(self):
-    """ Tests conversion of all the MsBuild settings. """
+  def testConvertToMSBuildSettings_full_synthetic(self):
+    """Tests conversion of all the MSBuild settings."""
     msvs_settings = {
         'VCCLCompilerTool': {
             'AdditionalIncludeDirectories': 'folder1;folder2;folder3',
@@ -887,7 +890,7 @@ class TestSequenceFunctions(unittest.TestCase):
             'EnableFiberSafeOptimizations': 'true',
             'EnablePREfast': 'true',
             'ErrorReporting': 'Prompt',
-            'ExceptionHandling':  'Async',
+            'ExceptionHandling': 'Async',
             'ExpandAttributedSource': 'true',
             'FavorSizeOrSpeed': 'Neither',
             'FloatingPointExceptions': 'true',
@@ -942,7 +945,7 @@ class TestSequenceFunctions(unittest.TestCase):
             'CLRImageType': 'ForceIJWImage',
             'CLRThreadAttribute': 'STAThreadingAttribute',
             'CLRUnmanagedCodeCheck': 'true',
-            'DataExecutionPrevention':  '',
+            'DataExecutionPrevention': '',
             'DelayLoadDLLs': 'file1;file2;file3',
             'DelaySign': 'true',
             'Driver': 'Driver',
@@ -1014,7 +1017,7 @@ class TestSequenceFunctions(unittest.TestCase):
             'AdditionalIncludeDirectories': 'folder1;folder2;folder3',
             'AdditionalOptions': 'a_string',
             'CPreprocessOptions': 'a_string',
-            'DefaultCharType':  'Unsigned',
+            'DefaultCharType': 'Unsigned',
             'DllDataFileName': 'a_file_name',
             'EnableErrorChecks': 'All',
             'ErrorCheckAllocations': 'true',
@@ -1052,7 +1055,7 @@ class TestSequenceFunctions(unittest.TestCase):
             'OutputFile': 'a_file_name',
             'SuppressStartupBanner': 'true',
             'UseUnicodeResponseFiles': 'true'},
-        'Mt': {
+        'Manifest': {
             'AdditionalManifestFiles': 'file1;file2;file3',
             'AdditionalOptions': 'a_string',
             'AssemblyIdentity': 'a_string',
@@ -1077,14 +1080,14 @@ class TestSequenceFunctions(unittest.TestCase):
             'GenerateManifest': 'true',
             'IgnoreImportLibrary': 'true',
             'LinkIncremental': 'false'}}
-    actual_msbuild_settings = MSVSSettings.ConvertToMsBuildSettings(
+    actual_msbuild_settings = MSVSSettings.ConvertToMSBuildSettings(
         msvs_settings,
         self.stderr)
     self.assertEqual(expected_msbuild_settings, actual_msbuild_settings)
     self._ExpectedWarnings([])
 
-  def test_ConvertToMsBuildSettings_actual(self):
-    """ Tests the conversion of an actual project.
+  def testConvertToMSBuildSettings_actual(self):
+    """Tests the conversion of an actual project.
 
     A VS2008 project with most of the options defined was created through the
     VS2008 IDE.  It was then converted to VS2010.  The tool settings found in
@@ -1122,7 +1125,7 @@ class TestSequenceFunctions(unittest.TestCase):
             AdditionalIncludeDirectories:  ';%(AdditionalIncludeDirectories)',
             AdditionalOptions:  ' %(AdditionalOptions)',
             PreprocessorDefinitions:  ';%(PreprocessorDefinitions)',
-        Mt:
+        Manifest:
             AdditionalManifestFiles:  ';%(AdditionalManifestFiles)',
             AdditionalOptions:  ' %(AdditionalOptions)',
             InputResourceManifests:  ';%(InputResourceManifests)',
@@ -1233,7 +1236,7 @@ class TestSequenceFunctions(unittest.TestCase):
             'LinkLibraryDependencies': 'false',
             'LinkTimeCodeGeneration': '1',
             'ManifestFile':
-                '$(IntDir)\\$(TargetFileName).2intermediate.manifest',
+            '$(IntDir)\\$(TargetFileName).2intermediate.manifest',
             'MapExports': 'true',
             'MapFileName': 'd5',
             'MergedIDLBaseFileName': 'f2',
@@ -1288,7 +1291,7 @@ class TestSequenceFunctions(unittest.TestCase):
             'GenerateCatalogFiles': 'true',
             'InputResourceManifests': 'asfsfdafs',
             'ManifestResourceFile':
-                '$(IntDir)\\$(TargetFileName).embed.manifest.resfdsf',
+            '$(IntDir)\\$(TargetFileName).embed.manifest.resfdsf',
             'OutputManifestFile': '$(TargetPath).manifestdfs',
             'RegistrarScriptFile': 'sdfsfd',
             'ReplacementsFile': 'sdffsd',
@@ -1440,7 +1443,7 @@ class TestSequenceFunctions(unittest.TestCase):
             'PreprocessorDefinitions': '_UNICODE;UNICODE2',
             'ResourceOutputFileName': '$(IntDir)%(Filename)3.res',
             'ShowProgress': 'true'},
-        'Mt': {
+        'Manifest': {
             'AdditionalManifestFiles': 'sfsdfsd',
             'AdditionalOptions': 'afdsdafsd',
             'AssemblyIdentity': 'sddfdsadfsa',
@@ -1466,13 +1469,14 @@ class TestSequenceFunctions(unittest.TestCase):
             },
         'ManifestResourceCompile': {
             'ResourceOutputFileName':
-                '$(IntDir)$(TargetFileName).embed.manifest.resfdsf'}
+            '$(IntDir)$(TargetFileName).embed.manifest.resfdsf'}
         }
-    actual_msbuild_settings = MSVSSettings.ConvertToMsBuildSettings(
+    actual_msbuild_settings = MSVSSettings.ConvertToMSBuildSettings(
         msvs_settings,
         self.stderr)
     self.assertEqual(expected_msbuild_settings, actual_msbuild_settings)
     self._ExpectedWarnings([])
 
+
 if __name__ == '__main__':
-  unittest.main()
\ No newline at end of file
+  unittest.main()
index 493a9c4..74e529a 100644 (file)
@@ -1,51 +1,26 @@
-#!/usr/bin/python2.4
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
+# Copyright (c) 2012 Google Inc. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
 
 """Visual Studio project reader/writer."""
 
-import common
-import xml.dom
-import xml_fix
-
-
-#------------------------------------------------------------------------------
+import gyp.common
+import gyp.easy_xml as easy_xml
 
 
 class Writer(object):
   """Visual Studio XML tool file writer."""
 
-  def __init__(self, tool_file_path):
+  def __init__(self, tool_file_path, name):
     """Initializes the tool file.
 
     Args:
       tool_file_path: Path to the tool file.
-    """
-    self.tool_file_path = tool_file_path
-    self.doc = None
-
-  def Create(self, name):
-    """Creates the tool file document.
-
-    Args:
       name: Name of the tool file.
     """
+    self.tool_file_path = tool_file_path
     self.name = name
-
-    # Create XML doc
-    xml_impl = xml.dom.getDOMImplementation()
-    self.doc = xml_impl.createDocument(None, 'VisualStudioToolFile', None)
-
-    # Add attributes to root element
-    self.n_root = self.doc.documentElement
-    self.n_root.setAttribute('Version', '8.00')
-    self.n_root.setAttribute('Name', self.name)
-
-    # Add rules section
-    self.n_rules = self.doc.createElement('Rules')
-    self.n_root.appendChild(self.n_rules)
+    self.rules_section = ['Rules']
 
   def AddCustomBuildRule(self, name, cmd, description,
                          additional_dependencies,
@@ -60,22 +35,24 @@ class Writer(object):
       outputs: outputs of the rule.
       extensions: extensions handled by the rule.
     """
-    n_rule = self.doc.createElement('CustomBuildRule')
-    n_rule.setAttribute('Name', name)
-    n_rule.setAttribute('ExecutionDescription', description)
-    n_rule.setAttribute('CommandLine', cmd)
-    n_rule.setAttribute('Outputs', ';'.join(outputs))
-    n_rule.setAttribute('FileExtensions', ';'.join(extensions))
-    n_rule.setAttribute('AdditionalDependencies',
-                        ';'.join(additional_dependencies))
-    self.n_rules.appendChild(n_rule)
-
-  def Write(self, writer=common.WriteOnDiff):
+    rule = ['CustomBuildRule',
+            {'Name': name,
+             'ExecutionDescription': description,
+             'CommandLine': cmd,
+             'Outputs': ';'.join(outputs),
+             'FileExtensions': ';'.join(extensions),
+             'AdditionalDependencies':
+                 ';'.join(additional_dependencies)
+            }]
+    self.rules_section.append(rule)
+
+  def WriteIfChanged(self):
     """Writes the tool file."""
-    f = writer(self.tool_file_path)
-    fix = xml_fix.XmlFix()
-    self.doc.writexml(f, encoding='Windows-1252', addindent='  ', newl='\r\n')
-    fix.Cleanup()
-    f.close()
-
-#------------------------------------------------------------------------------
+    content = ['VisualStudioToolFile',
+               {'Version': '8.00',
+                'Name': self.name
+               },
+               self.rules_section
+               ]
+    easy_xml.WriteXmlIfChanged(content, self.tool_file_path,
+                               encoding="Windows-1252")
index ba166a9..6c07e9a 100644 (file)
@@ -1,17 +1,15 @@
-#!/usr/bin/python2.4
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
+# Copyright (c) 2012 Google Inc. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
 
 """Visual Studio user preferences file writer."""
 
-import common
 import os
 import re
 import socket # for gethostname
-import xml.dom
-import xml_fix
+
+import gyp.common
+import gyp.easy_xml as easy_xml
 
 
 #------------------------------------------------------------------------------
@@ -56,49 +54,18 @@ def _QuoteWin32CommandLineArgs(args):
 class Writer(object):
   """Visual Studio XML user user file writer."""
 
-  def __init__(self, user_file_path, version):
+  def __init__(self, user_file_path, version, name):
     """Initializes the user file.
 
     Args:
       user_file_path: Path to the user file.
+      version: Version info.
+      name: Name of the user file.
     """
     self.user_file_path = user_file_path
     self.version = version
-    self.doc = None
-
-  def Create(self, name):
-    """Creates the user file document.
-
-    Args:
-      name: Name of the user file.
-    """
     self.name = name
-
-    # Create XML doc
-    xml_impl = xml.dom.getDOMImplementation()
-    self.doc = xml_impl.createDocument(None, 'VisualStudioUserFile', None)
-
-    # Add attributes to root element
-    self.n_root = self.doc.documentElement
-    self.n_root.setAttribute('Version', self.version.ProjectVersion())
-    self.n_root.setAttribute('Name', self.name)
-
-    # Add configurations section
-    self.n_configs = self.doc.createElement('Configurations')
-    self.n_root.appendChild(self.n_configs)
-
-  def _AddConfigToNode(self, parent, config_type, config_name):
-    """Adds a configuration to the parent node.
-
-    Args:
-      parent: Destination node.
-      config_type: Type of configuration node.
-      config_name: Configuration name.
-    """
-    # Add configuration node and its attributes
-    n_config = self.doc.createElement(config_type)
-    n_config.setAttribute('Name', config_name)
-    parent.appendChild(n_config)
+    self.configurations = {}
 
   def AddConfig(self, name):
     """Adds a configuration to the project.
@@ -106,8 +73,7 @@ class Writer(object):
     Args:
       name: Configuration name.
     """
-    self._AddConfigToNode(self.n_configs, 'Configuration', name)
-
+    self.configurations[name] = ['Configuration', {'Name': name}]
 
   def AddDebugSettings(self, config_name, command, environment = {},
                        working_directory=""):
@@ -121,62 +87,61 @@ class Writer(object):
     """
     command = _QuoteWin32CommandLineArgs(command)
 
-    n_cmd = self.doc.createElement('DebugSettings')
     abs_command = _FindCommandInPath(command[0])
-    n_cmd.setAttribute('Command', abs_command)
-    n_cmd.setAttribute('WorkingDirectory', working_directory)
-    n_cmd.setAttribute('CommandArguments', " ".join(command[1:]))
-    n_cmd.setAttribute('RemoteMachine', socket.gethostname())
 
     if environment and isinstance(environment, dict):
-      n_cmd.setAttribute('Environment',
-                         " ".join(['%s="%s"' % (key, val)
-                                   for (key,val) in environment.iteritems()]))
+      env_list = ['%s="%s"' % (key, val)
+                  for (key,val) in environment.iteritems()]
+      environment = ' '.join(env_list)
     else:
-      n_cmd.setAttribute('Environment', '')
-
-    n_cmd.setAttribute('EnvironmentMerge', 'true')
-
-    # Currently these are all "dummy" values that we're just setting
-    # in the default manner that MSVS does it.  We could use some of
-    # these to add additional capabilities, I suppose, but they might
-    # not have parity with other platforms then.
-    n_cmd.setAttribute('Attach', 'false')
-    n_cmd.setAttribute('DebuggerType', '3') # 'auto' debugger
-    n_cmd.setAttribute('Remote', '1')
-    n_cmd.setAttribute('RemoteCommand', '')
-    n_cmd.setAttribute('HttpUrl', '')
-    n_cmd.setAttribute('PDBPath', '')
-    n_cmd.setAttribute('SQLDebugging', '')
-    n_cmd.setAttribute('DebuggerFlavor', '0')
-    n_cmd.setAttribute('MPIRunCommand', '')
-    n_cmd.setAttribute('MPIRunArguments', '')
-    n_cmd.setAttribute('MPIRunWorkingDirectory', '')
-    n_cmd.setAttribute('ApplicationCommand', '')
-    n_cmd.setAttribute('ApplicationArguments', '')
-    n_cmd.setAttribute('ShimCommand', '')
-    n_cmd.setAttribute('MPIAcceptMode', '')
-    n_cmd.setAttribute('MPIAcceptFilter', '')
+      environment = ''
+
+    n_cmd = ['DebugSettings',
+             {'Command': abs_command,
+              'WorkingDirectory': working_directory,
+              'CommandArguments': " ".join(command[1:]),
+              'RemoteMachine': socket.gethostname(),
+              'Environment': environment,
+              'EnvironmentMerge': 'true',
+              # Currently these are all "dummy" values that we're just setting
+              # in the default manner that MSVS does it.  We could use some of
+              # these to add additional capabilities, I suppose, but they might
+              # not have parity with other platforms then.
+              'Attach': 'false',
+              'DebuggerType': '3',  # 'auto' debugger
+              'Remote': '1',
+              'RemoteCommand': '',
+              'HttpUrl': '',
+              'PDBPath': '',
+              'SQLDebugging': '',
+              'DebuggerFlavor': '0',
+              'MPIRunCommand': '',
+              'MPIRunArguments': '',
+              'MPIRunWorkingDirectory': '',
+              'ApplicationCommand': '',
+              'ApplicationArguments': '',
+              'ShimCommand': '',
+              'MPIAcceptMode': '',
+              'MPIAcceptFilter': ''
+             }]
 
     # Find the config, and add it if it doesn't exist.
-    found = False
-    for config in self.n_configs.childNodes:
-      if config.getAttribute("Name") == config_name:
-        found = True
-
-    if not found:
+    if config_name not in self.configurations:
       self.AddConfig(config_name)
 
     # Add the DebugSettings onto the appropriate config.
-    for config in self.n_configs.childNodes:
-      if config.getAttribute("Name") == config_name:
-        config.appendChild(n_cmd)
-        break
+    self.configurations[config_name].append(n_cmd)
 
-  def Write(self, writer=common.WriteOnDiff):
+  def WriteIfChanged(self):
     """Writes the user file."""
-    f = writer(self.user_file_path)
-    self.doc.writexml(f, encoding='Windows-1252', addindent='  ', newl='\r\n')
-    f.close()
-
-#------------------------------------------------------------------------------
+    configs = ['Configurations']
+    for config, spec in sorted(self.configurations.iteritems()):
+      configs.append(spec)
+
+    content = ['VisualStudioUserFile',
+               {'Version': self.version.ProjectVersion(),
+                'Name': self.name
+               },
+               configs]
+    easy_xml.WriteXmlIfChanged(content, self.user_file_path,
+                               encoding="Windows-1252")
diff --git a/Source/ThirdParty/gyp/pylib/gyp/MSVSUtil.py b/Source/ThirdParty/gyp/pylib/gyp/MSVSUtil.py
new file mode 100644 (file)
index 0000000..62e8d26
--- /dev/null
@@ -0,0 +1,267 @@
+# Copyright (c) 2013 Google Inc. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+"""Utility functions shared amongst the Windows generators."""
+
+import copy
+import os
+
+
+_TARGET_TYPE_EXT = {
+  'executable': '.exe',
+  'loadable_module': '.dll',
+  'shared_library': '.dll',
+}
+
+
+def _GetLargePdbShimCcPath():
+  """Returns the path of the large_pdb_shim.cc file."""
+  this_dir = os.path.abspath(os.path.dirname(__file__))
+  src_dir = os.path.abspath(os.path.join(this_dir, '..', '..'))
+  win_data_dir = os.path.join(src_dir, 'data', 'win')
+  large_pdb_shim_cc = os.path.join(win_data_dir, 'large-pdb-shim.cc')
+  return large_pdb_shim_cc
+
+
+def _DeepCopySomeKeys(in_dict, keys):
+  """Performs a partial deep-copy on |in_dict|, only copying the keys in |keys|.
+
+  Arguments:
+    in_dict: The dictionary to copy.
+    keys: The keys to be copied. If a key is in this list and doesn't exist in
+        |in_dict| this is not an error.
+  Returns:
+    The partially deep-copied dictionary.
+  """
+  d = {}
+  for key in keys:
+    if key not in in_dict:
+      continue
+    d[key] = copy.deepcopy(in_dict[key])
+  return d
+
+
+def _SuffixName(name, suffix):
+  """Add a suffix to the end of a target.
+
+  Arguments:
+    name: name of the target (foo#target)
+    suffix: the suffix to be added
+  Returns:
+    Target name with suffix added (foo_suffix#target)
+  """
+  parts = name.rsplit('#', 1)
+  parts[0] = '%s_%s' % (parts[0], suffix)
+  return '#'.join(parts)
+
+
+def _ShardName(name, number):
+  """Add a shard number to the end of a target.
+
+  Arguments:
+    name: name of the target (foo#target)
+    number: shard number
+  Returns:
+    Target name with shard added (foo_1#target)
+  """
+  return _SuffixName(name, str(number))
+
+
+def ShardTargets(target_list, target_dicts):
+  """Shard some targets apart to work around the linkers limits.
+
+  Arguments:
+    target_list: List of target pairs: 'base/base.gyp:base'.
+    target_dicts: Dict of target properties keyed on target pair.
+  Returns:
+    Tuple of the new sharded versions of the inputs.
+  """
+  # Gather the targets to shard, and how many pieces.
+  targets_to_shard = {}
+  for t in target_dicts:
+    shards = int(target_dicts[t].get('msvs_shard', 0))
+    if shards:
+      targets_to_shard[t] = shards
+  # Shard target_list.
+  new_target_list = []
+  for t in target_list:
+    if t in targets_to_shard:
+      for i in range(targets_to_shard[t]):
+        new_target_list.append(_ShardName(t, i))
+    else:
+      new_target_list.append(t)
+  # Shard target_dict.
+  new_target_dicts = {}
+  for t in target_dicts:
+    if t in targets_to_shard:
+      for i in range(targets_to_shard[t]):
+        name = _ShardName(t, i)
+        new_target_dicts[name] = copy.copy(target_dicts[t])
+        new_target_dicts[name]['target_name'] = _ShardName(
+             new_target_dicts[name]['target_name'], i)
+        sources = new_target_dicts[name].get('sources', [])
+        new_sources = []
+        for pos in range(i, len(sources), targets_to_shard[t]):
+          new_sources.append(sources[pos])
+        new_target_dicts[name]['sources'] = new_sources
+    else:
+      new_target_dicts[t] = target_dicts[t]
+  # Shard dependencies.
+  for t in new_target_dicts:
+    dependencies = copy.copy(new_target_dicts[t].get('dependencies', []))
+    new_dependencies = []
+    for d in dependencies:
+      if d in targets_to_shard:
+        for i in range(targets_to_shard[d]):
+          new_dependencies.append(_ShardName(d, i))
+      else:
+        new_dependencies.append(d)
+    new_target_dicts[t]['dependencies'] = new_dependencies
+
+  return (new_target_list, new_target_dicts)
+
+
+def _GetPdbPath(target_dict, config_name, vars):
+  """Returns the path to the PDB file that will be generated by a given
+  configuration.
+
+  The lookup proceeds as follows:
+    - Look for an explicit path in the VCLinkerTool configuration block.
+    - Look for an 'msvs_large_pdb_path' variable.
+    - Use '<(PRODUCT_DIR)/<(product_name).(exe|dll).pdb' if 'product_name' is
+      specified.
+    - Use '<(PRODUCT_DIR)/<(target_name).(exe|dll).pdb'.
+
+  Arguments:
+    target_dict: The target dictionary to be searched.
+    config_name: The name of the configuration of interest.
+    vars: A dictionary of common GYP variables with generator-specific values.
+  Returns:
+    The path of the corresponding PDB file.
+  """
+  config = target_dict['configurations'][config_name]
+  msvs = config.setdefault('msvs_settings', {})
+
+  linker = msvs.get('VCLinkerTool', {})
+
+  pdb_path = linker.get('ProgramDatabaseFile')
+  if pdb_path:
+    return pdb_path
+
+  variables = target_dict.get('variables', {})
+  pdb_path = variables.get('msvs_large_pdb_path', None)
+  if pdb_path:
+    return pdb_path
+
+
+  pdb_base = target_dict.get('product_name', target_dict['target_name'])
+  pdb_base = '%s%s.pdb' % (pdb_base, _TARGET_TYPE_EXT[target_dict['type']])
+  pdb_path = vars['PRODUCT_DIR'] + '/' + pdb_base
+
+  return pdb_path
+
+
+def InsertLargePdbShims(target_list, target_dicts, vars):
+  """Insert a shim target that forces the linker to use 4KB pagesize PDBs.
+
+  This is a workaround for targets with PDBs greater than 1GB in size, the
+  limit for the 1KB pagesize PDBs created by the linker by default.
+
+  Arguments:
+    target_list: List of target pairs: 'base/base.gyp:base'.
+    target_dicts: Dict of target properties keyed on target pair.
+    vars: A dictionary of common GYP variables with generator-specific values.
+  Returns:
+    Tuple of the shimmed version of the inputs.
+  """
+  # Determine which targets need shimming.
+  targets_to_shim = []
+  for t in target_dicts:
+    target_dict = target_dicts[t]
+
+    # We only want to shim targets that have msvs_large_pdb enabled.
+    if not int(target_dict.get('msvs_large_pdb', 0)):
+      continue
+    # This is intended for executable, shared_library and loadable_module
+    # targets where every configuration is set up to produce a PDB output.
+    # If any of these conditions is not true then the shim logic will fail
+    # below.
+    targets_to_shim.append(t)
+
+  large_pdb_shim_cc = _GetLargePdbShimCcPath()
+
+  for t in targets_to_shim:
+    target_dict = target_dicts[t]
+    target_name = target_dict.get('target_name')
+
+    base_dict = _DeepCopySomeKeys(target_dict,
+          ['configurations', 'default_configuration', 'toolset'])
+
+    # This is the dict for copying the source file (part of the GYP tree)
+    # to the intermediate directory of the project. This is necessary because
+    # we can't always build a relative path to the shim source file (on Windows
+    # GYP and the project may be on different drives), and Ninja hates absolute
+    # paths (it ends up generating the .obj and .obj.d alongside the source
+    # file, polluting GYPs tree).
+    copy_suffix = 'large_pdb_copy'
+    copy_target_name = target_name + '_' + copy_suffix
+    full_copy_target_name = _SuffixName(t, copy_suffix)
+    shim_cc_basename = os.path.basename(large_pdb_shim_cc)
+    shim_cc_dir = vars['SHARED_INTERMEDIATE_DIR'] + '/' + copy_target_name
+    shim_cc_path = shim_cc_dir + '/' + shim_cc_basename
+    copy_dict = copy.deepcopy(base_dict)
+    copy_dict['target_name'] = copy_target_name
+    copy_dict['type'] = 'none'
+    copy_dict['sources'] = [ large_pdb_shim_cc ]
+    copy_dict['copies'] = [{
+      'destination': shim_cc_dir,
+      'files': [ large_pdb_shim_cc ]
+    }]
+
+    # This is the dict for the PDB generating shim target. It depends on the
+    # copy target.
+    shim_suffix = 'large_pdb_shim'
+    shim_target_name = target_name + '_' + shim_suffix
+    full_shim_target_name = _SuffixName(t, shim_suffix)
+    shim_dict = copy.deepcopy(base_dict)
+    shim_dict['target_name'] = shim_target_name
+    shim_dict['type'] = 'static_library'
+    shim_dict['sources'] = [ shim_cc_path ]
+    shim_dict['dependencies'] = [ full_copy_target_name ]
+
+    # Set up the shim to output its PDB to the same location as the final linker
+    # target.
+    for config_name, config in shim_dict.get('configurations').iteritems():
+      pdb_path = _GetPdbPath(target_dict, config_name, vars)
+
+      # A few keys that we don't want to propagate.
+      for key in ['msvs_precompiled_header', 'msvs_precompiled_source', 'test']:
+        config.pop(key, None)
+
+      msvs = config.setdefault('msvs_settings', {})
+
+      # Update the compiler directives in the shim target.
+      compiler = msvs.setdefault('VCCLCompilerTool', {})
+      compiler['DebugInformationFormat'] = '3'
+      compiler['ProgramDataBaseFileName'] = pdb_path
+
+      # Set the explicit PDB path in the appropriate configuration of the
+      # original target.
+      config = target_dict['configurations'][config_name]
+      msvs = config.setdefault('msvs_settings', {})
+      linker = msvs.setdefault('VCLinkerTool', {})
+      linker['GenerateDebugInformation'] = 'true'
+      linker['ProgramDatabaseFile'] = pdb_path
+
+    # Add the new targets. They must go to the beginning of the list so that
+    # the dependency generation works as expected in ninja.
+    target_list.insert(0, full_copy_target_name)
+    target_list.insert(0, full_shim_target_name)
+    target_dicts[full_copy_target_name] = copy_dict
+    target_dicts[full_shim_target_name] = shim_dict
+
+    # Update the original target to depend on the shim target.
+    target_dict.setdefault('dependencies', []).append(full_shim_target_name)
+
+  return (target_list, target_dicts)
\ No newline at end of file
index f206eb6..2d95cd0 100755 (executable)
@@ -1,28 +1,32 @@
-#!/usr/bin/python
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
+# Copyright (c) 2013 Google Inc. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
 
 """Handle version information related to Visual Stuio."""
 
+import errno
 import os
 import re
 import subprocess
 import sys
+import gyp
 
 
-class VisualStudioVersion:
+class VisualStudioVersion(object):
   """Information regarding a version of Visual Studio."""
 
   def __init__(self, short_name, description,
-               solution_version, project_version, flat_sln, uses_vcxproj):
+               solution_version, project_version, flat_sln, uses_vcxproj,
+               path, sdk_based, default_toolset=None):
     self.short_name = short_name
     self.description = description
     self.solution_version = solution_version
     self.project_version = project_version
     self.flat_sln = flat_sln
     self.uses_vcxproj = uses_vcxproj
+    self.path = path
+    self.sdk_based = sdk_based
+    self.default_toolset = default_toolset
 
   def ShortName(self):
     return self.short_name
@@ -50,29 +54,119 @@ class VisualStudioVersion:
     """Returns the file extension for the project."""
     return self.uses_vcxproj and '.vcxproj' or '.vcproj'
 
-def _RegistryGetValue(key, value):
-  """Use reg.exe to read a paricular key.
+  def Path(self):
+    """Returns the path to Visual Studio installation."""
+    return self.path
+
+  def ToolPath(self, tool):
+    """Returns the path to a given compiler tool. """
+    return os.path.normpath(os.path.join(self.path, "VC/bin", tool))
+
+  def DefaultToolset(self):
+    """Returns the msbuild toolset version that will be used in the absence
+    of a user override."""
+    return self.default_toolset
+
+  def SetupScript(self, target_arch):
+    """Returns a command (with arguments) to be used to set up the
+    environment."""
+    # Check if we are running in the SDK command line environment and use
+    # the setup script from the SDK if so. |target_arch| should be either
+    # 'x86' or 'x64'.
+    assert target_arch in ('x86', 'x64')
+    sdk_dir = os.environ.get('WindowsSDKDir')
+    if self.sdk_based and sdk_dir:
+      return [os.path.normpath(os.path.join(sdk_dir, 'Bin/SetEnv.Cmd')),
+              '/' + target_arch]
+    else:
+      # We don't use VC/vcvarsall.bat for x86 because vcvarsall calls
+      # vcvars32, which it can only find if VS??COMNTOOLS is set, which it
+      # isn't always.
+      if target_arch == 'x86':
+        return [os.path.normpath(
+          os.path.join(self.path, 'Common7/Tools/vsvars32.bat'))]
+      else:
+        assert target_arch == 'x64'
+        arg = 'x86_amd64'
+        if (os.environ.get('PROCESSOR_ARCHITECTURE') == 'AMD64' or
+            os.environ.get('PROCESSOR_ARCHITEW6432') == 'AMD64'):
+          # Use the 64-on-64 compiler if we can.
+          arg = 'amd64'
+        return [os.path.normpath(
+            os.path.join(self.path, 'VC/vcvarsall.bat')), arg]
+
+
+def _RegistryQueryBase(sysdir, key, value):
+  """Use reg.exe to read a particular key.
 
   While ideally we might use the win32 module, we would like gyp to be
   python neutral, so for instance cygwin python lacks this module.
 
   Arguments:
+    sysdir: The system subdirectory to attempt to launch reg.exe from.
     key: The registry key to read from.
     value: The particular value to read.
   Return:
-    The contents there, or None for failure.
+    stdout from reg.exe, or None for failure.
   """
-  # Skip if not on Windows.
+  # Skip if not on Windows or Python Win32 setup issue
   if sys.platform not in ('win32', 'cygwin'):
     return None
-  # Run reg.exe.
-  cmd = [os.path.join(os.environ.get('WINDIR', ''), 'System32', 'reg.exe'),
-         'query', key, '/v', value]
+  # Setup params to pass to and attempt to launch reg.exe
+  cmd = [os.path.join(os.environ.get('WINDIR', ''), sysdir, 'reg.exe'),
+         'query', key]
+  if value:
+    cmd.extend(['/v', value])
   p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+  # Obtain the stdout from reg.exe, reading to the end so p.returncode is valid
+  # Note that the error text may be in [1] in some cases
   text = p.communicate()[0]
-  # Require a successful return value.
+  # Check return code from reg.exe; officially 0==success and 1==error
   if p.returncode:
     return None
+  return text
+
+
+def _RegistryQuery(key, value=None):
+  """Use reg.exe to read a particular key through _RegistryQueryBase.
+
+  First tries to launch from %WinDir%\Sysnative to avoid WoW64 redirection. If
+  that fails, it falls back to System32.  Sysnative is available on Vista and
+  up and available on Windows Server 2003 and XP through KB patch 942589. Note
+  that Sysnative will always fail if using 64-bit python due to it being a
+  virtual directory and System32 will work correctly in the first place.
+
+  KB 942589 - http://support.microsoft.com/kb/942589/en-us.
+
+  Arguments:
+    key: The registry key.
+    value: The particular registry value to read (optional).
+  Return:
+    stdout from reg.exe, or None for failure.
+  """
+  text = None
+  try:
+    text = _RegistryQueryBase('Sysnative', key, value)
+  except OSError, e:
+    if e.errno == errno.ENOENT:
+      text = _RegistryQueryBase('System32', key, value)
+    else:
+      raise
+  return text
+
+
+def _RegistryGetValue(key, value):
+  """Use reg.exe to obtain the value of a registry key.
+
+  Args:
+    key: The registry key.
+    value: The particular registry value to read.
+  Return:
+    contents of the registry key's value, or None on failure.
+  """
+  text = _RegistryQuery(key, value)
+  if not text:
+    return None
   # Extract value.
   match = re.search(r'REG_\w+\s+([^\r]+)\r\n', text)
   if not match:
@@ -88,53 +182,100 @@ def _RegistryKeyExists(key):
   Return:
     True if the key exists
   """
-  # Skip if not on Windows.
-  if sys.platform not in ('win32', 'cygwin'):
-    return None
-  # Run reg.exe.
-  cmd = [os.path.join(os.environ.get('WINDIR', ''), 'System32', 'reg.exe'),
-         'query', key]
-  p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
-  return p.returncode == 0
+  if not _RegistryQuery(key):
+    return False
+  return True
 
 
-def _CreateVersion(name):
+def _CreateVersion(name, path, sdk_based=False):
+  """Sets up MSVS project generation.
+
+  Setup is based off the GYP_MSVS_VERSION environment variable or whatever is
+  autodetected if GYP_MSVS_VERSION is not explicitly specified. If a version is
+  passed in that doesn't match a value in versions python will throw a error.
+  """
+  if path:
+    path = os.path.normpath(path)
   versions = {
+      '2012': VisualStudioVersion('2012',
+                                  'Visual Studio 2012',
+                                  solution_version='12.00',
+                                  project_version='4.0',
+                                  flat_sln=False,
+                                  uses_vcxproj=True,
+                                  path=path,
+                                  sdk_based=sdk_based,
+                                  default_toolset='v110'),
+      '2012e': VisualStudioVersion('2012e',
+                                   'Visual Studio 2012',
+                                   solution_version='12.00',
+                                   project_version='4.0',
+                                   flat_sln=True,
+                                   uses_vcxproj=True,
+                                   path=path,
+                                   sdk_based=sdk_based,
+                                   default_toolset='v110'),
       '2010': VisualStudioVersion('2010',
                                   'Visual Studio 2010',
                                   solution_version='11.00',
                                   project_version='4.0',
                                   flat_sln=False,
-                                  uses_vcxproj=True),
+                                  uses_vcxproj=True,
+                                  path=path,
+                                  sdk_based=sdk_based),
+      '2010e': VisualStudioVersion('2010e',
+                                   'Visual Studio 2010',
+                                   solution_version='11.00',
+                                   project_version='4.0',
+                                   flat_sln=True,
+                                   uses_vcxproj=True,
+                                   path=path,
+                                   sdk_based=sdk_based),
       '2008': VisualStudioVersion('2008',
                                   'Visual Studio 2008',
                                   solution_version='10.00',
                                   project_version='9.00',
                                   flat_sln=False,
-                                  uses_vcxproj=False),
+                                  uses_vcxproj=False,
+                                  path=path,
+                                  sdk_based=sdk_based),
       '2008e': VisualStudioVersion('2008e',
                                    'Visual Studio 2008',
                                    solution_version='10.00',
                                    project_version='9.00',
                                    flat_sln=True,
-                                   uses_vcxproj=False),
+                                   uses_vcxproj=False,
+                                   path=path,
+                                   sdk_based=sdk_based),
       '2005': VisualStudioVersion('2005',
                                   'Visual Studio 2005',
                                   solution_version='9.00',
                                   project_version='8.00',
                                   flat_sln=False,
-                                  uses_vcxproj=False),
+                                  uses_vcxproj=False,
+                                  path=path,
+                                  sdk_based=sdk_based),
       '2005e': VisualStudioVersion('2005e',
                                    'Visual Studio 2005',
                                    solution_version='9.00',
                                    project_version='8.00',
                                    flat_sln=True,
-                                   uses_vcxproj=False),
+                                   uses_vcxproj=False,
+                                   path=path,
+                                   sdk_based=sdk_based),
   }
   return versions[str(name)]
 
 
-def _DetectVisualStudioVersions():
+def _ConvertToCygpath(path):
+  """Convert to cygwin path if we are using cygwin."""
+  if sys.platform == 'cygwin':
+    p = subprocess.Popen(['cygpath', path], stdout=subprocess.PIPE)
+    path = p.communicate()[0].strip()
+  return path
+
+
+def _DetectVisualStudioVersions(versions_to_check, force_express):
   """Collect the list of installed visual studio versions.
 
   Returns:
@@ -143,38 +284,52 @@ def _DetectVisualStudioVersions():
     Base this on the registry and a quick check if devenv.exe exists.
     Only versions 8-10 are considered.
     Possibilities are:
-      2005 - Visual Studio 2005 (8)
-      2008 - Visual Studio 2008 (9)
-      2010 - Visual Studio 2010 (10)
+      2005(e) - Visual Studio 2005 (8)
+      2008(e) - Visual Studio 2008 (9)
+      2010(e) - Visual Studio 2010 (10)
+      2012(e) - Visual Studio 2012 (11)
+    Where (e) is e for express editions of MSVS and blank otherwise.
   """
-  version_to_year = {'8.0': '2005', '9.0': '2008', '10.0': '2010'}
+  version_to_year = {
+      '8.0': '2005', '9.0': '2008', '10.0': '2010', '11.0': '2012'}
   versions = []
-  # For now, prefer versions before VS2010
-  for version in ('9.0', '8.0', '10.0'):
-    # Check if VS2010 and later is installed as specified by
-    # http://msdn.microsoft.com/en-us/library/bb164659.aspx
-    key32 = r'HKLM\SOFTWARE\Microsoft\DevDiv\VS\Servicing\%s' % version
-    key64 = r'HKLM\SOFTWARE\Wow6432Node\Microsoft\DevDiv\VS\Servicing\%sD' % (
-         version)
-    if _RegistryKeyExists(key32) or _RegistryKeyExists(key64):
-      # Add this one.
-      # TODO(jeanluc) This does not check for an express version.
-      # TODO(jeanluc) Uncomment this line when ready to support VS2010:
-      # versions.append(_CreateVersion(version_to_year[version]))
-      continue
-    # Get the install dir for this version.
-    key = r'HKLM\Software\Microsoft\VisualStudio\%s' % version
-    path = _RegistryGetValue(key, 'InstallDir')
-    if not path:
-      continue
-    # Check for full.
-    if os.path.exists(os.path.join(path, 'devenv.exe')):
-      # Add this one.
-      versions.append(_CreateVersion(version_to_year[version]))
-    # Check for express.
-    elif os.path.exists(os.path.join(path, 'vcexpress.exe')):
-      # Add this one.
-      versions.append(_CreateVersion(version_to_year[version] + 'e'))
+  for version in versions_to_check:
+    # Old method of searching for which VS version is installed
+    # We don't use the 2010-encouraged-way because we also want to get the
+    # path to the binaries, which it doesn't offer.
+    keys = [r'HKLM\Software\Microsoft\VisualStudio\%s' % version,
+            r'HKLM\Software\Wow6432Node\Microsoft\VisualStudio\%s' % version,
+            r'HKLM\Software\Microsoft\VCExpress\%s' % version,
+            r'HKLM\Software\Wow6432Node\Microsoft\VCExpress\%s' % version]
+    for index in range(len(keys)):
+      path = _RegistryGetValue(keys[index], 'InstallDir')
+      if not path:
+        continue
+      path = _ConvertToCygpath(path)
+      # Check for full.
+      full_path = os.path.join(path, 'devenv.exe')
+      express_path = os.path.join(path, 'vcexpress.exe')
+      if not force_express and os.path.exists(full_path):
+        # Add this one.
+        versions.append(_CreateVersion(version_to_year[version],
+            os.path.join(path, '..', '..')))
+      # Check for express.
+      elif os.path.exists(express_path):
+        # Add this one.
+        versions.append(_CreateVersion(version_to_year[version] + 'e',
+            os.path.join(path, '..', '..')))
+
+    # The old method above does not work when only SDK is installed.
+    keys = [r'HKLM\Software\Microsoft\VisualStudio\SxS\VC7',
+            r'HKLM\Software\Wow6432Node\Microsoft\VisualStudio\SxS\VC7']
+    for index in range(len(keys)):
+      path = _RegistryGetValue(keys[index], version)
+      if not path:
+        continue
+      path = _ConvertToCygpath(path)
+      versions.append(_CreateVersion(version_to_year[version] + 'e',
+          os.path.join(path, '..'), sdk_based=True))
+
   return versions
 
 
@@ -189,12 +344,30 @@ def SelectVisualStudioVersion(version='auto'):
   # In auto mode, check environment variable for override.
   if version == 'auto':
     version = os.environ.get('GYP_MSVS_VERSION', 'auto')
-  # In auto mode, pick the most preferred version present.
-  if version == 'auto':
-    versions = _DetectVisualStudioVersions()
-    if not versions:
-      # Default to 2005.
-      return _CreateVersion('2005')
-    return versions[0]
-  # Convert version string into a version object.
-  return _CreateVersion(version)
+  version_map = {
+    'auto': ('10.0', '9.0', '8.0', '11.0'),
+    '2005': ('8.0',),
+    '2005e': ('8.0',),
+    '2008': ('9.0',),
+    '2008e': ('9.0',),
+    '2010': ('10.0',),
+    '2010e': ('10.0',),
+    '2012': ('11.0',),
+    '2012e': ('11.0',),
+  }
+  override_path = os.environ.get('GYP_MSVS_OVERRIDE_PATH')
+  if override_path:
+    msvs_version = os.environ.get('GYP_MSVS_VERSION')
+    if not msvs_version or 'e' not in msvs_version:
+      raise ValueError('GYP_MSVS_OVERRIDE_PATH requires GYP_MSVS_VERSION to be '
+                       'set to an "e" version (e.g. 2010e)')
+    return _CreateVersion(msvs_version, override_path, sdk_based=True)
+  version = str(version)
+  versions = _DetectVisualStudioVersions(version_map[version], 'e' in version)
+  if not versions:
+    if version == 'auto':
+      # Default to 2005 if we couldn't find anything
+      return _CreateVersion('2005', None)
+    else:
+      return _CreateVersion(version, None)
+  return versions[0]
index 9c57bcb..42d845e 100644 (file)
@@ -1,6 +1,4 @@
-#!/usr/bin/env python
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
+# Copyright (c) 2012 Google Inc. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
 
@@ -86,7 +84,7 @@ class NoneTarget(TargetBase):
   """
   A GYP target type of 'none', implicitly or explicitly.
   """
-  def write_target(self, fp, pre=''):
+  def write_target(self, fp, src_dir='', pre=''):
     fp.write('\ntarget_files.extend(input_files)\n')
 
 
@@ -196,5 +194,6 @@ TargetMap = {
   'loadable_module' : LoadableModuleTarget,
 }
 
+
 def Target(spec):
   return TargetMap[spec.get('type')](spec)
index 4b088f6..3769c52 100644 (file)
@@ -1,6 +1,6 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 
-# Copyright (c) 2009 Google Inc. All rights reserved.
+# Copyright (c) 2012 Google Inc. All rights reserved