wutingcindy / gyp

Automatically exported from code.google.com/p/gyp
0 stars 0 forks source link

ninja generator doesn't create phony targets for targets without any build steps #313

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
thakis@yearofthelinuxdesktop:/usr/local/google/chrome/src/foo$ cat foo.gyp
{
  'targets': [
    {
      'target_name': 'bar',
      'type': 'none',
    },
  ],
}

Works with make:

thakis@yearofthelinuxdesktop:/usr/local/google/chrome/src/foo$ ../tools/gyp/gyp 
foo.gyp --depth .
thakis@yearofthelinuxdesktop:/usr/local/google/chrome/src/foo$ make bar
  TOUCH out/Default/obj.target/bar.stamp

Doesn't work with ninja:

thakis@yearofthelinuxdesktop:/usr/local/google/chrome/src/foo$ 
GYP_GENERATORS=ninja ../tools/gyp/gyp foo.gyp --depth .
thakis@yearofthelinuxdesktop:/usr/local/google/chrome/src/foo$ ninja -C 
out/Default/ bar
ninja: Entering directory `out/Default/'
ninja: error: unknown target 'bar'

Original issue reported on code.google.com by thakis@chromium.org on 14 Dec 2012 at 11:19