ninja: Put generated sources in front of regular sources.

This matches the behavior of the xcode generator.  As sources are generated by
actions and rules which run before the regular compile phase of a target, this
is a bit more intuitive and so I changed the ninja generator instead of the
xcode generator.

BUG=chromium:280718
R=scottmg@chromium.org

Review URL: https://codereview.chromium.org/24167002

git-svn-id: http://gyp.googlecode.com/svn/trunk@1732 78cadc50-ecff-11dd-a971-7dbc132099af
diff --git a/pylib/gyp/generator/ninja.py b/pylib/gyp/generator/ninja.py
index a871f04..407f054 100644
--- a/pylib/gyp/generator/ninja.py
+++ b/pylib/gyp/generator/ninja.py
@@ -441,7 +441,7 @@
 
     # Write out the compilation steps, if any.
     link_deps = []
-    sources = spec.get('sources', []) + extra_sources
+    sources = extra_sources + spec.get('sources', [])
     if sources:
       if self.flavor == 'mac' and len(self.archs) > 1:
         # Write subninja file containing compile and link commands scoped to
@@ -557,7 +557,7 @@
 
     if self.is_mac_bundle:
       self.WriteMacBundleResources(
-          mac_bundle_resources + extra_mac_bundle_resources, mac_bundle_depends)
+          extra_mac_bundle_resources + mac_bundle_resources, mac_bundle_depends)
       self.WriteMacInfoPlist(mac_bundle_depends)
 
     return stamp