Modify RegenerateAppendFlag() to skip duplicate values in environment values

This is useful in cases where environment variables are updated by scripts and
so may contain duplicate entries. This change prevents those duplicates from
appearing in the makefile regeneration rule.
Review URL: https://chromiumcodereview.appspot.com/10709007

git-svn-id: http://gyp.googlecode.com/svn/trunk@1432 78cadc50-ecff-11dd-a971-7dbc132099af
When linking an executable, add the -F options.

When linking an executable, every directory in mac_framework_dirs must be
added as a -F option.

Patch from Benjamin Lerman <qsr@chromium.org>!
Review URL: https://chromiumcodereview.appspot.com/10792018/

git-svn-id: http://gyp.googlecode.com/svn/trunk@1433 78cadc50-ecff-11dd-a971-7dbc132099af
Add support for CONFIGURATION_NAME to ninja.

Patch from Benjamin Lerman <qsr@chromium.org>!
Review URL: https://chromiumcodereview.appspot.com/10778037/

git-svn-id: http://gyp.googlecode.com/svn/trunk@1434 78cadc50-ecff-11dd-a971-7dbc132099af
Fixing failing gyp-test-multiple-values.

Hermetic cygwin isn't part of the gyp checkout.
Bare actions can't be tested, without using msvs_cygwin_shell: 0.

Additionally msvs doesn't detect changes in build rules that
aren't reflected in timestamps on the filesytem.
Adding rebuild=True to make the test pass.

BUG=None
TEST=None
R=steveblock@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10790130

git-svn-id: http://gyp.googlecode.com/svn/trunk@1435 78cadc50-ecff-11dd-a971-7dbc132099af
Make sure OutputDirectory, IntermediateDirectory, and TargetPath have their slashes
oriented correctly.

I'm not sure if this is the 'best' way to accomplish this. A better way might be to
rationalize all paths to unix-style on input, and then rationalize them back to whatever
is most appropriate for the selected generator (I believe only msvs needs them in windows-
form... ninja can handle posix paths on non-posix systems, I think). However, that would
have been a much more significant change.

R=cmp,nsylvain,scottmg,sgk,thakis
TEST=test/builddir
Review URL: https://chromiumcodereview.appspot.com/10805078

git-svn-id: http://gyp.googlecode.com/svn/trunk@1436 78cadc50-ecff-11dd-a971-7dbc132099af
ninja windows: support basic generation of manifests at link time

Basic support of manifest files being generated. There's two steps to this,
the first is to have the linker generate an intermediate manifest based on
what runtime library is in use (this is a temporary file). As a post process,
the manifest tool combines the intermediate manifest file with any
user-provided manifests (the AdditionalManifestFiles setting) and generates
the final manifest that sits next to the binary.

We currently do not support embedding the manifest as it's not currently
needed for dev builds, and is complicated by the fact that the final binary
must be linked twice to support embedding the mainfest.

R=thakis@chromium.org

Review URL: https://chromiumcodereview.appspot.com/10827010

git-svn-id: http://gyp.googlecode.com/svn/trunk@1437 78cadc50-ecff-11dd-a971-7dbc132099af
ninja windows: check correct condition for manifest warning

Was warning when value set to 'false'. Herp derp. :(

TBR=thakis@chromium.org

Review URL: https://chromiumcodereview.appspot.com/10826020

git-svn-id: http://gyp.googlecode.com/svn/trunk@1438 78cadc50-ecff-11dd-a971-7dbc132099af
ninja windows: don't use /allowisolation with a .def file

Apparently (per http://build.chromium.org/f/client/gyp/) using a .def file
makes the linker think it's linking a DLL when it's actually an exe, which
means it errors out due to the just-added /ALLOWISOLATION flag for manifests.
So, if we have a def file, don't add that flag. This appears to match what the
IDE does implicitly.

TBR=thakis@chromium.org

Review URL: https://chromiumcodereview.appspot.com/10827024

git-svn-id: http://gyp.googlecode.com/svn/trunk@1439 78cadc50-ecff-11dd-a971-7dbc132099af
ninja/mac: allow path-based specification of SDKROOT

This matches the Xcode behavior of SDKROOT treatment. For SDKROOT values that
don’t begin with macosx, SDKROOT is treated as a path. When a relative path,
it is taken as relative to the .xcodeproj's containing directory, although
that isn't duplicated here because it's not likely to be of use. When SDKROOT
is an absolute path, it points to the root directory of the SDK itself, such
as /Developer/SDKs/MacOSX10.6.sdk or
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk .
Review URL: https://chromiumcodereview.appspot.com/10821053

git-svn-id: http://gyp.googlecode.com/svn/trunk@1440 78cadc50-ecff-11dd-a971-7dbc132099af
Fix bug: non-cygwin actions incorrectly run options through _FixPath.

This adds an additional heuristic to the existing one. Now if an option begins
with either a '/' OR a '-', it assumes it's not a strict path.

Added a TODO which notes that the existing (and new) behavior will miss options
such as '--opt=a/posix/path', and '/opt:a/posix/path'.
Review URL: https://chromiumcodereview.appspot.com/10829049

git-svn-id: http://gyp.googlecode.com/svn/trunk@1441 78cadc50-ecff-11dd-a971-7dbc132099af
Allow <(CONFIGURATION_NAME) to be used in path for ninja.

The handling of $! variable was supposing that the path was starting with the
variable, and was incorrect for CONFIGURATION_NAME. Updating GypPathToNinja to
handle the case where the variable is not a prefix of the path.

Review URL: http://codereview.chromium.org/10825013/
Patch from Benjamin Lerman <qsr@chromium.org>

git-svn-id: http://gyp.googlecode.com/svn/trunk@1442 78cadc50-ecff-11dd-a971-7dbc132099af
ninja windows: don't spam reg.exe calls if we can't find DirectX installation

R=thakis@chromium.org
BUG=gyp:289

Review URL: https://chromiumcodereview.appspot.com/10837010

git-svn-id: http://gyp.googlecode.com/svn/trunk@1443 78cadc50-ecff-11dd-a971-7dbc132099af
make unitests less fragile in the face of debug output changes.  This is achieved by ignoring line number differences when comparing gyp output.

Don't report backtrace of skipped tests by default.

Use dict.pop() to retrieve and remove elements from dicts without a try/catch block.

BUG=

Review URL: https://chromiumcodereview.appspot.com/10829079

git-svn-id: http://gyp.googlecode.com/svn/trunk@1444 78cadc50-ecff-11dd-a971-7dbc132099af
 Fixing issues with path.

 For XCode: Fixing problem when 2 sources have the same normalize path, but not
            the same exact path.
 For Make: Fixing problem when a source path contain a variable.
Review URL: https://chromiumcodereview.appspot.com/10833047

git-svn-id: http://gyp.googlecode.com/svn/trunk@1445 78cadc50-ecff-11dd-a971-7dbc132099af
ninja windows: unfork back to 'depfile' name rather than 'deplist'

Windows ninja binary in depot_tools currently supports both as synonyms. One
suggestion Evan had for upstreaming was to use 'depfile' everywhere and make
depdb usage a global switch that interpreted that name differently.

This switches gyp to generate 'depfile' entries rather than 'deplist' entries.

R=thakis@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10824124

git-svn-id: http://gyp.googlecode.com/svn/trunk@1446 78cadc50-ecff-11dd-a971-7dbc132099af
ninja windows: Add build.ninja variable to turn on dep_database

Part of upstreaming, adding top-level ninja flag indicating that 'depfile'
entry is a key for the dep_database.

R=thakis@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10834116

git-svn-id: http://gyp.googlecode.com/svn/trunk@1447 78cadc50-ecff-11dd-a971-7dbc132099af
ninja: make cross-compilation use $CC/$CXX for the target compiler 

Took over from http://codereview.chromium.org/9649016/ 

BUG=None 
TEST=set CC/CXX to cross-compiler, set GYP_CROSSCOMPILE to 1, run gyp, ninja chrome. 



git-svn-id: http://gyp.googlecode.com/svn/trunk@1448 78cadc50-ecff-11dd-a971-7dbc132099af
Let GYP recognize the 'WDK_DIR' environment variable when generating ninja output on Windows.

TEST=Build chrome.exe using the compiler from Windows SDK 7.1

Review URL: https://chromiumcodereview.appspot.com/10377053


git-svn-id: http://gyp.googlecode.com/svn/trunk@1449 78cadc50-ecff-11dd-a971-7dbc132099af
Fixing bogus commit message for r1449:

======
Pass defines to midl.exe.

Code review: https://chromiumcodereview.appspot.com/10843056/

BUG=chromium:140324
TEST=test/win/gyptest-midl-rules.py
======


git-svn-id: http://gyp.googlecode.com/svn/trunk@1450 78cadc50-ecff-11dd-a971-7dbc132099af
Reverting r1448 "ninja: make cross-compilation use $CC/$CXX for the target compiler" because it breaks Mac build.

TBR=piman@chromium.org


git-svn-id: http://gyp.googlecode.com/svn/trunk@1451 78cadc50-ecff-11dd-a971-7dbc132099af