ChrisPei / gyp

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

fixup_dep in makefile generator can infinitely loop #140

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Code is:

define fixup_dep
sed -i -e "s|^$(notdir $@)|$@|" $(depfile).tmp
sed -e "s|^[^:]*: *||" -e "s| *\\\\$$||" -e 's|^ *||' \
    -e "/./s|$$|:|" $(depfile).tmp >> $(depfile).tmp
cat $(depfile).tmp >> $(depfile)
rm -f $(depfile).tmp
endef

The second sed script writes to the same file it reads, causing an infinite 
loop for some users.  I guess we should use an additional tempfile.

Original issue reported on code.google.com by evan@chromium.org on 22 Feb 2010 at 3:11

GoogleCodeExporter commented 9 years ago
fixed in r809

Original comment by evan@chromium.org on 30 Mar 2010 at 6:50