summaryrefslogtreecommitdiffstats
path: root/build.ninja
diff options
context:
space:
mode:
authorEvan Martin <martine@danga.com>2011-03-06 00:27:25 (GMT)
committerEvan Martin <martine@danga.com>2011-03-07 19:31:11 (GMT)
commit07ffa9195dd83176ddb96bbfb1eca0a3ca938a8b (patch)
tree03b240b89fa2500cf8b6285ad8e2f7be277eb667 /build.ninja
parent15d4695878749c3525c96e856ef08dfb19a2c3e5 (diff)
downloadNinja-07ffa9195dd83176ddb96bbfb1eca0a3ca938a8b.zip
Ninja-07ffa9195dd83176ddb96bbfb1eca0a3ca938a8b.tar.gz
Ninja-07ffa9195dd83176ddb96bbfb1eca0a3ca938a8b.tar.bz2
use a shell script to inline browse.py
Relying on the inline-assembly trick was cute but it didn't work on other platforms; relying on xxd will make us depend on xxd being available. Instead, inline browse.py into a header using a shell script. (Making this work required fixing multiple bugs in ninja...)
Diffstat (limited to 'build.ninja')
-rw-r--r--build.ninja9
1 files changed, 8 insertions, 1 deletions
diff --git a/build.ninja b/build.ninja
index 7f1963f..614936a 100644
--- a/build.ninja
+++ b/build.ninja
@@ -31,7 +31,14 @@ rule link
command = $cxx $conf_ldflags $ldflags -o $out $in
description = LINK $out
-build $builddir/browse.o: cxx src/browse.cc | src/browse.py
+rule inline
+ command = src/inline.sh $varname < $in > $out
+ description = INLINE $out
+
+build $builddir/browse_py.h: inline src/browse.py
+ varname = kBrowsePy
+
+build $builddir/browse.o: cxx src/browse.cc || $builddir/browse_py.h
build $builddir/build.o: cxx src/build.cc
build $builddir/build_log.o: cxx src/build_log.cc
build $builddir/eval_env.o: cxx src/eval_env.cc