Yea, looks like it's this:

leveldb.cpp is touched, so it checks to see what needs to be rebuilt. Possible options are leveldb.o, leveldb.exe, leveldb, etc. It finds that leveldb (the folder) is older than leveldb.cpp, so it must be "rebuilt". The implicit rule tries to build 'leveldb' (a binary) from leveldb.cpp and obviously fails.

distdir depends on all distributed files:

```
distdir: $(DISTFILES)
```
Changing 'leveldb' to 'leveldb/*' (or anything that's not exactly 'leveldb') in $EXTRA_DIST removes that dependency from $DISTFILES, so it removes the target as well. That only addresses the symptom though, so I'd rather not go that route.

Possible fixes:
- rename leveldb.cpp (my suggestion. This is likely to cause similar head-scratchers in the future otherwise.)
- rename leveldb folder. Obviously unrealistic.
- add an empty leveldb rule to nullify the implicit one:

```
leveldb: 
```
That tells make to do nothing when leveldb needs to be 'rebuilt', rather than using the implicit rule of using the .cpp of the same name. It will be 'rebuilt' with each build, but it's empty so it'd be an invisible no-op. Assuming that works as intended, it'd be my second choice.