summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvan Martin <martine@danga.com>2011-05-09 04:53:34 (GMT)
committerEvan Martin <martine@danga.com>2011-05-09 04:53:52 (GMT)
commit3a48d1027e594e39ee5dc526e9254387715a945e (patch)
tree1a35c1376fb514ede73940dd18bce5a3593c20e6
parent5d065405e6baf8aa57b2ef2a27d6eb0f36cff504 (diff)
downloadNinja-3a48d1027e594e39ee5dc526e9254387715a945e.zip
Ninja-3a48d1027e594e39ee5dc526e9254387715a945e.tar.gz
Ninja-3a48d1027e594e39ee5dc526e9254387715a945e.tar.bz2
rename gen-build-file to configure
Change it so it always writes build.ninja; easier to run directly.
-rw-r--r--HACKING2
-rwxr-xr-xbootstrap.sh4
-rwxr-xr-xconfigure.py (renamed from gen-build-file.py)14
3 files changed, 12 insertions, 8 deletions
diff --git a/HACKING b/HACKING
index ff22519..f70b2bf 100644
--- a/HACKING
+++ b/HACKING
@@ -35,7 +35,7 @@ Documentation guidelines:
Windows development:
- sudo apt-get install gcc-mingw32 wine
-- NINJA_PLATFORM=mingw ./gen-build-file.py > build.ninja
+- NINJA_PLATFORM=mingw ./configure
- Build gtest:
- unpack it into your source dir
- ./configure CC=i586-mingw32msvc-cc CXX=i586-mingw32msvc-c++
diff --git a/bootstrap.sh b/bootstrap.sh
index ee3e703..2566991 100755
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -19,7 +19,7 @@ set -e
SYSTEMNAME=`uname -s`
# Compute system-specific CFLAGS/LDFLAGS as used in both in the below
-# g++ call as well as in the later gen-build-file.py.
+# g++ call as well as in the later configure.py.
if [ "${SYSTEMNAME}" = "Linux" ]; then
export CFLAGS=
export LDFLAGS=
@@ -41,7 +41,7 @@ fi
g++ -Wno-deprecated ${CFLAGS} ${LDFLAGS} -o ninja.bootstrap $srcs
echo "Building ninja using itself..."
-./gen-build-file.py > build.ninja
+./configure.py
./ninja.bootstrap ninja
rm ninja.bootstrap
diff --git a/gen-build-file.py b/configure.py
index 48c0f6a..48b4ce1 100755
--- a/gen-build-file.py
+++ b/configure.py
@@ -35,7 +35,9 @@ elif platform.startswith('mingw'):
elif platform.startswith('win'):
platform = 'windows'
-n = ninja.Writer(sys.stdout)
+BUILD_FILENAME = 'build.ninja'
+buildfile = open(BUILD_FILENAME, 'w')
+n = ninja.Writer(buildfile)
n.comment('This file is used to build ninja itself.')
n.comment('It is generated by ' + os.path.basename(__file__) + '.')
n.newline()
@@ -173,7 +175,9 @@ n.build('doxygen', 'doxygen', 'doxygen.config',
n.newline()
n.comment('Regenerate build files if build script changes.')
-n.rule('gen-build-file',
- command='./gen-build-file.py > $out')
-n.build('build.ninja', 'gen-build-file',
- implicit='gen-build-file.py')
+n.rule('configure',
+ command='./configure.py')
+n.build('build.ninja', 'configure',
+ implicit='configure.py')
+
+print 'wrote %s.' % BUILD_FILENAME