martine/ninja — Issue #157: ninja can't build itself after `ninja -t clean`
Author: nico
Created: 2011-12-14 21:14:07+00:00
State: open

Observe:

hummer:ninja thakis$ ./bootstrap.sh
Building ninja manually...
Building ninja using itself...
wrote build.ninja.
[17/17] LINK ninja
Done!
hummer:ninja thakis$ ./ninja -t clean
Cleaning... 34 files.
hummer:ninja thakis$ ./bootstrap.sh
Building ninja manually...
Undefined symbols:
"DepfileParser::Parse(std::basic_string, std::allocator > const&, std::basic_string, std::allocator >*)", referenced from:
Edge::LoadDepFile(State*, DiskInterface*, std::basic_string, std::allocator >*)in ccwbQgLA.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

This is probably because src/depfile_parser.cc is generated from depfile_parser.in.cc, and so the clean tool deletes it, even though it can't be regenerated and is checked in for that reason.