"ninja update" not working.

Hi,

The docs state that you can do a “make update” to update all top-level and embedded projects from Subversion.

This does not appear to work with Ninja. Ninja just reports the following error:

ninja: ERROR: unknown target ‘update’

FYI. Perhaps somebody is already looking into integrating Ninja better intp the build process. Or, perhaps I am just a too early adopter of Ninja because CMake + Ninja is still beta.

– Disclaimer: I am not arrogant in real life, so if you perceive me as being arrogant, you are to blame :wink:

This is a feature of the configure+make build system, and not a feature of the CMake build system. I also don’t have any real desire to support it as part of the CMake build system, I think it was always a flawed idea to implement version control commands as part of a build system.

For example, I never, ever to in-tree builds, and a usually have many different builds associated with a single source repository. This makes the semantics of ‘make update’ quite confusing.

I suggest writing the 4 line shell script (or the Windows analog to a 4-line shell script) that updates your tree.

That’s just what I did. And that’s what I’m including in the Windows doc too. Huzzah, me am on top of it! :wink:

2012/6/18 Chandler Carruth <chandlerc@google.com>

I can't see why it's confusing. I have only one source tree and any
number of build trees; "make update" in each build tree updates the
source tree.
It's true that after the build (make happiness) finishes in one build
dir, there are always new files to be pulled down when doing "make
happiness" in the other build dir :slight_smile:

Csaba

No other part of building mutates the source tree. Thus, for all other things I do in the build tree, I can do them in N different built trees concurrently without issue. Deviating from this is a dramatic and confusing deviation.

What happens when the source tree is on a read-only (network mounted) filesystem?

What happens when somehow someone accidentally typos a dependency from some build rule to the ‘update’ build rule?

I don’t see any really good way to integrate manipulation of the version control system from within the build system, nor do I see really compelling advantages to doing so, or really compelling problems with alternate solutions.