You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
103 lines
3.7 KiB
103 lines
3.7 KiB
6 years ago
|
From 277589c0ca3250034edacee159cdf6860d5d7ae2 Mon Sep 17 00:00:00 2001
|
||
|
From: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
||
|
Date: Mon, 28 Nov 2016 20:00:03 +0100
|
||
|
Subject: [PATCH 1/2] Rename mentions of the executable name to be ninja-build
|
||
|
|
||
|
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
||
|
---
|
||
|
misc/bash-completion | 4 ++--
|
||
|
misc/zsh-completion | 2 +-
|
||
|
src/msvc_helper_main-win32.cc | 2 +-
|
||
|
src/ninja.cc | 8 ++++----
|
||
|
src/version.cc | 2 +-
|
||
|
5 files changed, 9 insertions(+), 9 deletions(-)
|
||
|
|
||
|
diff --git a/misc/bash-completion b/misc/bash-completion
|
||
|
index e604cd4..be2009c 100644
|
||
|
--- a/misc/bash-completion
|
||
|
+++ b/misc/bash-completion
|
||
|
@@ -49,9 +49,9 @@ _ninja_target() {
|
||
|
C) eval dir="$OPTARG" ;;
|
||
|
esac
|
||
|
done;
|
||
|
- targets_command="eval ninja -C \"${dir}\" -t targets all 2>/dev/null | cut -d: -f1"
|
||
|
+ targets_command="eval ninja-build -C \"${dir}\" -t targets all 2>/dev/null | cut -d: -f1"
|
||
|
COMPREPLY=($(compgen -W '`${targets_command}`' -- "$cur"))
|
||
|
fi
|
||
|
return
|
||
|
}
|
||
|
-complete -F _ninja_target ninja
|
||
|
+complete -F _ninja_target ninja ninja-build
|
||
|
diff --git a/misc/zsh-completion b/misc/zsh-completion
|
||
|
index 446e269..eca884a 100644
|
||
|
--- a/misc/zsh-completion
|
||
|
+++ b/misc/zsh-completion
|
||
|
@@ -1,4 +1,4 @@
|
||
|
-#compdef ninja
|
||
|
+#compdef ninja ninja-build
|
||
|
# Copyright 2011 Google Inc. All Rights Reserved.
|
||
|
#
|
||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||
|
diff --git a/src/msvc_helper_main-win32.cc b/src/msvc_helper_main-win32.cc
|
||
|
index e419cd7..6472beb 100644
|
||
|
--- a/src/msvc_helper_main-win32.cc
|
||
|
+++ b/src/msvc_helper_main-win32.cc
|
||
|
@@ -28,7 +28,7 @@ namespace {
|
||
|
|
||
|
void Usage() {
|
||
|
printf(
|
||
|
-"usage: ninja -t msvc [options] -- cl.exe /showIncludes /otherArgs\n"
|
||
|
+"usage: ninja-build -t msvc [options] -- cl.exe /showIncludes /otherArgs\n"
|
||
|
"options:\n"
|
||
|
" -e ENVFILE load environment block from ENVFILE as environment\n"
|
||
|
" -o FILE write output dependency information to FILE.d\n"
|
||
|
diff --git a/src/ninja.cc b/src/ninja.cc
|
||
|
index 25eafe8..ab6a320 100644
|
||
|
--- a/src/ninja.cc
|
||
|
+++ b/src/ninja.cc
|
||
|
@@ -193,7 +193,7 @@ struct Tool {
|
||
|
/// Print usage information.
|
||
|
void Usage(const BuildConfig& config) {
|
||
|
fprintf(stderr,
|
||
|
-"usage: ninja [options] [targets...]\n"
|
||
|
+"usage: ninja-build [options] [targets...]\n"
|
||
|
"\n"
|
||
|
"if targets are unspecified, builds the 'default' target (see manual).\n"
|
||
|
"\n"
|
||
|
@@ -285,9 +285,9 @@ Node* NinjaMain::CollectTarget(const char* cpath, string* err) {
|
||
|
*err =
|
||
|
"unknown target '" + Node::PathDecanonicalized(path, slash_bits) + "'";
|
||
|
if (path == "clean") {
|
||
|
- *err += ", did you mean 'ninja -t clean'?";
|
||
|
+ *err += ", did you mean 'ninja-build -t clean'?";
|
||
|
} else if (path == "help") {
|
||
|
- *err += ", did you mean 'ninja -h'?";
|
||
|
+ *err += ", did you mean 'ninja-build -h'?";
|
||
|
} else {
|
||
|
Node* suggestion = state_.SpellcheckNode(path);
|
||
|
if (suggestion) {
|
||
|
@@ -583,7 +583,7 @@ int NinjaMain::ToolClean(const Options* options, int argc, char* argv[]) {
|
||
|
break;
|
||
|
case 'h':
|
||
|
default:
|
||
|
- printf("usage: ninja -t clean [options] [targets]\n"
|
||
|
+ printf("usage: ninja-build -t clean [options] [targets]\n"
|
||
|
"\n"
|
||
|
"options:\n"
|
||
|
" -g also clean files marked as ninja generator output\n"
|
||
|
diff --git a/src/version.cc b/src/version.cc
|
||
|
index eafa082..a9964d7 100644
|
||
|
--- a/src/version.cc
|
||
|
+++ b/src/version.cc
|
||
|
@@ -38,7 +38,7 @@ void CheckNinjaVersion(const string& version) {
|
||
|
ParseVersion(version, &file_major, &file_minor);
|
||
|
|
||
|
if (bin_major > file_major) {
|
||
|
- Warning("ninja executable version (%s) greater than build file "
|
||
|
+ Warning("ninja-build executable version (%s) greater than build file "
|
||
|
"ninja_required_version (%s); versions may be incompatible.",
|
||
|
kNinjaVersion, version.c_str());
|
||
|
return;
|
||
|
--
|
||
|
2.10.2
|