From ca0b1d6d34c1183a7351d1ee931bbac7dea22c93 Mon Sep 17 00:00:00 2001 From: Evan Martin Date: Sat, 6 Nov 2010 18:20:07 -0700 Subject: bootstrap script --- README.markdown | 13 ++++++++++++- bootstrap.sh | 10 ++++++++++ todo | 4 ---- 3 files changed, 22 insertions(+), 5 deletions(-) create mode 100755 bootstrap.sh diff --git a/README.markdown b/README.markdown index 5a83e79..c7ef8dd 100644 --- a/README.markdown +++ b/README.markdown @@ -32,7 +32,18 @@ Some explicit non-goals: you should provide customization in the system that generates your `.ninja` files, like how autoconf provides `./configure`. -## Overview +## Getting Started +The included `bootstrap.sh` should hopefully produce a working `ninja` +binary. + +Current usage is just + + ninja target + +where `target` is a known output described by `build.ninja` in the +current directory. + +## Creating .ninja files A build file (default name: `build.ninja`) provides a list of *rules* along with a list of *build* statements saying how to build files diff --git a/bootstrap.sh b/bootstrap.sh new file mode 100755 index 0000000..d9a2e2b --- /dev/null +++ b/bootstrap.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +set -e + +srcs=$(ls *.cc | grep -v test) +echo "Building stage 1..." +g++ -o ninja $srcs +echo "Building final result..." +./ninja ninja +echo "Done!" diff --git a/todo b/todo index 33e8e1f..d0b6f07 100644 --- a/todo +++ b/todo @@ -2,10 +2,6 @@ support parsing subfiles save command lines parallization -bootstrap: write a shell script that is just does - gcc -o ninja $(ls *.cc) - ./ninja ninja - longer-term ideas: -- cgit v0.12