MSVS 2008: Fix to ensure that actions are re-run when the command changes

There was some code to re-run an action, but it only worked if the
command change came from a change to a .gyp file, and only if the
"inputs" list was empty.  It didn't work if the command change came
from a change to a .gypi file.

To fix this, we create "*.gypcmd" stamp files that contain the command
text, and when the command text changes we update these files'
timestamps.

If a Gyp target contains multiple actions, this should rerun only the
actions that changed.

BUG=http://code.google.com/p/gyp/issues/detail?id=262
TEST=test/actions-args-change

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1362 78cadc50-ecff-11dd-a971-7dbc132099af
ninja windows: fix mapping of optimization flags

"FavorSizeOrSpeed" should map to Os/Ot. These were backwards.

"Optimization" can also be set to Disabled/Size/Speed/Max which maps to
Od/O1/O2/Ox. Seems a bit silly, but that's how VS exposes the compiler
settings. Previously, Size/Speed here were incorrectly duplicating the Os/Ot
setting rather than O1/O2.

So, before we were basically doing some random set of optimizing flags.

(I have no idea what the compiler actually attempts to do when you set O1+Ot
or O2+Os. I guess it must be macro vs. micro level, but it's not very clear
from the names. Chromium sets them consistently.)

R=thakis@chromium.org
BUG=126315

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1363 78cadc50-ecff-11dd-a971-7dbc132099af
Create a gyp generator for Eclipse CDT settings

This generate will generate an XML file that can be import into an
Eclipse CDT project. It will set up all the necesary include paths and
defines.

Review URL: https://chromiumcodereview.appspot.com/9972015/
Patch from Jesse Greenwald <jgreenwald@chromium.org>



git-svn-id: http://gyp.googlecode.com/svn/trunk@1364 78cadc50-ecff-11dd-a971-7dbc132099af
Fixup dependencies in rules for VS2010 (MSBuild).

VS2010 uses some file tracking juju in various .tlog files to do reality-based dependency tracking.  Custom rules don't use this magic, so the dependency between a rule's inputs and its target is lost.  This change causes a foo.read.1.tlog file to be generated.  This file contains the list of additional dependencies for each primary input file.

BUG=gyp:263
TEST=python gyptest.py -f msvs test/rules-rebuild/gyptest-default.py
Review URL: https://chromiumcodereview.appspot.com/10358006

git-svn-id: http://gyp.googlecode.com/svn/trunk@1365 78cadc50-ecff-11dd-a971-7dbc132099af
Because the files are .c and were without warnings-as-errors, the non-declared call to printf that was intended to cause an error ended up just being a warning. So, if PCH wasn't working, the test would succeed anyway. Turn on warnings-as-errors to fix this.

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1366 78cadc50-ecff-11dd-a971-7dbc132099af
Remove duplicate function definitions I accidentally added in r1357.

TBR=scottmg
Review URL: https://chromiumcodereview.appspot.com/10383073

git-svn-id: http://gyp.googlecode.com/svn/trunk@1367 78cadc50-ecff-11dd-a971-7dbc132099af
ninja: Add '/', '\', and '.' to the set of shell-safe characters.

With this, -I flags no longer get escaped. This is mostly OCD, but
a back-of-the-envelope calculation says that this might make empty
builds faster by 20ms or so.
Review URL: https://chromiumcodereview.appspot.com/10310068

git-svn-id: http://gyp.googlecode.com/svn/trunk@1368 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@1369 78cadc50-ecff-11dd-a971-7dbc132099af
Remove some unused variables reported by pyflakes

BUG=none
TEST=trybots

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1370 78cadc50-ecff-11dd-a971-7dbc132099af
ninja windows: fix long command lines in more cases

Discovered that: 1) the long command line test wasn't testing all the link
command line (.lib and .dll weren't exercised), and 2) the standard executable
test was right at the edge of the command line length limit, and so sometimes
wouldn't fail.

So, add tests for dll and lib, move more of the content of all the link lines
into rsp files, and double the length of the command lines to be sure to hit
the limit.

R=thakis@chromium.org
BUG=chromium:127290

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1373 78cadc50-ecff-11dd-a971-7dbc132099af
mac make & ninja: Remove workaround for OTHER_CPLUSPLUSFLAGS being a string.

This is now fixed in the upstream gyp files and no longer necessary.
Review URL: https://chromiumcodereview.appspot.com/10383090

git-svn-id: http://gyp.googlecode.com/svn/trunk@1374 78cadc50-ecff-11dd-a971-7dbc132099af
mac ninja: Support LD_RUNPATH_SEARCH_PATHS.
Review URL: https://chromiumcodereview.appspot.com/10384109

git-svn-id: http://gyp.googlecode.com/svn/trunk@1375 78cadc50-ecff-11dd-a971-7dbc132099af
mac ninja: Don't retrict the file types that can be added as bundle resources.

Review URL: https://chromiumcodereview.appspot.com/10383117/
Patch from Marshall Greenblatt <marshall@chromium.org>!

git-svn-id: http://gyp.googlecode.com/svn/trunk@1376 78cadc50-ecff-11dd-a971-7dbc132099af
Correct the order in which OutputDirectory and IntermediateDirectory are
defined, so that IntDir can use the definition of OutDir by topologically
sorting references to msvs variables.

Moved topological sort to a common location and switched it to a simpler
more general depth first search version.

BUG=http://code.google.com/p/chromium/issues/detail?id=119528
TEST=shared_output
Review URL: https://chromiumcodereview.appspot.com/10378042

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