wangyu5 / gyp

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

linux gyp build doesn't work correctly incrementally if foo.cc becomes foo.c #193

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The linux gyp build doesn't detect the need to rebuild if a file changes from 
.cc to .c.
This is probably not something that happens every day, but filing an issue so 
we're aware of it.

Original issue reported on code.google.com by bradnelson@google.com on 16 May 2011 at 4:30

GoogleCodeExporter commented 9 years ago
Off the top of my head, I believe it's because the depfiles are named per 
*target* (e.g. foobar.o), and they contain a reference to the input (e.g. 
foobar.cc).  So when foobar.cc is missing (due to a rename) we think the file 
is missing.

This is handled properly in ninja.  :P

Original comment by evan@chromium.org on 17 May 2011 at 7:21

GoogleCodeExporter commented 9 years ago
PS: we attempt to work around the missing-implicit-dependency problem by 
writing out additional makefile rules that of the form
  some/header/i/depend/on.h:
  foobar.cc:

Which makes Make not cry if the files are missing.

$ grep \.cc Release/.deps/out/Release/obj.target/base/base/md5.o.d 
cmd_out/Release/obj.target/base/base/md5.o := g++ '-DNO_HEAPCHECKER' 
'-DCHROMIUM_BUILD' '-DENABLE_REMOTING=1' '-DENABLE_P2P_APIS=1' '-DENABLE_GPU=1' 
'-DENABLE_EGLIMAGE=1' '-DUSE_SYMBOLIZE' '-DHAVE_XINPUT2' 
'-D__STDC_FORMAT_MACROS' '-DNDEBUG' '-DNVALGRIND' 
'-DDYNAMIC_ANNOTATIONS_ENABLED=0' -I. -Werror -pthread -fno-exceptions -Wall 
-Wno-unused-parameter -Wno-missing-field-initializers -D_FILE_OFFSET_BITS=64 
-fvisibility=hidden -pipe -m32 -mmmx -march=pentium4 -msse2 -mfpmath=sse 
-fno-strict-aliasing -Wno-write-strings -pthread -D_REENTRANT 
-I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 
-I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ 
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 
-I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12 -O2 
-fno-ident -fdata-sections -ffunction-sections -fno-rtti 
-fno-threadsafe-statics -fvisibility-inlines-hidden -MMD -MF 
out/Release/.deps/out/Release/obj.target/base/base/md5.o.d.raw  -c -o 
out/Release/obj.target/base/base/md5.o base/md5.cc
out/Release/obj.target/base/base/md5.o: base/md5.cc base/md5.h \
base/md5.cc:

Original comment by evan@chromium.org on 17 May 2011 at 7:25