summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2016-12-12 16:55:06 -0800
committerMichael Forney <mforney@mforney.org>2016-12-13 23:10:30 -0800
commite25d78ba67971fe7c29af16ebd9aeef6b382bd7e (patch)
treeebe7b1ed1e14b52a411b374c515b32fcfa1a3b16
parent1e93b16f220deddbf78b50bb4c50aeee08d74a0a (diff)
Allow local config.ninja
-rw-r--r--.gitignore1
-rw-r--r--build.ninja17
-rw-r--r--config.def.ninja1
-rw-r--r--config.ninja14
-rwxr-xr-xsetup.rc3
5 files changed, 21 insertions, 15 deletions
diff --git a/.gitignore b/.gitignore
index 91a93a38..711950e9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
+/config.ninja
/config.rc
/out
local.ninja
diff --git a/build.ninja b/build.ninja
index 7687637d..03dc41f0 100644
--- a/build.ninja
+++ b/build.ninja
@@ -1,9 +1,24 @@
+builddir = out
+
+toolchain = default
+host_toolchain = default
+
+lex = lex
+perl = perl
+python = python
+yacc = yacc
+zic = zic
+
+repo = root
+repo_tag = tree
+repo_branch = master
+
include config.ninja
include rules.ninja
include toolchain/$toolchain.ninja
-subninja local.ninja
+include local.ninja
build build.ninja: phony ninja
generator = 1
diff --git a/config.def.ninja b/config.def.ninja
new file mode 100644
index 00000000..f7e57231
--- /dev/null
+++ b/config.def.ninja
@@ -0,0 +1 @@
+# override anything in build.ninja here
diff --git a/config.ninja b/config.ninja
deleted file mode 100644
index 53bbbfd8..00000000
--- a/config.ninja
+++ /dev/null
@@ -1,14 +0,0 @@
-builddir = out
-
-toolchain = default
-host_toolchain = default
-
-lex = lex
-perl = perl
-python = python
-yacc = yacc
-zic = zic
-
-repo = root
-repo_tag = tree
-repo_branch = master
diff --git a/setup.rc b/setup.rc
index 2c28e049..680d8b8c 100755
--- a/setup.rc
+++ b/setup.rc
@@ -13,6 +13,9 @@ if(! [ -f config.rc ])
flag e +
+if(! [ -f config.ninja ])
+ cp config.def.ninja config.ninja
+
# call this after a command capture to ensure it succeeded
fn checkstatus {}