aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--INSTALL24
-rwxr-xr-xbootstrap20
-rw-r--r--build/.gitignore2
-rw-r--r--build/dist/operation18
-rw-r--r--build/install/operation18
-rw-r--r--build/test/operation18
-rw-r--r--build2/.gitignore2
-rw-r--r--build2/algorithm (renamed from build/algorithm)20
-rw-r--r--build2/algorithm.cxx (renamed from build/algorithm.cxx)24
-rw-r--r--build2/algorithm.ixx (renamed from build/algorithm.ixx)10
-rw-r--r--build2/algorithm.txx (renamed from build/algorithm.txx)4
-rw-r--r--build2/b.cxx (renamed from build/b.cxx)64
-rw-r--r--build2/bin/module (renamed from build/bin/module)16
-rw-r--r--build2/bin/module.cxx (renamed from build/bin/module.cxx)20
-rw-r--r--build2/bin/rule (renamed from build/bin/rule)12
-rw-r--r--build2/bin/rule.cxx (renamed from build/bin/rule.cxx)20
-rw-r--r--build2/bin/target (renamed from build/bin/target)12
-rw-r--r--build2/bin/target.cxx (renamed from build/bin/target.cxx)6
-rw-r--r--build2/buildfile (renamed from build/buildfile)6
-rw-r--r--build2/cli/module (renamed from build/cli/module)16
-rw-r--r--build2/cli/module.cxx (renamed from build/cli/module.cxx)22
-rw-r--r--build2/cli/rule (renamed from build/cli/rule)12
-rw-r--r--build2/cli/rule.cxx (renamed from build/cli/rule.cxx)24
-rw-r--r--build2/cli/target (renamed from build/cli/target)14
-rw-r--r--build2/cli/target.cxx (renamed from build/cli/target.cxx)6
-rw-r--r--build2/config/module (renamed from build/config/module)16
-rw-r--r--build2/config/module.cxx (renamed from build/config/module.cxx)16
-rw-r--r--build2/config/operation (renamed from build/config/operation)12
-rw-r--r--build2/config/operation.cxx (renamed from build/config/operation.cxx)18
-rw-r--r--build2/config/utility (renamed from build/config/utility)20
-rw-r--r--build2/config/utility.cxx (renamed from build/config/utility.cxx)8
-rw-r--r--build2/config/utility.ixx (renamed from build/config/utility.ixx)4
-rw-r--r--build2/config/utility.txx (renamed from build/config/utility.txx)6
-rw-r--r--build2/context (renamed from build/context)18
-rw-r--r--build2/context.cxx (renamed from build/context.cxx)18
-rw-r--r--build2/context.txx (renamed from build/context.txx)6
-rw-r--r--build2/cxx/compile (renamed from build/cxx/compile)14
-rw-r--r--build2/cxx/compile.cxx (renamed from build/cxx/compile.cxx)30
-rw-r--r--build2/cxx/install (renamed from build/cxx/install)16
-rw-r--r--build2/cxx/install.cxx (renamed from build/cxx/install.cxx)12
-rw-r--r--build2/cxx/link (renamed from build/cxx/link)16
-rw-r--r--build2/cxx/link.cxx (renamed from build/cxx/link.cxx)30
-rw-r--r--build2/cxx/module (renamed from build/cxx/module)16
-rw-r--r--build2/cxx/module.cxx (renamed from build/cxx/module.cxx)26
-rw-r--r--build2/cxx/target (renamed from build/cxx/target)12
-rw-r--r--build2/cxx/target.cxx (renamed from build/cxx/target.cxx)6
-rw-r--r--build2/cxx/utility (renamed from build/cxx/utility)18
-rw-r--r--build2/cxx/utility.cxx (renamed from build/cxx/utility.cxx)8
-rw-r--r--build2/cxx/utility.txx (renamed from build/cxx/utility.txx)4
-rw-r--r--build2/diagnostics (renamed from build/diagnostics)14
-rw-r--r--build2/diagnostics.cxx (renamed from build/diagnostics.cxx)8
-rw-r--r--build2/dist/module (renamed from build/dist/module)16
-rw-r--r--build2/dist/module.cxx (renamed from build/dist/module.cxx)18
-rw-r--r--build2/dist/operation18
-rw-r--r--build2/dist/operation.cxx (renamed from build/dist/operation.cxx)22
-rw-r--r--build2/dist/rule (renamed from build/dist/rule)20
-rw-r--r--build2/dist/rule.cxx (renamed from build/dist/rule.cxx)16
-rw-r--r--build2/dump (renamed from build/dump)12
-rw-r--r--build2/dump.cxx (renamed from build/dump.cxx)16
-rw-r--r--build2/file (renamed from build/file)18
-rw-r--r--build2/file.cxx (renamed from build/file.cxx)20
-rw-r--r--build2/file.ixx (renamed from build/file.ixx)4
-rw-r--r--build2/install/module (renamed from build/install/module)16
-rw-r--r--build2/install/module.cxx (renamed from build/install/module.cxx)24
-rw-r--r--build2/install/operation18
-rw-r--r--build2/install/operation.cxx (renamed from build/install/operation.cxx)6
-rw-r--r--build2/install/rule (renamed from build/install/rule)18
-rw-r--r--build2/install/rule.cxx (renamed from build/install/rule.cxx)20
-rw-r--r--build2/install/utility (renamed from build/install/utility)14
-rw-r--r--build2/lexer (renamed from build/lexer)20
-rw-r--r--build2/lexer.cxx (renamed from build/lexer.cxx)8
-rw-r--r--build2/module (renamed from build/module)18
-rw-r--r--build2/module.cxx (renamed from build/module.cxx)12
-rw-r--r--build2/name (renamed from build/name)12
-rw-r--r--build2/name.cxx (renamed from build/name.cxx)8
-rw-r--r--build2/operation (renamed from build/operation)12
-rw-r--r--build2/operation.cxx (renamed from build/operation.cxx)18
-rw-r--r--build2/options (renamed from build/options)44
-rw-r--r--build2/options.cli (renamed from build/options.cli)2
-rw-r--r--build2/options.cxx (renamed from build/options.cxx)73
-rw-r--r--build2/options.ixx (renamed from build/options.ixx)8
-rw-r--r--build2/parser (renamed from build/parser)28
-rw-r--r--build2/parser.cxx (renamed from build/parser.cxx)40
-rw-r--r--build2/path-io (renamed from build/path-io)10
-rw-r--r--build2/path-io.cxx (renamed from build/path-io.cxx)10
-rw-r--r--build2/prerequisite (renamed from build/prerequisite)26
-rw-r--r--build2/prerequisite.cxx (renamed from build/prerequisite.cxx)14
-rw-r--r--build2/rule (renamed from build/rule)22
-rw-r--r--build2/rule-map (renamed from build/rule-map)14
-rw-r--r--build2/rule.cxx (renamed from build/rule.cxx)16
-rw-r--r--build2/scope (renamed from build/scope)48
-rw-r--r--build2/scope.cxx (renamed from build/scope.cxx)10
-rw-r--r--build2/search (renamed from build/search)12
-rw-r--r--build2/search.cxx (renamed from build/search.cxx)14
-rw-r--r--build2/spec (renamed from build/spec)14
-rw-r--r--build2/spec.cxx (renamed from build/spec.cxx)10
-rw-r--r--build2/target (renamed from build/target)56
-rw-r--r--build2/target-key (renamed from build/target-key)14
-rw-r--r--build2/target-type (renamed from build/target-type)12
-rw-r--r--build2/target.cxx (renamed from build/target.cxx)14
-rw-r--r--build2/target.ixx (renamed from build/target.ixx)6
-rw-r--r--build2/target.txx (renamed from build/target.txx)12
-rw-r--r--build2/test/module (renamed from build/test/module)14
-rw-r--r--build2/test/module.cxx (renamed from build/test/module.cxx)18
-rw-r--r--build2/test/operation18
-rw-r--r--build2/test/operation.cxx (renamed from build/test/operation.cxx)6
-rw-r--r--build2/test/rule (renamed from build/test/rule)16
-rw-r--r--build2/test/rule.cxx (renamed from build/test/rule.cxx)20
-rw-r--r--build2/token (renamed from build/token)10
-rw-r--r--build2/token.cxx (renamed from build/token.cxx)6
-rw-r--r--build2/types (renamed from build/types)12
-rw-r--r--build2/utility (renamed from build/utility)14
-rw-r--r--build2/utility.cxx (renamed from build/utility.cxx)6
-rw-r--r--build2/variable (renamed from build/variable)58
-rw-r--r--build2/variable.cxx (renamed from build/variable.cxx)12
-rw-r--r--build2/variable.ixx (renamed from build/variable.ixx)8
-rw-r--r--build2/variable.txx (renamed from build/variable.txx)6
-rw-r--r--build2/version (renamed from build/version)7
-rw-r--r--buildfile2
119 files changed, 989 insertions, 959 deletions
diff --git a/INSTALL b/INSTALL
index 623c952..d92779e 100644
--- a/INSTALL
+++ b/INSTALL
@@ -22,23 +22,23 @@ distribution. The following is a recommended sequence of steps:
$ ./bootstrap --cxx clang++-3.5
Once the script completes successfully (which may take some time), the
- build2 binary is saved as 'build/b-boot':
+ build2 binary is saved as 'build2/b-boot':
- $ build/b-boot --version
+ $ build2/b-boot --version
2. Next, build libbutl and the build2 binary using the bootstrapped binary
from step 1 above:
- $ build/b-boot 'configure(../libbutl/)'
- $ build/b-boot config.import.libbutl=../libbutl configure update
+ $ build2/b-boot 'configure(../libbutl/)'
+ $ build2/b-boot config.import.libbutl=../libbutl configure update
Again, if necessary, you can also specify the C++ compiler:
- $ build/b-boot config.cxx=clang++-3.5 ...
+ $ build2/b-boot config.cxx=clang++-3.5 ...
- The resulting build2 binary is saved as 'build/b':
+ The resulting build2 binary is saved as 'build2/b':
- $ build/b --version
+ $ build2/b --version
3. The last step is optional and involves building libbutl and build2 using
the binary built on step 2 above and verifying that the two builds are
@@ -51,18 +51,18 @@ distribution. The following is a recommended sequence of steps:
To perform this step, first unpack new copies of libbutl and build2 into
a different directory, for example, a verify/ sub-directory. Then complete
- step 2 for these new copies but using build/b binary from step 2 rather
- than build/b-boot from step 1. Also, use the libbutl from step 2 in the
+ step 2 for these new copies but using build2/b binary from step 2 rather
+ than build2/b-boot from step 1. Also, use the libbutl from step 2 in the
config.import.libbutl value (otherwise rpath differences will result in
different build2 binaries). For example:
$ cd verify/build2
- $ ../../build2/build/b '{configure update}(../libbutl/)'
- $ ../../build2/build/b config.import.libbutl=../../libbutl configure update
+ $ ../../build2/build2/b '{configure update}(../libbutl/)'
+ $ ../../build2/build2/b config.import.libbutl=../../libbutl configure update
Once this is done, compare the libbutl libraries and build2 binaries, for
example:
$ cd ../..
$ diff libbutl/butl/libbutl.so verify/libbutl/butl/libbutl.so
- $ diff build2/build/b verify/build2/build/b
+ $ diff build2/build2/b verify/build2/build2/b
diff --git a/bootstrap b/bootstrap
index 27fd83d..46c1ae9 100755
--- a/bootstrap
+++ b/bootstrap
@@ -79,15 +79,15 @@ if test -z "$libbutl"; then
exit 1
fi
-src="build/*.cxx"
-src="$src build/config/*.cxx"
-src="$src build/dist/*.cxx"
-src="$src build/bin/*.cxx"
-src="$src build/cxx/*.cxx"
-src="$src build/cli/*.cxx"
-src="$src build/test/*.cxx"
-src="$src build/install/*.cxx"
+src="build2/*.cxx"
+src="$src build2/config/*.cxx"
+src="$src build2/dist/*.cxx"
+src="$src build2/bin/*.cxx"
+src="$src build2/cxx/*.cxx"
+src="$src build2/cli/*.cxx"
+src="$src build2/test/*.cxx"
+src="$src build2/install/*.cxx"
src="$src $libbutl/butl/*.cxx"
-echo $cxx -std=c++1y $cxxflags -I$libbutl -I. -o build/b-boot $src 1>&2
-exec $cxx -std=c++1y $cxxflags -I$libbutl -I. -o build/b-boot $src
+echo $cxx -std=c++1y $cxxflags -I$libbutl -I. -o build2/b-boot $src 1>&2
+exec $cxx -std=c++1y $cxxflags -I$libbutl -I. -o build2/b-boot $src
diff --git a/build/.gitignore b/build/.gitignore
index 62f3460..225c27f 100644
--- a/build/.gitignore
+++ b/build/.gitignore
@@ -1,3 +1 @@
-b
-b-*
config.build
diff --git a/build/dist/operation b/build/dist/operation
deleted file mode 100644
index c7aa014..0000000
--- a/build/dist/operation
+++ /dev/null
@@ -1,18 +0,0 @@
-// file : build/dist/operation -*- C++ -*-
-// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
-// license : MIT; see accompanying LICENSE file
-
-#ifndef BUILD_DIST_OPERATION
-#define BUILD_DIST_OPERATION
-
-#include <build/operation>
-
-namespace build
-{
- namespace dist
- {
- extern meta_operation_info dist;
- }
-}
-
-#endif // BUILD_DIST_OPERATION
diff --git a/build/install/operation b/build/install/operation
deleted file mode 100644
index 2763d10..0000000
--- a/build/install/operation
+++ /dev/null
@@ -1,18 +0,0 @@
-// file : build/install/operation -*- C++ -*-
-// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
-// license : MIT; see accompanying LICENSE file
-
-#ifndef BUILD_INSTALL_OPERATION
-#define BUILD_INSTALL_OPERATION
-
-#include <build/operation>
-
-namespace build
-{
- namespace install
- {
- extern operation_info install;
- }
-}
-
-#endif // BUILD_INSTALL_OPERATION
diff --git a/build/test/operation b/build/test/operation
deleted file mode 100644
index 1942936..0000000
--- a/build/test/operation
+++ /dev/null
@@ -1,18 +0,0 @@
-// file : build/test/operation -*- C++ -*-
-// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
-// license : MIT; see accompanying LICENSE file
-
-#ifndef BUILD_TEST_OPERATION
-#define BUILD_TEST_OPERATION
-
-#include <build/operation>
-
-namespace build
-{
- namespace test
- {
- extern operation_info test;
- }
-}
-
-#endif // BUILD_TEST_OPERATION
diff --git a/build2/.gitignore b/build2/.gitignore
new file mode 100644
index 0000000..c9855e8
--- /dev/null
+++ b/build2/.gitignore
@@ -0,0 +1,2 @@
+b
+b-*
diff --git a/build/algorithm b/build2/algorithm
index d144d6c..2cfec62 100644
--- a/build/algorithm
+++ b/build2/algorithm
@@ -1,18 +1,18 @@
-// file : build/algorithm -*- C++ -*-
+// file : build2/algorithm -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef BUILD_ALGORITHM
-#define BUILD_ALGORITHM
+#ifndef BUILD2_ALGORITHM
+#define BUILD2_ALGORITHM
#include <string>
#include <utility> // pair
-#include <build/types>
-#include <build/target>
-#include <build/operation>
+#include <build2/types>
+#include <build2/target>
+#include <build2/operation>
-namespace build
+namespace build2
{
class scope;
class prerequisite;
@@ -216,7 +216,7 @@ namespace build
perform_clean (action, target&);
}
-#include <build/algorithm.ixx>
-#include <build/algorithm.txx>
+#include <build2/algorithm.ixx>
+#include <build2/algorithm.txx>
-#endif // BUILD_ALGORITHM
+#endif // BUILD2_ALGORITHM
diff --git a/build/algorithm.cxx b/build2/algorithm.cxx
index a2ee7c0..243519e 100644
--- a/build/algorithm.cxx
+++ b/build2/algorithm.cxx
@@ -1,8 +1,8 @@
-// file : build/algorithm.cxx -*- C++ -*-
+// file : build2/algorithm.cxx -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#include <build/algorithm>
+#include <build2/algorithm>
#include <memory> // unique_ptr
#include <cstddef> // size_t
@@ -11,20 +11,20 @@
#include <butl/utility> // reverse_iterate
-#include <build/scope>
-#include <build/target>
-#include <build/prerequisite>
-#include <build/rule>
-#include <build/file> // import()
-#include <build/search>
-#include <build/context>
-#include <build/utility>
-#include <build/diagnostics>
+#include <build2/scope>
+#include <build2/target>
+#include <build2/prerequisite>
+#include <build2/rule>
+#include <build2/file> // import()
+#include <build2/search>
+#include <build2/context>
+#include <build2/utility>
+#include <build2/diagnostics>
using namespace std;
using namespace butl;
-namespace build
+namespace build2
{
target&
search (const prerequisite_key& pk)
diff --git a/build/algorithm.ixx b/build2/algorithm.ixx
index 309f99b..92cc66d 100644
--- a/build/algorithm.ixx
+++ b/build2/algorithm.ixx
@@ -1,14 +1,14 @@
-// file : build/algorithm.ixx -*- C++ -*-
+// file : build2/algorithm.ixx -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
#include <utility> // pair
-#include <build/rule>
-#include <build/prerequisite>
-#include <build/context>
+#include <build2/rule>
+#include <build2/prerequisite>
+#include <build2/context>
-namespace build
+namespace build2
{
inline target&
search (prerequisite& p)
diff --git a/build/algorithm.txx b/build2/algorithm.txx
index 2490962..7b0e498 100644
--- a/build/algorithm.txx
+++ b/build2/algorithm.txx
@@ -1,8 +1,8 @@
-// file : build/algorithm.txx -*- C++ -*-
+// file : build2/algorithm.txx -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-namespace build
+namespace build2
{
template <typename T>
T*
diff --git a/build/b.cxx b/build2/b.cxx
index d72fdfb..42c59f7 100644
--- a/build/b.cxx
+++ b/build2/b.cxx
@@ -1,4 +1,4 @@
-// file : build/b.cxx -*- C++ -*-
+// file : build2/b.cxx -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
@@ -18,40 +18,40 @@
#include <butl/filesystem>
-#include <build/version>
-
-#include <build/types>
-#include <build/spec>
-#include <build/operation>
-#include <build/scope>
-#include <build/target>
-#include <build/prerequisite>
-#include <build/rule>
-#include <build/file>
-#include <build/module>
-#include <build/algorithm>
-#include <build/diagnostics>
-#include <build/context>
-#include <build/utility>
-#include <build/variable>
-
-#include <build/token>
-#include <build/lexer>
-#include <build/parser>
-
-#include <build/options>
+#include <build2/version>
+
+#include <build2/types>
+#include <build2/spec>
+#include <build2/operation>
+#include <build2/scope>
+#include <build2/target>
+#include <build2/prerequisite>
+#include <build2/rule>
+#include <build2/file>
+#include <build2/module>
+#include <build2/algorithm>
+#include <build2/diagnostics>
+#include <build2/context>
+#include <build2/utility>
+#include <build2/variable>
+
+#include <build2/token>
+#include <build2/lexer>
+#include <build2/parser>
+
+#include <build2/options>
using namespace std;
-#include <build/config/module>
-#include <build/dist/module>
-#include <build/bin/module>
-#include <build/cxx/module>
-#include <build/cli/module>
-#include <build/test/module>
-#include <build/install/module>
+#include <build2/config/module>
+#include <build2/dist/module>
+#include <build2/bin/module>
+#include <build2/cxx/module>
+#include <build2/cli/module>
+#include <build2/test/module>
+#include <build2/install/module>
-using namespace build;
+using namespace build2;
int
main (int argc, char* argv[])
@@ -67,7 +67,7 @@ main (int argc, char* argv[])
//
if (ops.version ())
{
- cout << "build2 " << BUILD_VERSION_STR<< endl
+ cout << "build2 " << BUILD2_VERSION_STR<< endl
<< "libbutl " << LIBBUTL_VERSION_STR << endl
<< "Copyright (c) 2014-2015 Code Synthesis Ltd" << endl
<< "This is free software released under the MIT license." << endl;
diff --git a/build/bin/module b/build2/bin/module
index 5dd720f..85be444 100644
--- a/build/bin/module
+++ b/build2/bin/module
@@ -1,16 +1,16 @@
-// file : build/bin/module -*- C++ -*-
+// file : build2/bin/module -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef BUILD_BIN_MODULE
-#define BUILD_BIN_MODULE
+#ifndef BUILD2_BIN_MODULE
+#define BUILD2_BIN_MODULE
-#include <build/types>
-#include <build/utility>
+#include <build2/types>
+#include <build2/utility>
-#include <build/module>
+#include <build2/module>
-namespace build
+namespace build2
{
namespace bin
{
@@ -20,4 +20,4 @@ namespace build
}
}
-#endif // BUILD_BIN_MODULE
+#endif // BUILD2_BIN_MODULE
diff --git a/build/bin/module.cxx b/build2/bin/module.cxx
index 5f65b8d..624a8d3 100644
--- a/build/bin/module.cxx
+++ b/build2/bin/module.cxx
@@ -1,22 +1,22 @@
-// file : build/bin/module.cxx -*- C++ -*-
+// file : build2/bin/module.cxx -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#include <build/bin/module>
+#include <build2/bin/module>
-#include <build/scope>
-#include <build/variable>
-#include <build/diagnostics>
+#include <build2/scope>
+#include <build2/variable>
+#include <build2/diagnostics>
-#include <build/config/utility>
-#include <build/install/utility>
+#include <build2/config/utility>
+#include <build2/install/utility>
-#include <build/bin/rule>
-#include <build/bin/target>
+#include <build2/bin/rule>
+#include <build2/bin/target>
using namespace std;
-namespace build
+namespace build2
{
namespace bin
{
diff --git a/build/bin/rule b/build2/bin/rule
index 743b1ca..ad52396 100644
--- a/build/bin/rule
+++ b/build2/bin/rule
@@ -1,13 +1,13 @@
-// file : build/bin/rule -*- C++ -*-
+// file : build2/bin/rule -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef BUILD_BIN_RULE
-#define BUILD_BIN_RULE
+#ifndef BUILD2_BIN_RULE
+#define BUILD2_BIN_RULE
-#include <build/rule>
+#include <build2/rule>
-namespace build
+namespace build2
{
namespace bin
{
@@ -36,4 +36,4 @@ namespace build
}
}
-#endif // BUILD_BIN_RULE
+#endif // BUILD2_BIN_RULE
diff --git a/build/bin/rule.cxx b/build2/bin/rule.cxx
index 21db183..9d93b0a 100644
--- a/build/bin/rule.cxx
+++ b/build2/bin/rule.cxx
@@ -1,19 +1,19 @@
-// file : build/bin/rule.cxx -*- C++ -*-
+// file : build2/bin/rule.cxx -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#include <build/bin/rule>
+#include <build2/bin/rule>
-#include <build/scope>
-#include <build/target>
-#include <build/algorithm>
-#include <build/diagnostics>
+#include <build2/scope>
+#include <build2/target>
+#include <build2/algorithm>
+#include <build2/diagnostics>
-#include <build/bin/target>
+#include <build2/bin/target>
using namespace std;
-namespace build
+namespace build2
{
namespace bin
{
@@ -103,10 +103,10 @@ namespace build
// Now we do full match.
//
if (ar)
- build::match (a, *t.a);
+ build2::match (a, *t.a);
if (so)
- build::match (a, *t.so);
+ build2::match (a, *t.so);
return &perform;
}
diff --git a/build/bin/target b/build2/bin/target
index cbabcaf..e785ac0 100644
--- a/build/bin/target
+++ b/build2/bin/target
@@ -1,13 +1,13 @@
-// file : build/bin/target -*- C++ -*-
+// file : build2/bin/target -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef BUILD_BIN_TARGET
-#define BUILD_BIN_TARGET
+#ifndef BUILD2_BIN_TARGET
+#define BUILD2_BIN_TARGET
-#include <build/target>
+#include <build2/target>
-namespace build
+namespace build2
{
namespace bin
{
@@ -96,4 +96,4 @@ namespace build
}
}
-#endif // BUILD_BIN_TARGET
+#endif // BUILD2_BIN_TARGET
diff --git a/build/bin/target.cxx b/build2/bin/target.cxx
index 735c581..6241a7b 100644
--- a/build/bin/target.cxx
+++ b/build2/bin/target.cxx
@@ -1,12 +1,12 @@
-// file : build/bin/target.cxx -*- C++ -*-
+// file : build2/bin/target.cxx -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#include <build/bin/target>
+#include <build2/bin/target>
using namespace std;
-namespace build
+namespace build2
{
namespace bin
{
diff --git a/build/buildfile b/build2/buildfile
index 936524e..0ba7535 100644
--- a/build/buildfile
+++ b/build2/buildfile
@@ -1,4 +1,4 @@
-# file : build/buildfile
+# file : build2/buildfile
# copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
@@ -59,6 +59,6 @@ install/{hxx }{ utility } \
test/{hxx cxx}{ rule } \
$libs
-#@@ TODO
+#@@ TODO, also remove gen files from the repository/add to .gitignore
#
-# cli --generate-specifier --cli-namespace cl --include-with-brackets --include-prefix build --guard-prefix BUILD --hxx-suffix "" options.cli
+# cli --generate-specifier --cli-namespace cl --include-with-brackets --include-prefix build2 --guard-prefix BUILD2 --hxx-suffix "" options.cli
diff --git a/build/cli/module b/build2/cli/module
index 221e6a0..f2890c9 100644
--- a/build/cli/module
+++ b/build2/cli/module
@@ -1,16 +1,16 @@
-// file : build/cli/module -*- C++ -*-
+// file : build2/cli/module -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef BUILD_CLI_MODULE
-#define BUILD_CLI_MODULE
+#ifndef BUILD2_CLI_MODULE
+#define BUILD2_CLI_MODULE
-#include <build/types>
-#include <build/utility>
+#include <build2/types>
+#include <build2/utility>
-#include <build/module>
+#include <build2/module>
-namespace build
+namespace build2
{
namespace cli
{
@@ -20,4 +20,4 @@ namespace build
}
}
-#endif // BUILD_CLI_MODULE
+#endif // BUILD2_CLI_MODULE
diff --git a/build/cli/module.cxx b/build2/cli/module.cxx
index de7d576..eafa4a0 100644
--- a/build/cli/module.cxx
+++ b/build2/cli/module.cxx
@@ -1,28 +1,28 @@
-// file : build/cli/module.cxx -*- C++ -*-
+// file : build2/cli/module.cxx -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#include <build/cli/module>
+#include <build2/cli/module>
#include <butl/process>
#include <butl/fdstream>
-#include <build/scope>
-#include <build/target>
-#include <build/variable>
-#include <build/diagnostics>
+#include <build2/scope>
+#include <build2/target>
+#include <build2/variable>
+#include <build2/diagnostics>
-#include <build/cxx/target>
+#include <build2/cxx/target>
-#include <build/config/utility>
+#include <build2/config/utility>
-#include <build/cli/target>
-#include <build/cli/rule>
+#include <build2/cli/target>
+#include <build2/cli/rule>
using namespace std;
using namespace butl;
-namespace build
+namespace build2
{
namespace cli
{
diff --git a/build/cli/rule b/build2/cli/rule
index 21fcf8a..6c154e2 100644
--- a/build/cli/rule
+++ b/build2/cli/rule
@@ -1,13 +1,13 @@
-// file : build/cli/rule -*- C++ -*-
+// file : build2/cli/rule -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef BUILD_CLI_RULE
-#define BUILD_CLI_RULE
+#ifndef BUILD2_CLI_RULE
+#define BUILD2_CLI_RULE
-#include <build/rule>
+#include <build2/rule>
-namespace build
+namespace build2
{
namespace cli
{
@@ -29,4 +29,4 @@ namespace build
}
}
-#endif // BUILD_CLI_RULE
+#endif // BUILD2_CLI_RULE
diff --git a/build/cli/rule.cxx b/build2/cli/rule.cxx
index 274f193..ae1f48a 100644
--- a/build/cli/rule.cxx
+++ b/build2/cli/rule.cxx
@@ -1,26 +1,26 @@
-// file : build/cli/rule.cxx -*- C++ -*-
+// file : build2/cli/rule.cxx -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#include <build/cli/rule>
+#include <build2/cli/rule>
#include <butl/process>
-#include <build/types>
-#include <build/scope>
-#include <build/target>
-#include <build/context>
-#include <build/algorithm>
-#include <build/diagnostics>
+#include <build2/types>
+#include <build2/scope>
+#include <build2/target>
+#include <build2/context>
+#include <build2/algorithm>
+#include <build2/diagnostics>
-#include <build/cli/target>
+#include <build2/cli/target>
-#include <build/config/utility>
+#include <build2/config/utility>
using namespace std;
using namespace butl;
-namespace build
+namespace build2
{
namespace cli
{
@@ -181,7 +181,7 @@ namespace build
else
{
cli_cxx& g (*static_cast<cli_cxx*> (mr.target));
- build::match (a, g);
+ build2::match (a, g);
return group_recipe; // Execute the group's recipe.
}
}
diff --git a/build/cli/target b/build2/cli/target
index dbb05bd..dde20be 100644
--- a/build/cli/target
+++ b/build2/cli/target
@@ -1,15 +1,15 @@
-// file : build/cli/target -*- C++ -*-
+// file : build2/cli/target -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef BUILD_CLI_TARGET
-#define BUILD_CLI_TARGET
+#ifndef BUILD2_CLI_TARGET
+#define BUILD2_CLI_TARGET
-#include <build/target>
+#include <build2/target>
-#include <build/cxx/target>
+#include <build2/cxx/target>
-namespace build
+namespace build2
{
namespace cli
{
@@ -59,4 +59,4 @@ namespace build
}
}
-#endif // BUILD_CLI_TARGET
+#endif // BUILD2_CLI_TARGET
diff --git a/build/cli/target.cxx b/build2/cli/target.cxx
index 6eef99b..ef69e88 100644
--- a/build/cli/target.cxx
+++ b/build2/cli/target.cxx
@@ -1,15 +1,15 @@
-// file : build/cli/target.cxx -*- C++ -*-
+// file : build2/cli/target.cxx -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#include <build/cli/target>
+#include <build2/cli/target>
#include <butl/filesystem>
using namespace std;
using namespace butl;
-namespace build
+namespace build2
{
namespace cli
{
diff --git a/build/config/module b/build2/config/module
index 3e43c7b..5888376 100644
--- a/build/config/module
+++ b/build2/config/module
@@ -1,16 +1,16 @@
-// file : build/config/module -*- C++ -*-
+// file : build2/config/module -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef BUILD_CONFIG_MODULE
-#define BUILD_CONFIG_MODULE
+#ifndef BUILD2_CONFIG_MODULE
+#define BUILD2_CONFIG_MODULE
-#include <build/types>
-#include <build/utility>
+#include <build2/types>
+#include <build2/utility>
-#include <build/module>
+#include <build2/module>
-namespace build
+namespace build2
{
namespace config
{
@@ -23,4 +23,4 @@ namespace build
}
}
-#endif // BUILD_CONFIG_MODULE
+#endif // BUILD2_CONFIG_MODULE
diff --git a/build/config/module.cxx b/build2/config/module.cxx
index c9139ed..3d03a51 100644
--- a/build/config/module.cxx
+++ b/build2/config/module.cxx
@@ -1,22 +1,22 @@
-// file : build/config/module.cxx -*- C++ -*-
+// file : build2/config/module.cxx -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#include <build/config/module>
+#include <build2/config/module>
#include <butl/filesystem>
-#include <build/file>
-#include <build/rule>
-#include <build/scope>
-#include <build/diagnostics>
+#include <build2/file>
+#include <build2/rule>
+#include <build2/scope>
+#include <build2/diagnostics>
-#include <build/config/operation>
+#include <build2/config/operation>
using namespace std;
using namespace butl;
-namespace build
+namespace build2
{
namespace config
{
diff --git a/build/config/operation b/build2/config/operation
index ee5161d..63eba7e 100644
--- a/build/config/operation
+++ b/build2/config/operation
@@ -1,13 +1,13 @@
-// file : build/config/operation -*- C++ -*-
+// file : build2/config/operation -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef BUILD_CONFIG_OPERATION
-#define BUILD_CONFIG_OPERATION
+#ifndef BUILD2_CONFIG_OPERATION
+#define BUILD2_CONFIG_OPERATION
-#include <build/operation>
+#include <build2/operation>
-namespace build
+namespace build2
{
namespace config
{
@@ -16,4 +16,4 @@ namespace build
}
}
-#endif // BUILD_CONFIG_OPERATION
+#endif // BUILD2_CONFIG_OPERATION
diff --git a/build/config/operation.cxx b/build2/config/operation.cxx
index abe4e22..96d9be7 100644
--- a/build/config/operation.cxx
+++ b/build2/config/operation.cxx
@@ -1,24 +1,24 @@
-// file : build/config/operation.cxx -*- C++ -*-
+// file : build2/config/operation.cxx -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#include <build/config/operation>
+#include <build2/config/operation>
#include <fstream>
#include <butl/filesystem>
-#include <build/file>
-#include <build/scope>
-#include <build/target>
-#include <build/context>
-#include <build/algorithm>
-#include <build/diagnostics>
+#include <build2/file>
+#include <build2/scope>
+#include <build2/target>
+#include <build2/context>
+#include <build2/algorithm>
+#include <build2/diagnostics>
using namespace std;
using namespace butl;
-namespace build
+namespace build2
{
namespace config
{
diff --git a/build/config/utility b/build2/config/utility
index ee5f50b..608cf5e 100644
--- a/build/config/utility
+++ b/build2/config/utility
@@ -1,19 +1,19 @@
-// file : build/config/utility -*- C++ -*-
+// file : build2/config/utility -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef BUILD_CONFIG_UTILITY
-#define BUILD_CONFIG_UTILITY
+#ifndef BUILD2_CONFIG_UTILITY
+#define BUILD2_CONFIG_UTILITY
#include <string>
#include <utility> // pair
#include <functional> // reference_wrapper
-#include <build/types>
-#include <build/variable>
-#include <build/diagnostics>
+#include <build2/types>
+#include <build2/variable>
+#include <build2/diagnostics>
-namespace build
+namespace build2
{
class scope;
@@ -122,7 +122,7 @@ namespace build
}
}
-#include <build/config/utility.txx>
-#include <build/config/utility.ixx>
+#include <build2/config/utility.txx>
+#include <build2/config/utility.ixx>
-#endif // BUILD_CONFIG_UTILITY
+#endif // BUILD2_CONFIG_UTILITY
diff --git a/build/config/utility.cxx b/build2/config/utility.cxx
index b81cb04..361bd5e 100644
--- a/build/config/utility.cxx
+++ b/build2/config/utility.cxx
@@ -1,14 +1,14 @@
-// file : build/config/utility.cxx -*- C++ -*-
+// file : build2/config/utility.cxx -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#include <build/config/utility>
+#include <build2/config/utility>
-#include <build/context>
+#include <build2/context>
using namespace std;
-namespace build
+namespace build2
{
namespace config
{
diff --git a/build/config/utility.ixx b/build2/config/utility.ixx
index 4e32119..b665248 100644
--- a/build/config/utility.ixx
+++ b/build2/config/utility.ixx
@@ -1,8 +1,8 @@
-// file : build/config/utility.ixx -*- C++ -*-
+// file : build2/config/utility.ixx -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-namespace build
+namespace build2
{
namespace config
{
diff --git a/build/config/utility.txx b/build2/config/utility.txx
index 06cb2eb..c88a34f 100644
--- a/build/config/utility.txx
+++ b/build2/config/utility.txx
@@ -1,10 +1,10 @@
-// file : build/config/utility.txx -*- C++ -*-
+// file : build2/config/utility.txx -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#include <build/scope>
+#include <build2/scope>
-namespace build
+namespace build2
{
namespace config
{
diff --git a/build/context b/build2/context
index b0ac6dd..22d4b52 100644
--- a/build/context
+++ b/build2/context
@@ -1,9 +1,9 @@
-// file : build/context -*- C++ -*-
+// file : build2/context -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef BUILD_CONTEXT
-#define BUILD_CONTEXT
+#ifndef BUILD2_CONTEXT
+#define BUILD2_CONTEXT
#include <string>
#include <ostream>
@@ -11,11 +11,11 @@
#include <butl/filesystem>
-#include <build/types>
-#include <build/utility>
-#include <build/operation>
+#include <build2/types>
+#include <build2/utility>
+#include <build2/operation>
-namespace build
+namespace build2
{
class scope;
class file;
@@ -160,6 +160,6 @@ namespace build
diag_done (const action&, const target&);
}
-#include <build/context.txx>
+#include <build2/context.txx>
-#endif // BUILD_CONTEXT
+#endif // BUILD2_CONTEXT
diff --git a/build/context.cxx b/build2/context.cxx
index a4815fb..34408e9 100644
--- a/build/context.cxx
+++ b/build2/context.cxx
@@ -1,23 +1,23 @@
-// file : build/context.cxx -*- C++ -*-
+// file : build2/context.cxx -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#include <build/context>
+#include <build2/context>
#include <ostream>
#include <sstream>
#include <cassert>
#include <system_error>
-#include <build/scope>
-#include <build/target>
-#include <build/rule>
-#include <build/diagnostics>
+#include <build2/scope>
+#include <build2/target>
+#include <build2/rule>
+#include <build2/diagnostics>
using namespace std;
using namespace butl;
-namespace build
+namespace build2
{
dir_path work;
dir_path home;
@@ -44,7 +44,7 @@ namespace build
var_pool.clear ();
// Reset meta/operation tables. Note that the order should match
- // the id constants in <build/operation>.
+ // the id constants in <build2/operation>.
//
meta_operation_table.clear ();
meta_operation_table.insert ("perform");
@@ -84,7 +84,7 @@ namespace build
// Create global scope. For Win32 this is not a "real" root path.
// On POSIX, however, this is a real path. See the comment in
- // <build/path-map> for details.
+ // <build2/path-map> for details.
//
global_scope = scopes.insert (
dir_path ("/"), nullptr, true, false)->second;
diff --git a/build/context.txx b/build2/context.txx
index a0660f9..cc37a97 100644
--- a/build/context.txx
+++ b/build2/context.txx
@@ -1,12 +1,12 @@
-// file : build/context.txx -*- C++ -*-
+// file : build2/context.txx -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
#include <system_error>
-#include <build/diagnostics>
+#include <build2/diagnostics>
-namespace build
+namespace build2
{
template <typename T>
fs_status<butl::rmfile_status>
diff --git a/build/cxx/compile b/build2/cxx/compile
index cb44829..42e0f2e 100644
--- a/build/cxx/compile
+++ b/build2/cxx/compile
@@ -1,14 +1,14 @@
-// file : build/cxx/compile -*- C++ -*-
+// file : build2/cxx/compile -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef BUILD_CXX_COMPILE
-#define BUILD_CXX_COMPILE
+#ifndef BUILD2_CXX_COMPILE
+#define BUILD2_CXX_COMPILE
-#include <build/types>
-#include <build/rule>
+#include <build2/types>
+#include <build2/rule>
-namespace build
+namespace build2
{
namespace cxx
{
@@ -29,4 +29,4 @@ namespace build
}
}
-#endif // BUILD_CXX_COMPILE
+#endif // BUILD2_CXX_COMPILE
diff --git a/build/cxx/compile.cxx b/build2/cxx/compile.cxx
index 2481b62..bc332b4 100644
--- a/build/cxx/compile.cxx
+++ b/build2/cxx/compile.cxx
@@ -1,8 +1,8 @@
-// file : build/cxx/compile.cxx -*- C++ -*-
+// file : build2/cxx/compile.cxx -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#include <build/cxx/compile>
+#include <build2/cxx/compile>
#include <map>
#include <string>
@@ -15,23 +15,23 @@
#include <butl/fdstream>
#include <butl/path-map>
-#include <build/types>
-#include <build/scope>
-#include <build/variable>
-#include <build/algorithm>
-#include <build/diagnostics>
-#include <build/context>
+#include <build2/types>
+#include <build2/scope>
+#include <build2/variable>
+#include <build2/algorithm>
+#include <build2/diagnostics>
+#include <build2/context>
-#include <build/bin/target>
-#include <build/cxx/target>
+#include <build2/bin/target>
+#include <build2/cxx/target>
-#include <build/cxx/utility>
-#include <build/cxx/link>
+#include <build2/cxx/utility>
+#include <build2/cxx/link>
using namespace std;
using namespace butl;
-namespace build
+namespace build2
{
namespace cxx
{
@@ -125,7 +125,7 @@ namespace build
if (a.operation () == clean_id && !pt.dir.sub (*amlg))
continue;
- build::match (a, pt);
+ build2::match (a, pt);
t.prerequisite_targets.push_back (&pt);
}
@@ -631,7 +631,7 @@ namespace build
// Match to a rule.
//
- build::match (a, pt);
+ build2::match (a, pt);
// Update it.
//
diff --git a/build/cxx/install b/build2/cxx/install
index 9df8408..154a62a 100644
--- a/build/cxx/install
+++ b/build2/cxx/install
@@ -1,18 +1,18 @@
-// file : build/cxx/install -*- C++ -*-
+// file : build2/cxx/install -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef BUILD_CXX_INSTALL
-#define BUILD_CXX_INSTALL
+#ifndef BUILD2_CXX_INSTALL
+#define BUILD2_CXX_INSTALL
-#include <build/types>
-#include <build/install/rule>
+#include <build2/types>
+#include <build2/install/rule>
-namespace build
+namespace build2
{
namespace cxx
{
- class install: public build::install::file_rule
+ class install: public build2::install::file_rule
{
public:
virtual target*
@@ -26,4 +26,4 @@ namespace build
}
}
-#endif // BUILD_CXX_INSTALL
+#endif // BUILD2_CXX_INSTALL
diff --git a/build/cxx/install.cxx b/build2/cxx/install.cxx
index f8c2c06..1bde9ec 100644
--- a/build/cxx/install.cxx
+++ b/build2/cxx/install.cxx
@@ -1,17 +1,17 @@
-// file : build/cxx/install.cxx -*- C++ -*-
+// file : build2/cxx/install.cxx -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#include <build/cxx/install>
+#include <build2/cxx/install>
-#include <build/bin/target>
+#include <build2/bin/target>
-#include <build/cxx/target>
-#include <build/cxx/link>
+#include <build2/cxx/target>
+#include <build2/cxx/link>
using namespace std;
-namespace build
+namespace build2
{
namespace cxx
{
diff --git a/build/cxx/link b/build2/cxx/link
index 5a5aafa..c7f7019 100644
--- a/build/cxx/link
+++ b/build2/cxx/link
@@ -1,20 +1,20 @@
-// file : build/cxx/link -*- C++ -*-
+// file : build2/cxx/link -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef BUILD_CXX_LINK
-#define BUILD_CXX_LINK
+#ifndef BUILD2_CXX_LINK
+#define BUILD2_CXX_LINK
#include <vector>
#include <butl/optional>
-#include <build/types>
-#include <build/rule>
+#include <build2/types>
+#include <build2/rule>
-#include <build/bin/target>
+#include <build2/bin/target>
-namespace build
+namespace build2
{
namespace cxx
{
@@ -67,4 +67,4 @@ namespace build
}
}
-#endif // BUILD_CXX_LINK
+#endif // BUILD2_CXX_LINK
diff --git a/build/cxx/link.cxx b/build2/cxx/link.cxx
index 81e6c0b..96584d9 100644
--- a/build/cxx/link.cxx
+++ b/build2/cxx/link.cxx
@@ -1,8 +1,8 @@
-// file : build/cxx/link.cxx -*- C++ -*-
+// file : build2/cxx/link.cxx -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#include <build/cxx/link>
+#include <build2/cxx/link>
#include <vector>
#include <string>
@@ -17,22 +17,22 @@
#include <butl/path-map>
#include <butl/filesystem>
-#include <build/types>
-#include <build/scope>
-#include <build/variable>
-#include <build/algorithm>
-#include <build/diagnostics>
-#include <build/context>
+#include <build2/types>
+#include <build2/scope>
+#include <build2/variable>
+#include <build2/algorithm>
+#include <build2/diagnostics>
+#include <build2/context>
-#include <build/bin/target>
-#include <build/cxx/target>
+#include <build2/bin/target>
+#include <build2/cxx/target>
-#include <build/cxx/utility>
+#include <build2/cxx/utility>
using namespace std;
using namespace butl;
-namespace build
+namespace build2
{
namespace cxx
{
@@ -570,7 +570,7 @@ namespace build
pt = &link_member (*l, lo);
}
- build::match (a, *pt);
+ build2::match (a, *pt);
t.prerequisite_targets.push_back (pt);
continue;
}
@@ -683,7 +683,7 @@ namespace build
if (!found)
{
- build::match (a, *pt); // Now p1 should be resolved.
+ build2::match (a, *pt); // Now p1 should be resolved.
// Searching our own prerequisite is ok.
//
@@ -721,7 +721,7 @@ namespace build
ot.prerequisites.emplace_back (p);
}
- build::match (a, *pt);
+ build2::match (a, *pt);
}
t.prerequisite_targets.push_back (pt);
diff --git a/build/cxx/module b/build2/cxx/module
index a3bd436..c712d0b 100644
--- a/build/cxx/module
+++ b/build2/cxx/module
@@ -1,16 +1,16 @@
-// file : build/cxx/module -*- C++ -*-
+// file : build2/cxx/module -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef BUILD_CXX_MODULE
-#define BUILD_CXX_MODULE
+#ifndef BUILD2_CXX_MODULE
+#define BUILD2_CXX_MODULE
-#include <build/types>
-#include <build/utility>
+#include <build2/types>
+#include <build2/utility>
-#include <build/module>
+#include <build2/module>
-namespace build
+namespace build2
{
namespace cxx
{
@@ -20,4 +20,4 @@ namespace build
}
}
-#endif // BUILD_CXX_MODULE
+#endif // BUILD2_CXX_MODULE
diff --git a/build/cxx/module.cxx b/build2/cxx/module.cxx
index c979328..4829a17 100644
--- a/build/cxx/module.cxx
+++ b/build2/cxx/module.cxx
@@ -1,29 +1,29 @@
-// file : build/cxx/module.cxx -*- C++ -*-
+// file : build2/cxx/module.cxx -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#include <build/cxx/module>
+#include <build2/cxx/module>
#include <butl/process>
#include <butl/fdstream>
-#include <build/scope>
-#include <build/diagnostics>
+#include <build2/scope>
+#include <build2/diagnostics>
-#include <build/config/utility>
-#include <build/install/utility>
+#include <build2/config/utility>
+#include <build2/install/utility>
-#include <build/bin/target>
+#include <build2/bin/target>
-#include <build/cxx/target>
-#include <build/cxx/compile>
-#include <build/cxx/link>
-#include <build/cxx/install>
+#include <build2/cxx/target>
+#include <build2/cxx/compile>
+#include <build2/cxx/link>
+#include <build2/cxx/install>
using namespace std;
using namespace butl;
-namespace build
+namespace build2
{
namespace cxx
{
@@ -216,7 +216,7 @@ namespace build
// Configure "installability" of our target types.
//
{
- using build::install::path;
+ using build2::install::path;
path<hxx> (b, dir_path ("include")); // Install into install.include.
path<ixx> (b, dir_path ("include"));
diff --git a/build/cxx/target b/build2/cxx/target
index fe27c79..c51c964 100644
--- a/build/cxx/target
+++ b/build2/cxx/target
@@ -1,13 +1,13 @@
-// file : build/cxx/target -*- C++ -*-
+// file : build2/cxx/target -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef BUILD_CXX_TARGET
-#define BUILD_CXX_TARGET
+#ifndef BUILD2_CXX_TARGET
+#define BUILD2_CXX_TARGET
-#include <build/target>
+#include <build2/target>
-namespace build
+namespace build2
{
namespace cxx
{
@@ -75,4 +75,4 @@ namespace build
}
}
-#endif // BUILD_CXX_TARGET
+#endif // BUILD2_CXX_TARGET
diff --git a/build/cxx/target.cxx b/build2/cxx/target.cxx
index 314f758..0990945 100644
--- a/build/cxx/target.cxx
+++ b/build2/cxx/target.cxx
@@ -1,12 +1,12 @@
-// file : build/cxx/target.cxx -*- C++ -*-
+// file : build2/cxx/target.cxx -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#include <build/cxx/target>
+#include <build2/cxx/target>
using namespace std;
-namespace build
+namespace build2
{
namespace cxx
{
diff --git a/build/cxx/utility b/build2/cxx/utility
index 53e80e1..b0deb08 100644
--- a/build/cxx/utility
+++ b/build2/cxx/utility
@@ -1,18 +1,18 @@
-// file : build/cxx/utility -*- C++ -*-
+// file : build2/cxx/utility -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef BUILD_CXX_UTILITY
-#define BUILD_CXX_UTILITY
+#ifndef BUILD2_CXX_UTILITY
+#define BUILD2_CXX_UTILITY
#include <string>
-#include <build/types>
-#include <build/target>
+#include <build2/types>
+#include <build2/target>
-#include <build/config/utility>
+#include <build2/config/utility>
-namespace build
+namespace build2
{
namespace cxx
{
@@ -32,6 +32,6 @@ namespace build
}
}
-#include <build/cxx/utility.txx>
+#include <build2/cxx/utility.txx>
-#endif // BUILD_CXX_UTILITY
+#endif // BUILD2_CXX_UTILITY
diff --git a/build/cxx/utility.cxx b/build2/cxx/utility.cxx
index 830ee76..fead1b4 100644
--- a/build/cxx/utility.cxx
+++ b/build2/cxx/utility.cxx
@@ -1,14 +1,14 @@
-// file : build/cxx/utility.cxx -*- C++ -*-
+// file : build2/cxx/utility.cxx -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#include <build/cxx/utility>
+#include <build2/cxx/utility>
-#include <build/bin/target>
+#include <build2/bin/target>
using namespace std;
-namespace build
+namespace build2
{
namespace cxx
{
diff --git a/build/cxx/utility.txx b/build2/cxx/utility.txx
index 561a54e..b35649e 100644
--- a/build/cxx/utility.txx
+++ b/build2/cxx/utility.txx
@@ -1,10 +1,10 @@
-// file : build/cxx/utility.txx -*- C++ -*-
+// file : build2/cxx/utility.txx -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
using namespace std;
-namespace build
+namespace build2
{
namespace cxx
{
diff --git a/build/diagnostics b/build2/diagnostics
index d5b0b3d..52f999a 100644
--- a/build/diagnostics
+++ b/build2/diagnostics
@@ -1,9 +1,9 @@
-// file : build/diagnostics -*- C++ -*-
+// file : build2/diagnostics -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef BUILD_DIAGNOSTICS
-#define BUILD_DIAGNOSTICS
+#ifndef BUILD2_DIAGNOSTICS
+#define BUILD2_DIAGNOSTICS
#include <cstddef> // size_t
#include <cstdint>
@@ -16,10 +16,10 @@
#include <butl/path>
-#include <build/types>
-#include <build/path-io>
+#include <build2/types>
+#include <build2/path-io>
-namespace build
+namespace build2
{
struct diag_record;
@@ -399,4 +399,4 @@ namespace build
extern const fail_mark<failed> fail;
}
-#endif // BUILD_DIAGNOSTICS
+#endif // BUILD2_DIAGNOSTICS
diff --git a/build/diagnostics.cxx b/build2/diagnostics.cxx
index a450301..850c1d4 100644
--- a/build/diagnostics.cxx
+++ b/build2/diagnostics.cxx
@@ -1,17 +1,17 @@
-// file : build/diagnostics.cxx -*- C++ -*-
+// file : build2/diagnostics.cxx -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#include <build/diagnostics>
+#include <build2/diagnostics>
#include <cstring> // strchr()
#include <iostream>
-#include <build/utility>
+#include <build2/utility>
using namespace std;
-namespace build
+namespace build2
{
// Relative stream.
//
diff --git a/build/dist/module b/build2/dist/module
index f2e024a..29dca71 100644
--- a/build/dist/module
+++ b/build2/dist/module
@@ -1,16 +1,16 @@
-// file : build/dist/module -*- C++ -*-
+// file : build2/dist/module -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef BUILD_DIST_MODULE
-#define BUILD_DIST_MODULE
+#ifndef BUILD2_DIST_MODULE
+#define BUILD2_DIST_MODULE
-#include <build/types>
-#include <build/utility>
+#include <build2/types>
+#include <build2/utility>
-#include <build/module>
+#include <build2/module>
-namespace build
+namespace build2
{
namespace dist
{
@@ -23,4 +23,4 @@ namespace build
}
}
-#endif // BUILD_DIST_MODULE
+#endif // BUILD2_DIST_MODULE
diff --git a/build/dist/module.cxx b/build2/dist/module.cxx
index f39ef18..00b709e 100644
--- a/build/dist/module.cxx
+++ b/build2/dist/module.cxx
@@ -1,22 +1,22 @@
-// file : build/dist/module.cxx -*- C++ -*-
+// file : build2/dist/module.cxx -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#include <build/dist/module>
+#include <build2/dist/module>
-#include <build/scope>
-#include <build/file>
-#include <build/diagnostics>
+#include <build2/scope>
+#include <build2/file>
+#include <build2/diagnostics>
-#include <build/config/utility>
+#include <build2/config/utility>
-#include <build/dist/rule>
-#include <build/dist/operation>
+#include <build2/dist/rule>
+#include <build2/dist/operation>
using namespace std;
using namespace butl;
-namespace build
+namespace build2
{
namespace dist
{
diff --git a/build2/dist/operation b/build2/dist/operation
new file mode 100644
index 0000000..eb5da76
--- /dev/null
+++ b/build2/dist/operation
@@ -0,0 +1,18 @@
+// file : build2/dist/operation -*- C++ -*-
+// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
+// license : MIT; see accompanying LICENSE file
+
+#ifndef BUILD2_DIST_OPERATION
+#define BUILD2_DIST_OPERATION
+
+#include <build2/operation>
+
+namespace build2
+{
+ namespace dist
+ {
+ extern meta_operation_info dist;
+ }
+}
+
+#endif // BUILD2_DIST_OPERATION
diff --git a/build/dist/operation.cxx b/build2/dist/operation.cxx
index 28a64fa..24bdd31 100644
--- a/build/dist/operation.cxx
+++ b/build2/dist/operation.cxx
@@ -1,26 +1,26 @@
-// file : build/dist/operation.cxx -*- C++ -*-
+// file : build2/dist/operation.cxx -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#include <build/dist/operation>
+#include <build2/dist/operation>
#include <cassert>
#include <butl/process>
#include <butl/filesystem>
-#include <build/file>
-#include <build/dump>
-#include <build/scope>
-#include <build/target>
-#include <build/context>
-#include <build/algorithm>
-#include <build/diagnostics>
+#include <build2/file>
+#include <build2/dump>
+#include <build2/scope>
+#include <build2/target>
+#include <build2/context>
+#include <build2/algorithm>
+#include <build2/diagnostics>
using namespace std;
using namespace butl;
-namespace build
+namespace build2
{
namespace dist
{
@@ -272,7 +272,7 @@ namespace build
//
// @@ Not for incremental dist?
//
- if (build::rmdir_r (td) == rmdir_status::not_empty)
+ if (build2::rmdir_r (td) == rmdir_status::not_empty)
fail << "unable to clean target directory " << td;
install (dist_cmd, td);
diff --git a/build/dist/rule b/build2/dist/rule
index ffb2227..2fbf33b 100644
--- a/build/dist/rule
+++ b/build2/dist/rule
@@ -1,20 +1,20 @@
-// file : build/dist/rule -*- C++ -*-
+// file : build2/dist/rule -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef BUILD_DIST_RULE
-#define BUILD_DIST_RULE
+#ifndef BUILD2_DIST_RULE
+#define BUILD2_DIST_RULE
-#include <build/rule>
-#include <build/types>
-#include <build/target>
-#include <build/operation>
+#include <build2/rule>
+#include <build2/types>
+#include <build2/target>
+#include <build2/operation>
-namespace build
+namespace build2
{
namespace dist
{
- class rule: public build::rule
+ class rule: public build2::rule
{
public:
virtual match_result
@@ -26,4 +26,4 @@ namespace build
}
}
-#endif // BUILD_DIST_RULE
+#endif // BUILD2_DIST_RULE
diff --git a/build/dist/rule.cxx b/build2/dist/rule.cxx
index 80e7b05..10f35f5 100644
--- a/build/dist/rule.cxx
+++ b/build2/dist/rule.cxx
@@ -1,17 +1,17 @@
-// file : build/dist/rule.cxx -*- C++ -*-
+// file : build2/dist/rule.cxx -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#include <build/dist/rule>
+#include <build2/dist/rule>
-#include <build/scope>
-#include <build/target>
-#include <build/algorithm>
-#include <build/diagnostics>
+#include <build2/scope>
+#include <build2/target>
+#include <build2/algorithm>
+#include <build2/diagnostics>
using namespace std;
-namespace build
+namespace build2
{
namespace dist
{
@@ -46,7 +46,7 @@ namespace build
// Don't match targets that are outside of our project.
//
if (pt.dir.sub (out_root))
- build::match (a, pt);
+ build2::match (a, pt);
}
return noop_recipe; // We will never be executed.
diff --git a/build/dump b/build2/dump
index 8bc548e..8ac600e 100644
--- a/build/dump
+++ b/build2/dump
@@ -1,13 +1,13 @@
-// file : build/dump -*- C++ -*-
+// file : build2/dump -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef BUILD_DUMP
-#define BUILD_DUMP
+#ifndef BUILD2_DUMP
+#define BUILD2_DUMP
-#include <build/operation>
+#include <build2/operation>
-namespace build
+namespace build2
{
// Dump the state pertaining to the specified action.
//
@@ -15,4 +15,4 @@ namespace build
dump (action);
}
-#endif // BUILD_DUMP
+#endif // BUILD2_DUMP
diff --git a/build/dump.cxx b/build2/dump.cxx
index 62e032b..19172cf 100644
--- a/build/dump.cxx
+++ b/build2/dump.cxx
@@ -1,21 +1,21 @@
-// file : build/dump.cxx -*- C++ -*-
+// file : build2/dump.cxx -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#include <build/dump>
+#include <build2/dump>
#include <string>
#include <cassert>
-#include <build/scope>
-#include <build/target>
-#include <build/variable>
-#include <build/context>
-#include <build/diagnostics>
+#include <build2/scope>
+#include <build2/target>
+#include <build2/variable>
+#include <build2/context>
+#include <build2/diagnostics>
using namespace std;
-namespace build
+namespace build2
{
static void
dump_variable (ostream& os, const variable& var, const value& val)
diff --git a/build/file b/build2/file
index c2b2535..21da0c0 100644
--- a/build/file
+++ b/build2/file
@@ -1,18 +1,18 @@
-// file : build/file -*- C++ -*-
+// file : build2/file -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef BUILD_FILE
-#define BUILD_FILE
+#ifndef BUILD2_FILE
+#define BUILD2_FILE
#include <map>
#include <string>
-#include <build/types>
-#include <build/scope>
-#include <build/variable> // list_value
+#include <build2/types>
+#include <build2/scope>
+#include <build2/variable> // list_value
-namespace build
+namespace build2
{
class target;
class location;
@@ -139,6 +139,6 @@ namespace build
import (const prerequisite_key&);
}
-#include <build/file.ixx>
+#include <build2/file.ixx>
-#endif // BUILD_FILE
+#endif // BUILD2_FILE
diff --git a/build/file.cxx b/build2/file.cxx
index b4b1b77..cdaa79a 100644
--- a/build/file.cxx
+++ b/build2/file.cxx
@@ -1,8 +1,8 @@
-// file : build/file.cxx -*- C++ -*-
+// file : build2/file.cxx -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#include <build/file>
+#include <build2/file>
#include <fstream>
#include <utility> // move()
@@ -10,19 +10,19 @@
#include <butl/filesystem>
-#include <build/scope>
-#include <build/context>
-#include <build/parser>
-#include <build/prerequisite>
-#include <build/diagnostics>
+#include <build2/scope>
+#include <build2/context>
+#include <build2/parser>
+#include <build2/prerequisite>
+#include <build2/diagnostics>
-#include <build/token>
-#include <build/lexer>
+#include <build2/token>
+#include <build2/lexer>
using namespace std;
using namespace butl;
-namespace build
+namespace build2
{
const dir_path build_dir ("build");
const dir_path bootstrap_dir ("build/bootstrap");
diff --git a/build/file.ixx b/build2/file.ixx
index 1a11cbe..b446ef4 100644
--- a/build/file.ixx
+++ b/build2/file.ixx
@@ -1,8 +1,8 @@
-// file : build/file.ixx -*- C++ -*-
+// file : build2/file.ixx -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-namespace build
+namespace build2
{
inline void
source_once (const path& bf, scope& root, scope& base)
diff --git a/build/install/module b/build2/install/module
index 7a814c8..91b5ecb 100644
--- a/build/install/module
+++ b/build2/install/module
@@ -1,16 +1,16 @@
-// file : build/install/module -*- C++ -*-
+// file : build2/install/module -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef BUILD_INSTALL_MODULE
-#define BUILD_INSTALL_MODULE
+#ifndef BUILD2_INSTALL_MODULE
+#define BUILD2_INSTALL_MODULE
-#include <build/types>
-#include <build/utility>
+#include <build2/types>
+#include <build2/utility>
-#include <build/module>
+#include <build2/module>
-namespace build
+namespace build2
{
namespace install
{
@@ -23,4 +23,4 @@ namespace build
}
}
-#endif // BUILD_INSTALL_MODULE
+#endif // BUILD2_INSTALL_MODULE
diff --git a/build/install/module.cxx b/build2/install/module.cxx
index 706f367..c6ad717 100644
--- a/build/install/module.cxx
+++ b/build2/install/module.cxx
@@ -1,25 +1,25 @@
-// file : build/install/module.cxx -*- C++ -*-
+// file : build2/install/module.cxx -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#include <build/install/module>
+#include <build2/install/module>
-#include <build/scope>
-#include <build/target>
-#include <build/rule>
-#include <build/operation>
-#include <build/diagnostics>
+#include <build2/scope>
+#include <build2/target>
+#include <build2/rule>
+#include <build2/operation>
+#include <build2/diagnostics>
-#include <build/config/utility>
+#include <build2/config/utility>
-#include <build/install/rule>
-#include <build/install/utility>
-#include <build/install/operation>
+#include <build2/install/rule>
+#include <build2/install/utility>
+#include <build2/install/operation>
using namespace std;
using namespace butl;
-namespace build
+namespace build2
{
namespace install
{
diff --git a/build2/install/operation b/build2/install/operation
new file mode 100644
index 0000000..20630d5
--- /dev/null
+++ b/build2/install/operation
@@ -0,0 +1,18 @@
+// file : build2/install/operation -*- C++ -*-
+// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
+// license : MIT; see accompanying LICENSE file
+
+#ifndef BUILD2_INSTALL_OPERATION
+#define BUILD2_INSTALL_OPERATION
+
+#include <build2/operation>
+
+namespace build2
+{
+ namespace install
+ {
+ extern operation_info install;
+ }
+}
+
+#endif // BUILD2_INSTALL_OPERATION
diff --git a/build/install/operation.cxx b/build2/install/operation.cxx
index 1246671..eb7cdb1 100644
--- a/build/install/operation.cxx
+++ b/build2/install/operation.cxx
@@ -1,13 +1,13 @@
-// file : build/install/operation.cxx -*- C++ -*-
+// file : build2/install/operation.cxx -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#include <build/install/operation>
+#include <build2/install/operation>
using namespace std;
using namespace butl;
-namespace build
+namespace build2
{
namespace install
{
diff --git a/build/install/rule b/build2/install/rule
index 54014e1..aeb7f13 100644
--- a/build/install/rule
+++ b/build2/install/rule
@@ -1,16 +1,16 @@
-// file : build/install/rule -*- C++ -*-
+// file : build2/install/rule -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef BUILD_INSTALL_RULE
-#define BUILD_INSTALL_RULE
+#ifndef BUILD2_INSTALL_RULE
+#define BUILD2_INSTALL_RULE
-#include <build/rule>
-#include <build/types>
-#include <build/target>
-#include <build/operation>
+#include <build2/rule>
+#include <build2/types>
+#include <build2/target>
+#include <build2/operation>
-namespace build
+namespace build2
{
namespace install
{
@@ -46,4 +46,4 @@ namespace build
}
}
-#endif // BUILD_INSTALL_RULE
+#endif // BUILD2_INSTALL_RULE
diff --git a/build/install/rule.cxx b/build2/install/rule.cxx
index fa648b5..16feca8 100644
--- a/build/install/rule.cxx
+++ b/build2/install/rule.cxx
@@ -1,23 +1,23 @@
-// file : build/install/rule.cxx -*- C++ -*-
+// file : build2/install/rule.cxx -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#include <build/install/rule>
+#include <build2/install/rule>
#include <butl/process>
#include <butl/filesystem>
-#include <build/scope>
-#include <build/target>
-#include <build/algorithm>
-#include <build/diagnostics>
+#include <build2/scope>
+#include <build2/target>
+#include <build2/algorithm>
+#include <build2/diagnostics>
-#include <build/config/utility>
+#include <build2/config/utility>
using namespace std;
using namespace butl;
-namespace build
+namespace build2
{
namespace install
{
@@ -73,7 +73,7 @@ namespace build
continue;
}
- build::match (a, pt);
+ build2::match (a, pt);
t.prerequisite_targets.push_back (&pt);
}
@@ -154,7 +154,7 @@ namespace build
if (l && as<dir_path> (*l).string () == "false")
continue;
- build::match (a, *pt);
+ build2::match (a, *pt);
// If the matched rule returned noop_recipe, then the target
// state will be set to unchanged as an optimization. Use this
diff --git a/build/install/utility b/build2/install/utility
index 9bc41f1..3cfc3e2 100644
--- a/build/install/utility
+++ b/build2/install/utility
@@ -1,17 +1,17 @@
-// file : build/install/utility -*- C++ -*-
+// file : build2/install/utility -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef BUILD_INSTALL_UTILITY
-#define BUILD_INSTALL_UTILITY
+#ifndef BUILD2_INSTALL_UTILITY
+#define BUILD2_INSTALL_UTILITY
#include <string>
#include <utility>
-#include <build/scope>
-#include <build/types>
+#include <build2/scope>
+#include <build2/types>
-namespace build
+namespace build2
{
namespace install
{
@@ -37,4 +37,4 @@ namespace build
}
}
-#endif // BUILD_INSTALL_UTILITY
+#endif // BUILD2_INSTALL_UTILITY
diff --git a/build/lexer b/build2/lexer
index 4a50e2a..51f3e56 100644
--- a/build/lexer
+++ b/build2/lexer
@@ -1,9 +1,9 @@
-// file : build/lexer -*- C++ -*-
+// file : build2/lexer -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef BUILD_LEXER
-#define BUILD_LEXER
+#ifndef BUILD2_LEXER
+#define BUILD2_LEXER
#include <stack>
#include <string>
@@ -15,13 +15,13 @@
#include <butl/char-scanner>
-#include <build/types>
-#include <build/utility>
+#include <build2/types>
+#include <build2/utility>
-#include <build/token>
-#include <build/diagnostics>
+#include <build2/token>
+#include <build2/diagnostics>
-namespace build
+namespace build2
{
// Context-dependent lexing mode. In the value mode we don't treat
// certain characters (e.g., +, =) as special so that we can use
@@ -113,7 +113,7 @@ namespace build
// Diagnostics.
//
private:
- struct fail_mark_base: build::fail_mark_base<failed>
+ struct fail_mark_base: build2::fail_mark_base<failed>
{
fail_mark_base (const std::string& n): name_ (n) {}
@@ -135,4 +135,4 @@ namespace build
};
}
-#endif // BUILD_LEXER
+#endif // BUILD2_LEXER
diff --git a/build/lexer.cxx b/build2/lexer.cxx
index 864fc7b..e4d03c4 100644
--- a/build/lexer.cxx
+++ b/build2/lexer.cxx
@@ -1,12 +1,12 @@
-// file : build/lexer.cxx -*- C++ -*-
+// file : build2/lexer.cxx -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#include <build/lexer>
+#include <build2/lexer>
using namespace std;
-namespace build
+namespace build2
{
typedef token_type type;
@@ -425,7 +425,7 @@ namespace build
location_prologue lexer::fail_mark_base::
operator() (const xchar& c) const
{
- return build::fail_mark_base<failed>::operator() (
+ return build2::fail_mark_base<failed>::operator() (
location (name_.c_str (), c.line, c.column));
}
}
diff --git a/build/module b/build2/module
index 061ef60..4fac698 100644
--- a/build/module
+++ b/build2/module
@@ -1,18 +1,18 @@
-// file : build/module -*- C++ -*-
+// file : build2/module -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef BUILD_MODULE
-#define BUILD_MODULE
+#ifndef BUILD2_MODULE
+#define BUILD2_MODULE
#include <map>
-#include <build/types>
-#include <build/utility>
+#include <build2/types>
+#include <build2/utility>
-#include <build/diagnostics>
+#include <build2/diagnostics>
-namespace build
+namespace build2
{
class scope;
class location;
@@ -48,7 +48,7 @@ namespace build
{
bool boot; // True if the module boot'ed but not yet init'ed.
module_init_function* init;
- unique_ptr<build::module> module;
+ unique_ptr<build2::module> module;
const location loc; // Boot location.
};
@@ -83,4 +83,4 @@ namespace build
extern available_module_map builtin_modules;
}
-#endif // BUILD_MODULE
+#endif // BUILD2_MODULE
diff --git a/build/module.cxx b/build2/module.cxx
index 79a9bdb..288569f 100644
--- a/build/module.cxx
+++ b/build2/module.cxx
@@ -1,18 +1,18 @@
-// file : build/module.cxx -*- C++ -*-
+// file : build2/module.cxx -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#include <build/module>
+#include <build2/module>
#include <utility> // make_pair()
-#include <build/scope>
-#include <build/variable>
-#include <build/diagnostics>
+#include <build2/scope>
+#include <build2/variable>
+#include <build2/diagnostics>
using namespace std;
-namespace build
+namespace build2
{
available_module_map builtin_modules;
diff --git a/build/name b/build2/name
index ecf86cc..a0672c7 100644
--- a/build/name
+++ b/build2/name
@@ -1,9 +1,9 @@
-// file : build/name -*- C++ -*-
+// file : build2/name -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef BUILD_NAME
-#define BUILD_NAME
+#ifndef BUILD2_NAME
+#define BUILD2_NAME
#include <string>
#include <vector>
@@ -12,9 +12,9 @@
#include <butl/path>
-// Note: include <build/types> instead of this file directly.
+// Note: include <build2/types> instead of this file directly.
//
-namespace build
+namespace build2
{
using butl::dir_path;
@@ -110,4 +110,4 @@ namespace build
operator<< (std::ostream&, const names&);
}
-#endif // BUILD_NAME
+#endif // BUILD2_NAME
diff --git a/build/name.cxx b/build2/name.cxx
index 1bb8d31..9ebfa1f 100644
--- a/build/name.cxx
+++ b/build2/name.cxx
@@ -1,16 +1,16 @@
-// file : build/name.cxx -*- C++ -*-
+// file : build2/name.cxx -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#include <build/name>
+#include <build2/name>
#include <ostream>
-#include <build/diagnostics>
+#include <build2/diagnostics>
using namespace std;
-namespace build
+namespace build2
{
ostream&
operator<< (ostream& os, const name& n)
diff --git a/build/operation b/build2/operation
index d8cbd07..a843c9d 100644
--- a/build/operation
+++ b/build2/operation
@@ -1,9 +1,9 @@
-// file : build/operation -*- C++ -*-
+// file : build2/operation -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef BUILD_OPERATION
-#define BUILD_OPERATION
+#ifndef BUILD2_OPERATION
+#define BUILD2_OPERATION
#include <string>
#include <iosfwd>
@@ -13,9 +13,9 @@
#include <butl/string-table>
-#include <build/types>
+#include <build2/types>
-namespace build
+namespace build2
{
class location;
class scope;
@@ -356,4 +356,4 @@ namespace build
using operations = sparse_vector<const operation_info>;
}
-#endif // BUILD_OPERATION
+#endif // BUILD2_OPERATION
diff --git a/build/operation.cxx b/build2/operation.cxx
index b92479b..f4eae64 100644
--- a/build/operation.cxx
+++ b/build2/operation.cxx
@@ -1,8 +1,8 @@
-// file : build/operation.cxx -*- C++ -*-
+// file : build2/operation.cxx -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#include <build/operation>
+#include <build2/operation>
#include <vector>
#include <ostream>
@@ -11,17 +11,17 @@
#include <butl/utility> // reverse_iterate
-#include <build/scope>
-#include <build/target>
-#include <build/file>
-#include <build/algorithm>
-#include <build/diagnostics>
-#include <build/dump>
+#include <build2/scope>
+#include <build2/target>
+#include <build2/file>
+#include <build2/algorithm>
+#include <build2/diagnostics>
+#include <build2/dump>
using namespace std;
using namespace butl;
-namespace build
+namespace build2
{
// action
//
diff --git a/build/options b/build2/options
index a2fea2c..596980e 100644
--- a/build/options
+++ b/build2/options
@@ -4,8 +4,8 @@
// compiler for C++.
//
-#ifndef BUILD_OPTIONS
-#define BUILD_OPTIONS
+#ifndef BUILD2_OPTIONS
+#define BUILD2_OPTIONS
// Begin prologue.
//
@@ -17,8 +17,37 @@
#include <cstddef>
#include <exception>
+#ifndef CLI_POTENTIALLY_UNUSED
+# if defined(_MSC_VER) || defined(__xlC__)
+# define CLI_POTENTIALLY_UNUSED(x) (void*)&x
+# else
+# define CLI_POTENTIALLY_UNUSED(x) (void)x
+# endif
+#endif
+
namespace cl
{
+ class usage_para
+ {
+ public:
+ enum value
+ {
+ none,
+ text,
+ option
+ };
+
+ usage_para (value);
+
+ operator value () const
+ {
+ return v_;
+ }
+
+ private:
+ value v_;
+ };
+
class unknown_mode
{
public:
@@ -29,7 +58,7 @@ namespace cl
fail
};
- unknown_mode (value v);
+ unknown_mode (value);
operator value () const
{
@@ -264,8 +293,9 @@ class options
// Print usage information.
//
- static void
- print_usage (::std::ostream&);
+ static ::cl::usage_para
+ print_usage (::std::ostream&,
+ ::cl::usage_para = ::cl::usage_para::none);
// Implementation details.
//
@@ -288,11 +318,11 @@ class options
bool verbose_specified_;
};
-#include <build/options.ixx>
+#include <build2/options.ixx>
// Begin epilogue.
//
//
// End epilogue.
-#endif // BUILD_OPTIONS
+#endif // BUILD2_OPTIONS
diff --git a/build/options.cli b/build2/options.cli
index 9bd1dcd..8e30985 100644
--- a/build/options.cli
+++ b/build2/options.cli
@@ -1,4 +1,4 @@
-// file : build/options.cli
+// file : build2/options.cli
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
diff --git a/build/options.cxx b/build2/options.cxx
index b5c2754..aa72be1 100644
--- a/build/options.cxx
+++ b/build2/options.cxx
@@ -9,7 +9,7 @@
//
// End prologue.
-#include <build/options>
+#include <build2/options>
#include <map>
#include <set>
@@ -252,52 +252,40 @@ namespace cl
static void
parse (std::map<K, V>& m, bool& xs, scanner& s)
{
- std::string o (s.next ());
+ const char* o (s.next ());
if (s.more ())
{
std::string ov (s.next ());
std::string::size_type p = ov.find ('=');
- if (p == std::string::npos)
- {
- K k = K ();
-
- if (!ov.empty ())
- {
- std::istringstream ks (ov);
-
- if (!(ks >> k && ks.eof ()))
- throw invalid_value (o, ov);
- }
+ K k = K ();
+ V v = V ();
+ std::string kstr (ov, 0, p);
+ std::string vstr (ov, (p != std::string::npos ? p + 1 : ov.size ()));
- m[k] = V ();
- }
- else
+ int ac (2);
+ char* av[] =
{
- K k = K ();
- V v = V ();
- std::string kstr (ov, 0, p);
- std::string vstr (ov, p + 1);
-
- if (!kstr.empty ())
- {
- std::istringstream ks (kstr);
-
- if (!(ks >> k && ks.eof ()))
- throw invalid_value (o, ov);
- }
-
- if (!vstr.empty ())
- {
- std::istringstream vs (vstr);
+ const_cast<char*> (o), 0
+ };
- if (!(vs >> v && vs.eof ()))
- throw invalid_value (o, ov);
- }
+ bool dummy;
+ if (!kstr.empty ())
+ {
+ av[1] = const_cast<char*> (kstr.c_str ());
+ argv_scanner s (0, ac, av);
+ parser<K>::parse (k, dummy, s);
+ }
- m[k] = v;
+ if (!vstr.empty ())
+ {
+ av[1] = const_cast<char*> (vstr.c_str ());
+ argv_scanner s (0, ac, av);
+ parser<V>::parse (v, dummy, s);
}
+
+ m[k] = v;
}
else
throw missing_value (o);
@@ -426,9 +414,14 @@ options (::cl::scanner& s,
_parse (s, opt, arg);
}
-void options::
-print_usage (::std::ostream& os)
+::cl::usage_para options::
+print_usage (::std::ostream& os, ::cl::usage_para p)
{
+ CLI_POTENTIALLY_UNUSED (os);
+
+ if (p == ::cl::usage_para::text)
+ os << ::std::endl;
+
os << "--help Print usage information and exit." << ::std::endl;
os << "--version Print version and exit." << ::std::endl;
@@ -439,6 +432,10 @@ print_usage (::std::ostream& os)
os << "--verbose <level> Set the diagnostics verbosity to <level> between 0 (disabled)" << ::std::endl
<< " and 6 (lots of information)." << ::std::endl;
+
+ p = ::cl::usage_para::option;
+
+ return p;
}
typedef
diff --git a/build/options.ixx b/build2/options.ixx
index c44d7e5..245e0c0 100644
--- a/build/options.ixx
+++ b/build2/options.ixx
@@ -11,6 +11,14 @@
namespace cl
{
+ // usage_para
+ //
+ inline usage_para::
+ usage_para (value v)
+ : v_ (v)
+ {
+ }
+
// unknown_mode
//
inline unknown_mode::
diff --git a/build/parser b/build2/parser
index 2631ca2..f8bd97a 100644
--- a/build/parser
+++ b/build2/parser
@@ -1,23 +1,23 @@
-// file : build/parser -*- C++ -*-
+// file : build2/parser -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef BUILD_PARSER
-#define BUILD_PARSER
+#ifndef BUILD2_PARSER
+#define BUILD2_PARSER
#include <string>
#include <iosfwd>
-#include <build/types>
-#include <build/utility>
+#include <build2/types>
+#include <build2/utility>
-#include <build/spec>
-#include <build/lexer>
-#include <build/token>
-#include <build/variable> // list_value
-#include <build/diagnostics>
+#include <build2/spec>
+#include <build2/lexer>
+#include <build2/token>
+#include <build2/variable> // list_value
+#include <build2/diagnostics>
-namespace build
+namespace build2
{
class scope;
class target;
@@ -25,8 +25,8 @@ namespace build
class parser
{
public:
- typedef build::names names_type;
- typedef build::variable variable_type;
+ typedef build2::names names_type;
+ typedef build2::variable variable_type;
// If boot is true, then we are parsing bootstrap.build and modules
// should only be bootstrapped.
@@ -293,4 +293,4 @@ namespace build
};
}
-#endif // BUILD_PARSER
+#endif // BUILD2_PARSER
diff --git a/build/parser.cxx b/build2/parser.cxx
index ad17ae9..139d2a2 100644
--- a/build/parser.cxx
+++ b/build2/parser.cxx
@@ -1,8 +1,8 @@
-// file : build/parser.cxx -*- C++ -*-
+// file : build2/parser.cxx -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#include <build/parser>
+#include <build2/parser>
#include <cctype> // is{alpha alnum}()
@@ -12,22 +12,22 @@
#include <iterator> // make_move_iterator()
#include <iostream>
-#include <build/types>
-#include <build/utility>
-#include <build/version>
+#include <build2/types>
+#include <build2/utility>
+#include <build2/version>
-#include <build/scope>
-#include <build/target>
-#include <build/prerequisite>
-#include <build/variable>
-#include <build/module>
-#include <build/file>
-#include <build/diagnostics>
-#include <build/context>
+#include <build2/scope>
+#include <build2/target>
+#include <build2/prerequisite>
+#include <build2/variable>
+#include <build2/module>
+#include <build2/file>
+#include <build2/diagnostics>
+#include <build2/context>
using namespace std;
-namespace build
+namespace build2
{
static location
get_location (const token&, const void*);
@@ -735,7 +735,7 @@ namespace build
// import [<var>=](<project>|<project>/<target>])+
//
value* val (nullptr);
- const build::variable* var (nullptr);
+ const build2::variable* var (nullptr);
type at; // Assignment type.
if (tt == type::name)
@@ -766,9 +766,9 @@ namespace build
for (name& n: ns)
{
- // build::import() will check the name, if required.
+ // build2::import() will check the name, if required.
//
- names_type r (build::import (*scope_, move (n), l));
+ names_type r (build2::import (*scope_, move (n), l));
if (val != nullptr)
{
@@ -800,7 +800,7 @@ namespace build
fail (t) << "export outside export stub";
// The rest is a value. Parse it as names to get variable expansion.
- // build::import() will check the names, if required.
+ // build2::import() will check the names, if required.
//
mode (lexer_mode::value);
next (t, tt);
@@ -865,9 +865,9 @@ namespace build
fail (l) << "invalid version '" << v << "': " << e.what ();
}
- if (iv > BUILD_VERSION)
+ if (iv > BUILD2_VERSION)
fail (l) << "build2 " << v << " required" <<
- info << "running build2 " << BUILD_VERSION_STR;
+ info << "running build2 " << BUILD2_VERSION_STR;
}
}
else
diff --git a/build/path-io b/build2/path-io
index 888a8b4..c41e1b9 100644
--- a/build/path-io
+++ b/build2/path-io
@@ -1,9 +1,9 @@
-// file : build/path-io -*- C++ -*-
+// file : build2/path-io -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef BUILD_PATH_IO
-#define BUILD_PATH_IO
+#ifndef BUILD2_PATH_IO
+#define BUILD2_PATH_IO
#include <iosfwd>
@@ -11,7 +11,7 @@
// Custom path IO.
//
-namespace build
+namespace build2
{
using butl::path;
using butl::dir_path;
@@ -23,4 +23,4 @@ namespace build
operator<< (std::ostream&, const dir_path&);
}
-#endif // BUILD_PATH_IO
+#endif // BUILD2_PATH_IO
diff --git a/build/path-io.cxx b/build2/path-io.cxx
index b6fd9e7..0ee50b4 100644
--- a/build/path-io.cxx
+++ b/build2/path-io.cxx
@@ -1,17 +1,17 @@
-// file : build/path-io.cxx -*- C++ -*-
+// file : build2/path-io.cxx -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#include <build/path-io>
+#include <build2/path-io>
#include <ostream>
-#include <build/context>
-#include <build/diagnostics>
+#include <build2/context>
+#include <build2/diagnostics>
using namespace std;
-namespace build
+namespace build2
{
ostream&
operator<< (ostream& os, const path& p)
diff --git a/build/prerequisite b/build2/prerequisite
index c435fd3..0a5f51c 100644
--- a/build/prerequisite
+++ b/build2/prerequisite
@@ -1,9 +1,9 @@
-// file : build/prerequisite -*- C++ -*-
+// file : build2/prerequisite -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef BUILD_PREREQUISITE
-#define BUILD_PREREQUISITE
+#ifndef BUILD2_PREREQUISITE
+#define BUILD2_PREREQUISITE
#include <set>
#include <string>
@@ -12,12 +12,12 @@
#include <cassert>
#include <functional> // reference_wrapper
-#include <build/types>
-#include <build/target-key>
-#include <build/utility> // extension_pool
-#include <build/diagnostics>
+#include <build2/types>
+#include <build2/target-key>
+#include <build2/utility> // extension_pool
+#include <build2/diagnostics>
-namespace build
+namespace build2
{
class scope;
class target;
@@ -28,7 +28,7 @@ namespace build
class prerequisite_key
{
public:
- typedef build::scope scope_type;
+ typedef build2::scope scope_type;
mutable const std::string* proj; // Can be NULL, from project_name_pool.
target_key tk;
@@ -51,9 +51,9 @@ namespace build
class prerequisite
{
public:
- typedef build::target target_type;
- typedef build::target_type target_type_type;
- typedef build::scope scope_type;
+ typedef build2::target target_type;
+ typedef build2::target_type target_type_type;
+ typedef build2::scope scope_type;
prerequisite (const std::string* p,
const target_type_type& t,
@@ -126,4 +126,4 @@ namespace build
};
}
-#endif // BUILD_PREREQUISITE
+#endif // BUILD2_PREREQUISITE
diff --git a/build/prerequisite.cxx b/build2/prerequisite.cxx
index 49cab89..6a31071 100644
--- a/build/prerequisite.cxx
+++ b/build2/prerequisite.cxx
@@ -1,19 +1,19 @@
-// file : build/prerequisite.cxx -*- C++ -*-
+// file : build2/prerequisite.cxx -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#include <build/prerequisite>
+#include <build2/prerequisite>
#include <ostream>
-#include <build/scope>
-#include <build/target> // target_type
-#include <build/context>
-#include <build/diagnostics>
+#include <build2/scope>
+#include <build2/target> // target_type
+#include <build2/context>
+#include <build2/diagnostics>
using namespace std;
-namespace build
+namespace build2
{
// prerequisite_key
//
diff --git a/build/rule b/build2/rule
index af1bcc8..3d0782f 100644
--- a/build/rule
+++ b/build2/rule
@@ -1,24 +1,24 @@
-// file : build/rule -*- C++ -*-
+// file : build2/rule -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef BUILD_RULE
-#define BUILD_RULE
+#ifndef BUILD2_RULE
+#define BUILD2_RULE
#include <string>
#include <cstddef> // nullptr_t
-#include <build/types>
-#include <build/target>
-#include <build/operation>
+#include <build2/types>
+#include <build2/target>
+#include <build2/operation>
-namespace build
+namespace build2
{
class match_result
{
public:
- typedef build::target target_type;
- typedef build::prerequisite prerequisite_type;
+ typedef build2::target target_type;
+ typedef build2::prerequisite prerequisite_type;
// Can contain neither (both are NULL), one of, or both. If both
// are NULL, then it is a "no match" indicator.
@@ -119,7 +119,7 @@ namespace build
// Fallback rule that always matches and does nothing.
//
- class fallback_rule: public build::rule
+ class fallback_rule: public build2::rule
{
public:
virtual match_result
@@ -132,4 +132,4 @@ namespace build
};
}
-#endif // BUILD_RULE
+#endif // BUILD2_RULE
diff --git a/build/rule-map b/build2/rule-map
index 74d1cfc..f86ef16 100644
--- a/build/rule-map
+++ b/build2/rule-map
@@ -1,9 +1,9 @@
-// file : build/rule-map -*- C++ -*-
+// file : build2/rule-map -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef BUILD_RULE_MAP
-#define BUILD_RULE_MAP
+#ifndef BUILD2_RULE_MAP
+#define BUILD2_RULE_MAP
#include <map>
#include <vector>
@@ -13,10 +13,10 @@
#include <butl/prefix-map>
-#include <build/types>
-#include <build/operation>
+#include <build2/types>
+#include <build2/operation>
-namespace build
+namespace build2
{
class rule;
@@ -112,4 +112,4 @@ namespace build
};
}
-#endif // BUILD_RULE_MAP
+#endif // BUILD2_RULE_MAP
diff --git a/build/rule.cxx b/build2/rule.cxx
index cce291c..34fb3b4 100644
--- a/build/rule.cxx
+++ b/build2/rule.cxx
@@ -1,24 +1,24 @@
-// file : build/rule.cxx -*- C++ -*-
+// file : build2/rule.cxx -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#include <build/rule>
+#include <build2/rule>
#include <utility> // move()
#include <system_error>
#include <butl/filesystem>
-#include <build/scope>
-#include <build/target>
-#include <build/algorithm>
-#include <build/diagnostics>
-#include <build/context>
+#include <build2/scope>
+#include <build2/target>
+#include <build2/algorithm>
+#include <build2/diagnostics>
+#include <build2/context>
using namespace std;
using namespace butl;
-namespace build
+namespace build2
{
// file_rule
//
diff --git a/build/scope b/build2/scope
index 0cb319f..830436c 100644
--- a/build/scope
+++ b/build2/scope
@@ -1,9 +1,9 @@
-// file : build/scope -*- C++ -*-
+// file : build2/scope -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef BUILD_SCOPE
-#define BUILD_SCOPE
+#ifndef BUILD2_SCOPE
+#define BUILD2_SCOPE
#include <functional> // function
#include <unordered_set>
@@ -11,17 +11,17 @@
#include <butl/path-map>
-#include <build/types>
-#include <build/utility>
+#include <build2/types>
+#include <build2/utility>
-#include <build/module>
-#include <build/variable>
-#include <build/prerequisite>
-#include <build/target-type>
-#include <build/rule-map>
-#include <build/operation>
+#include <build2/module>
+#include <build2/variable>
+#include <build2/prerequisite>
+#include <build2/target-type>
+#include <build2/rule-map>
+#include <build2/operation>
-namespace build
+namespace build2
{
class scope
{
@@ -89,13 +89,13 @@ namespace build
// Lookup, including in outer scopes. If you only want to lookup
// in this scope, do it on the the variables map directly.
//
- build::lookup<const value>
+ build2::lookup<const value>
operator[] (const variable& var) const
{
return lookup (nullptr, nullptr, var);
}
- build::lookup<const value>
+ build2::lookup<const value>
operator[] (const std::string& name) const
{
return operator[] (var_pool.find (name));
@@ -103,19 +103,19 @@ namespace build
// As above, but includes target type/pattern-specific variables.
//
- build::lookup<const value>
+ build2::lookup<const value>
lookup (const target_key& tk, const variable& var) const
{
return lookup (tk.type, tk.name, var);
}
- build::lookup<const value>
+ build2::lookup<const value>
lookup (const target_key& tk, const string& var) const
{
return lookup (tk, var_pool.find (var));
}
- build::lookup<const value>
+ build2::lookup<const value>
lookup (const target_type& tt,
const string& name,
const variable& var) const
@@ -123,13 +123,13 @@ namespace build
return lookup (&tt, &name, var);
}
- build::lookup<const value>
+ build2::lookup<const value>
lookup (const target_type& tt, const string& name, const string& var) const
{
return lookup (tt, name, var_pool.find (var));
}
- build::lookup<const value>
+ build2::lookup<const value>
lookup (const target_type*, const string* name, const variable&) const;
// Return a value suitable for assignment (or append if you only
@@ -171,10 +171,10 @@ namespace build
// Meta/operations supported by this project (set on the root
// scope only).
//
- build::meta_operations meta_operations;
- build::operations operations;
+ build2::meta_operations meta_operations;
+ build2::operations operations;
- typedef build::path path_type;
+ typedef build2::path path_type;
// Set of buildfiles already loaded for this scope. The included
// buildfiles are checked against the project's root scope while
@@ -229,7 +229,7 @@ namespace build
friend class scope_map;
friend class temp_scope;
- // These two from <build/file> set strong_.
+ // These two from <build2/file> set strong_.
//
friend void create_bootstrap_outer (scope&);
friend scope& create_bootstrap_inner (scope&, const dir_path&);
@@ -309,4 +309,4 @@ namespace build
extern scope* global_scope;
}
-#endif // BUILD_SCOPE
+#endif // BUILD2_SCOPE
diff --git a/build/scope.cxx b/build2/scope.cxx
index dfddf20..4d95a95 100644
--- a/build/scope.cxx
+++ b/build2/scope.cxx
@@ -1,21 +1,21 @@
-// file : build/scope.cxx -*- C++ -*-
+// file : build2/scope.cxx -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#include <build/scope>
+#include <build2/scope>
-#include <build/target>
+#include <build2/target>
using namespace std;
-namespace build
+namespace build2
{
// scope
//
lookup<const value> scope::
lookup (const target_type* tt, const string* name, const variable& var) const
{
- using result = build::lookup<const value>;
+ using result = build2::lookup<const value>;
for (const scope* s (this); s != nullptr; )
{
diff --git a/build/search b/build2/search
index d5e2c04..f5db9eb 100644
--- a/build/search
+++ b/build2/search
@@ -1,13 +1,13 @@
-// file : build/search -*- C++ -*-
+// file : build2/search -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef BUILD_SEARCH
-#define BUILD_SEARCH
+#ifndef BUILD2_SEARCH
+#define BUILD2_SEARCH
-#include <build/types>
+#include <build2/types>
-namespace build
+namespace build2
{
class target;
class prerequisite_key;
@@ -28,4 +28,4 @@ namespace build
create_new_target (const prerequisite_key&);
}
-#endif // BUILD_SEARCH
+#endif // BUILD2_SEARCH
diff --git a/build/search.cxx b/build2/search.cxx
index c06d281..58384f2 100644
--- a/build/search.cxx
+++ b/build2/search.cxx
@@ -1,23 +1,23 @@
-// file : build/search.cxx -*- C++ -*-
+// file : build2/search.cxx -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#include <build/search>
+#include <build2/search>
#include <utility> // move()
#include <cassert>
#include <butl/filesystem>
-#include <build/scope>
-#include <build/target>
-#include <build/prerequisite>
-#include <build/diagnostics>
+#include <build2/scope>
+#include <build2/target>
+#include <build2/prerequisite>
+#include <build2/diagnostics>
using namespace std;
using namespace butl;
-namespace build
+namespace build2
{
target*
search_existing_target (const prerequisite_key& pk)
diff --git a/build/spec b/build2/spec
index f50110b..fc981ed 100644
--- a/build/spec
+++ b/build2/spec
@@ -1,22 +1,22 @@
-// file : build/spec -*- C++ -*-
+// file : build2/spec -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef BUILD_SPEC
-#define BUILD_SPEC
+#ifndef BUILD2_SPEC
+#define BUILD2_SPEC
#include <string>
#include <vector>
#include <iosfwd>
#include <utility> // move()
-#include <build/types>
+#include <build2/types>
-namespace build
+namespace build2
{
struct targetspec
{
- typedef build::name name_type;
+ typedef build2::name name_type;
explicit
targetspec (name_type n): name (std::move (n)) {}
@@ -58,4 +58,4 @@ namespace build
operator<< (std::ostream&, const buildspec&);
}
-#endif // BUILD_SPEC
+#endif // BUILD2_SPEC
diff --git a/build/spec.cxx b/build2/spec.cxx
index b08cdb3..d9a4e12 100644
--- a/build/spec.cxx
+++ b/build2/spec.cxx
@@ -1,17 +1,17 @@
-// file : build/spec.cxx -*- C++ -*-
+// file : build2/spec.cxx -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#include <build/spec>
+#include <build2/spec>
#include <ostream>
-#include <build/context>
-#include <build/diagnostics>
+#include <build2/context>
+#include <build2/diagnostics>
using namespace std;
-namespace build
+namespace build2
{
ostream&
operator<< (ostream& os, const targetspec& s)
diff --git a/build/target b/build2/target
index 22b5e89..19bec9e 100644
--- a/build/target
+++ b/build2/target
@@ -1,9 +1,9 @@
-// file : build/target -*- C++ -*-
+// file : build2/target -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef BUILD_TARGET
-#define BUILD_TARGET
+#ifndef BUILD2_TARGET
+#define BUILD2_TARGET
#include <map>
#include <string>
@@ -21,23 +21,23 @@
#include <butl/utility> // reverse_iterate()
#include <butl/multi-index> // map_iterator_adapter
-#include <build/types>
-#include <build/utility>
+#include <build2/types>
+#include <build2/utility>
-#include <build/scope>
-#include <build/variable>
-#include <build/operation>
-#include <build/target-type>
-#include <build/target-key>
-#include <build/prerequisite>
+#include <build2/scope>
+#include <build2/variable>
+#include <build2/operation>
+#include <build2/target-type>
+#include <build2/target-key>
+#include <build2/prerequisite>
-namespace build
+namespace build2
{
class scope;
class target;
target&
- search (prerequisite&); // From <build/algorithm>.
+ search (prerequisite&); // From <build2/algorithm>.
// Target state.
//
@@ -87,8 +87,8 @@ namespace build
// all the prerequisites in a loop, skipping ignored. Specifically,
// for actions with the "first" execution mode, it calls
// execute_prerequisites() while for those with the "last" mode --
- // reverse_execute_prerequisites(); see <build/operation>,
- // <build/algorithm> for details. The group recipe call's the group's
+ // reverse_execute_prerequisites(); see <build2/operation>,
+ // <build2/algorithm> for details. The group recipe call's the group's
// recipe.
//
extern const recipe empty_recipe;
@@ -97,10 +97,10 @@ namespace build
extern const recipe group_recipe;
target_state
- noop_action (action, target&); // Defined in <build/algorithm>.
+ noop_action (action, target&); // Defined in <build2/algorithm>.
target_state
- group_action (action, target&); // Defined in <build/algorithm>.
+ group_action (action, target&); // Defined in <build2/algorithm>.
// Prerequisite references as used in the target::prerequisites list
// below.
@@ -135,7 +135,7 @@ namespace build
class target
{
public:
- typedef build::action action_type;
+ typedef build2::action action_type;
virtual
~target () = default;
@@ -199,7 +199,7 @@ namespace build
target* group {nullptr};
// You should not call this function directly; rather use
- // resolve_group_members() from <build/algorithm>.
+ // resolve_group_members() from <build2/algorithm>.
//
virtual group_view
group_members (action_type) const;
@@ -341,7 +341,7 @@ namespace build
action_type action; // Action this recipe is for.
public:
- typedef build::recipe recipe_type;
+ typedef build2::recipe recipe_type;
const recipe_type&
recipe (action_type a) const {return a > action ? empty_recipe : recipe_;}
@@ -504,8 +504,8 @@ namespace build
//
struct prerequisite_member
{
- typedef build::target target_type;
- typedef build::prerequisite prerequisite_type;
+ typedef build2::target target_type;
+ typedef build2::prerequisite prerequisite_type;
prerequisite_ref& prerequisite;
target_type* target;
@@ -527,7 +527,7 @@ namespace build
: prerequisite.get ().key ();
}
- const build::target_type&
+ const build2::target_type&
type () const
{
return target != nullptr ? target->type () : prerequisite.get ().type;
@@ -550,7 +550,7 @@ namespace build
target_type&
search () const
{
- return target != nullptr ? *target : build::search (prerequisite);
+ return target != nullptr ? *target : build2::search (prerequisite);
}
prerequisite_type&
@@ -867,7 +867,7 @@ namespace build
public:
using mtime_target::mtime_target;
- typedef build::path path_type;
+ typedef build2::path path_type;
const path_type&
path () const {return path_;}
@@ -1078,7 +1078,7 @@ namespace build
}
-#include <build/target.ixx>
-#include <build/target.txx>
+#include <build2/target.ixx>
+#include <build2/target.txx>
-#endif // BUILD_TARGET
+#endif // BUILD2_TARGET
diff --git a/build/target-key b/build2/target-key
index 526a33a..cd8e270 100644
--- a/build/target-key
+++ b/build2/target-key
@@ -1,9 +1,9 @@
-// file : build/target-key -*- C++ -*-
+// file : build2/target-key -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef BUILD_TARGET_KEY
-#define BUILD_TARGET_KEY
+#ifndef BUILD2_TARGET_KEY
+#define BUILD2_TARGET_KEY
#include <map>
#include <string>
@@ -12,10 +12,10 @@
#include <butl/utility> // compare_c_string
-#include <build/types>
-#include <build/target-type>
+#include <build2/types>
+#include <build2/target-type>
-namespace build
+namespace build2
{
// Light-weight (by being shallow-pointing) target key.
//
@@ -52,4 +52,4 @@ namespace build
operator<< (std::ostream&, const target_key&); // Defined in target.cxx
}
-#endif // BUILD_TARGET_KEY
+#endif // BUILD2_TARGET_KEY
diff --git a/build/target-type b/build2/target-type
index e299fe2..52a45f4 100644
--- a/build/target-type
+++ b/build2/target-type
@@ -1,17 +1,17 @@
-// file : build/target-type -*- C++ -*-
+// file : build2/target-type -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef BUILD_TARGET_TYPE
-#define BUILD_TARGET_TYPE
+#ifndef BUILD2_TARGET_TYPE
+#define BUILD2_TARGET_TYPE
#include <map>
#include <string>
#include <ostream>
-#include <build/types>
+#include <build2/types>
-namespace build
+namespace build2
{
class scope;
class target;
@@ -94,4 +94,4 @@ namespace build
};
}
-#endif // BUILD_TARGET_TYPE
+#endif // BUILD2_TARGET_TYPE
diff --git a/build/target.cxx b/build2/target.cxx
index 41fe54a..3932466 100644
--- a/build/target.cxx
+++ b/build2/target.cxx
@@ -1,21 +1,21 @@
-// file : build/target.cxx -*- C++ -*-
+// file : build2/target.cxx -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#include <build/target>
+#include <build2/target>
#include <cassert>
#include <butl/filesystem>
-#include <build/scope>
-#include <build/search>
-#include <build/algorithm>
-#include <build/diagnostics>
+#include <build2/scope>
+#include <build2/search>
+#include <build2/algorithm>
+#include <build2/diagnostics>
using namespace std;
-namespace build
+namespace build2
{
// target_type
//
diff --git a/build/target.ixx b/build2/target.ixx
index 6bcd265..25c33ba 100644
--- a/build/target.ixx
+++ b/build2/target.ixx
@@ -1,8 +1,8 @@
-// file : build/target.ixx -*- C++ -*-
+// file : build2/target.ixx -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-namespace build
+namespace build2
{
// prerequisite_ref
//
@@ -30,7 +30,7 @@ namespace build
// prerequisite_members
//
group_view
- resolve_group_members (action, target&); // <build/algorithm>
+ resolve_group_members (action, target&); // <build2/algorithm>
template <typename T>
inline auto prerequisite_members_range<T>::iterator::
diff --git a/build/target.txx b/build2/target.txx
index 192cfbc..3209720 100644
--- a/build/target.txx
+++ b/build2/target.txx
@@ -1,13 +1,13 @@
-// file : build/target.txx -*- C++ -*-
+// file : build2/target.txx -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#include <build/scope>
-#include <build/context> // extension_pool
-#include <build/diagnostics>
-#include <build/prerequisite>
+#include <build2/scope>
+#include <build2/context> // extension_pool
+#include <build2/diagnostics>
+#include <build2/prerequisite>
-namespace build
+namespace build2
{
template <const char* ext>
const string&
diff --git a/build/test/module b/build2/test/module
index 83c6d60..76fd9e1 100644
--- a/build/test/module
+++ b/build2/test/module
@@ -1,14 +1,14 @@
-// file : build/test/module -*- C++ -*-
+// file : build2/test/module -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef BUILD_TEST_MODULE
-#define BUILD_TEST_MODULE
+#ifndef BUILD2_TEST_MODULE
+#define BUILD2_TEST_MODULE
-#include <build/types>
-#include <build/module>
+#include <build2/types>
+#include <build2/module>
-namespace build
+namespace build2
{
namespace test
{
@@ -21,4 +21,4 @@ namespace build
}
}
-#endif // BUILD_TEST_MODULE
+#endif // BUILD2_TEST_MODULE
diff --git a/build/test/module.cxx b/build2/test/module.cxx
index 9372103..133849a 100644
--- a/build/test/module.cxx
+++ b/build2/test/module.cxx
@@ -1,21 +1,21 @@
-// file : build/test/module.cxx -*- C++ -*-
+// file : build2/test/module.cxx -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#include <build/test/module>
+#include <build2/test/module>
-#include <build/scope>
-#include <build/target>
-#include <build/rule>
-#include <build/diagnostics>
+#include <build2/scope>
+#include <build2/target>
+#include <build2/rule>
+#include <build2/diagnostics>
-#include <build/test/operation>
-#include <build/test/rule>
+#include <build2/test/operation>
+#include <build2/test/rule>
using namespace std;
using namespace butl;
-namespace build
+namespace build2
{
namespace test
{
diff --git a/build2/test/operation b/build2/test/operation
new file mode 100644
index 0000000..f924d4c
--- /dev/null
+++ b/build2/test/operation
@@ -0,0 +1,18 @@
+// file : build2/test/operation -*- C++ -*-
+// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
+// license : MIT; see accompanying LICENSE file
+
+#ifndef BUILD2_TEST_OPERATION
+#define BUILD2_TEST_OPERATION
+
+#include <build2/operation>
+
+namespace build2
+{
+ namespace test
+ {
+ extern operation_info test;
+ }
+}
+
+#endif // BUILD2_TEST_OPERATION
diff --git a/build/test/operation.cxx b/build2/test/operation.cxx
index 40c5b86..2bae629 100644
--- a/build/test/operation.cxx
+++ b/build2/test/operation.cxx
@@ -1,13 +1,13 @@
-// file : build/test/operation.cxx -*- C++ -*-
+// file : build2/test/operation.cxx -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#include <build/test/operation>
+#include <build2/test/operation>
using namespace std;
using namespace butl;
-namespace build
+namespace build2
{
namespace test
{
diff --git a/build/test/rule b/build2/test/rule
index 17f32ce..1102876 100644
--- a/build/test/rule
+++ b/build2/test/rule
@@ -1,18 +1,18 @@
-// file : build/test/rule -*- C++ -*-
+// file : build2/test/rule -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef BUILD_TEST_RULE
-#define BUILD_TEST_RULE
+#ifndef BUILD2_TEST_RULE
+#define BUILD2_TEST_RULE
-#include <build/rule>
-#include <build/operation>
+#include <build2/rule>
+#include <build2/operation>
-namespace build
+namespace build2
{
namespace test
{
- class rule: public build::rule
+ class rule: public build2::rule
{
public:
virtual match_result
@@ -27,4 +27,4 @@ namespace build
}
}
-#endif // BUILD_TEST_RULE
+#endif // BUILD2_TEST_RULE
diff --git a/build/test/rule.cxx b/build2/test/rule.cxx
index 3a4c91d..abf9fcf 100644
--- a/build/test/rule.cxx
+++ b/build2/test/rule.cxx
@@ -1,22 +1,22 @@
-// file : build/test/rule.cxx -*- C++ -*-
+// file : build2/test/rule.cxx -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#include <build/test/rule>
+#include <build2/test/rule>
#include <butl/process>
-#include <build/scope>
-#include <build/target>
-#include <build/algorithm>
-#include <build/diagnostics>
+#include <build2/scope>
+#include <build2/target>
+#include <build2/algorithm>
+#include <build2/diagnostics>
-#include <build/config/utility> // add_options()
+#include <build2/config/utility> // add_options()
using namespace std;
using namespace butl;
-namespace build
+namespace build2
{
namespace test
{
@@ -206,7 +206,7 @@ namespace build
//
if (it != nullptr)
{
- build::match (a, *it);
+ build2::match (a, *it);
if (it->state () == target_state::unchanged)
{
@@ -219,7 +219,7 @@ namespace build
{
if (in != on)
{
- build::match (a, *ot);
+ build2::match (a, *ot);
if (ot->state () == target_state::unchanged)
{
diff --git a/build/token b/build2/token
index d98b2e1..55ab1ee 100644
--- a/build/token
+++ b/build2/token
@@ -1,9 +1,9 @@
-// file : build/token -*- C++ -*-
+// file : build2/token -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef BUILD_TOKEN
-#define BUILD_TOKEN
+#ifndef BUILD2_TOKEN
+#define BUILD2_TOKEN
#include <string>
#include <iosfwd>
@@ -11,7 +11,7 @@
#include <cstdint> // uint64_t
#include <utility> // move
-namespace build
+namespace build2
{
enum class token_type
{
@@ -70,4 +70,4 @@ namespace build
operator<< (std::ostream&, const token&);
}
-#endif // BUILD_TOKEN
+#endif // BUILD2_TOKEN
diff --git a/build/token.cxx b/build2/token.cxx
index cf47fd4..b14fc00 100644
--- a/build/token.cxx
+++ b/build2/token.cxx
@@ -1,14 +1,14 @@
-// file : build/token.cxx -*- C++ -*-
+// file : build2/token.cxx -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#include <build/token>
+#include <build2/token>
#include <ostream>
using namespace std;
-namespace build
+namespace build2
{
ostream&
operator<< (ostream& os, const token& t)
diff --git a/build/types b/build2/types
index 3028fc2..da96805 100644
--- a/build/types
+++ b/build2/types
@@ -1,9 +1,9 @@
-// file : build/types -*- C++ -*-
+// file : build2/types -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef BUILD_TYPES
-#define BUILD_TYPES
+#ifndef BUILD2_TYPES
+#define BUILD2_TYPES
#include <vector>
#include <string>
@@ -15,9 +15,9 @@
#include <butl/path>
#include <butl/timestamp>
-#include <build/name>
+#include <build2/name>
-namespace build
+namespace build2
{
// Commonly-used types.
//
@@ -52,4 +52,4 @@ namespace build
using butl::operator<<;
}
-#endif // BUILD_TYPES
+#endif // BUILD2_TYPES
diff --git a/build/utility b/build2/utility
index bcb6b58..a460bab 100644
--- a/build/utility
+++ b/build2/utility
@@ -1,18 +1,18 @@
-// file : build/utility -*- C++ -*-
+// file : build2/utility -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef BUILD_UTILITY
-#define BUILD_UTILITY
+#ifndef BUILD2_UTILITY
+#define BUILD2_UTILITY
#include <utility> // move(), make_pair()
#include <cassert> // assert()
#include <exception> // uncaught_exception()
#include <unordered_set>
-#include <build/types>
+#include <build2/types>
-namespace build
+namespace build2
{
using std::move;
using std::make_pair;
@@ -24,7 +24,7 @@ namespace build
extern const dir_path empty_dir_path;
// Parse version string in the X.Y.Z[-{a|b}N] to a version integer in the
- // AABBCCDD form as describe in <build/version>. Throw invalid_argument
+ // AABBCCDD form as describe in <build2/version>. Throw invalid_argument
// if the passed string is not a valid version.
//
unsigned int
@@ -82,4 +82,4 @@ namespace build
};
}
-#endif // BUILD_UTILITY
+#endif // BUILD2_UTILITY
diff --git a/build/utility.cxx b/build2/utility.cxx
index 2361c8b..fcecb5b 100644
--- a/build/utility.cxx
+++ b/build2/utility.cxx
@@ -1,14 +1,14 @@
-// file : build/utility.cxx -*- C++ -*-
+// file : build2/utility.cxx -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#include <build/utility>
+#include <build2/utility>
#include <cstdlib> // strtol()
using namespace std;
-namespace build
+namespace build2
{
const string empty_string;
const path empty_path;
diff --git a/build/variable b/build2/variable
index 799a35c..6304979 100644
--- a/build/variable
+++ b/build2/variable
@@ -1,9 +1,9 @@
-// file : build/variable -*- C++ -*-
+// file : build2/variable -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#ifndef BUILD_VARIABLE
-#define BUILD_VARIABLE
+#ifndef BUILD2_VARIABLE
+#define BUILD2_VARIABLE
#include <map>
#include <vector>
@@ -16,12 +16,12 @@
#include <butl/prefix-map>
-#include <build/types>
-#include <build/utility>
+#include <build2/types>
+#include <build2/utility>
-#include <build/target-type>
+#include <build2/target-type>
-namespace build
+namespace build2
{
struct variable;
@@ -276,7 +276,7 @@ namespace build
static void assign (value&, bool);
static void append (value&, bool);
- static const build::value_type value_type;
+ static const build2::value_type value_type;
};
extern const value_type* bool_type;
@@ -299,7 +299,7 @@ namespace build
static void assign (value&, std::string);
static void append (value&, std::string);
- static const build::value_type value_type;
+ static const build2::value_type value_type;
};
extern const value_type* string_type;
@@ -322,7 +322,7 @@ namespace build
static void assign (value&, dir_path);
static void append (value&, dir_path);
- static const build::value_type value_type;
+ static const build2::value_type value_type;
};
extern const value_type* dir_path_type;
@@ -345,7 +345,7 @@ namespace build
static void assign (value&, name);
static void append (value&, name) = delete;
- static const build::value_type value_type;
+ static const build2::value_type value_type;
};
extern const value_type* name_type;
@@ -450,7 +450,7 @@ namespace build
template <typename V> static void append (value&, V);
static const std::string type_name;
- static const build::value_type value_type;
+ static const build2::value_type value_type;
};
template <typename T, typename D>
@@ -580,7 +580,7 @@ namespace build
template <typename M> static void append (value&, M);
static const std::string type_name;
- static const build::value_type value_type;
+ static const build2::value_type value_type;
};
template <typename K, typename V, typename D>
@@ -590,10 +590,10 @@ namespace build
namespace std
{
template <>
- struct hash<build::variable>: hash<string>
+ struct hash<build2::variable>: hash<string>
{
size_t
- operator() (const build::variable& v) const noexcept
+ operator() (const build2::variable& v) const noexcept
{
return hash<string>::operator() (v.name);
}
@@ -603,7 +603,7 @@ namespace std
namespace butl
{
template <>
- struct compare_prefix<build::variable_cref>: compare_prefix<std::string>
+ struct compare_prefix<build2::variable_cref>: compare_prefix<std::string>
{
typedef compare_prefix<std::string> base;
@@ -611,20 +611,20 @@ namespace butl
compare_prefix (char d): base (d) {}
bool
- operator() (const build::variable& x, const build::variable& y) const
+ operator() (const build2::variable& x, const build2::variable& y) const
{
return base::operator() (x.name, y.name);
}
bool
- prefix (const build::variable& p, const build::variable& k) const
+ prefix (const build2::variable& p, const build2::variable& k) const
{
return base::prefix (p.name, k.name);
}
};
}
-namespace build
+namespace build2
{
// variable_pool
//
@@ -632,7 +632,7 @@ namespace build
struct variable_pool: private variable_pool_base
{
const variable&
- find (string name, const build::value_type* t = nullptr, char p = '\0')
+ find (string name, const build2::value_type* t = nullptr, char p = '\0')
{
return find (name, nullptr, t, p);
}
@@ -640,7 +640,7 @@ namespace build
const variable&
find (string name,
variable_visibility v,
- const build::value_type* t = nullptr,
+ const build2::value_type* t = nullptr,
char p = '\0')
{
return find (name, &v, t, p);
@@ -652,7 +652,7 @@ namespace build
const variable&
find (string name,
const variable_visibility* vv,
- const build::value_type* t,
+ const build2::value_type* t,
char p)
{
auto r (
@@ -716,7 +716,7 @@ namespace build
// First access after being assigned a type?
//
if (r != nullptr && var.type != nullptr && r->type != var.type)
- build::assign (const_cast<value&> (*r), var.type, var);
+ build2::assign (const_cast<value&> (*r), var.type, var);
return r;
}
@@ -730,7 +730,7 @@ namespace build
// First access after being assigned a type?
//
if (r != nullptr && var.type != nullptr && r->type != var.type)
- build::assign (*r, var.type, var);
+ build2::assign (*r, var.type, var);
return r;
}
@@ -773,7 +773,7 @@ namespace build
// First access after being assigned a type?
//
if (!r.second && var.type != nullptr && v.type != var.type)
- build::assign (v, var.type, var);
+ build2::assign (v, var.type, var);
return std::make_pair (std::reference_wrapper<value> (v), r.second);
}
@@ -820,12 +820,12 @@ namespace build
struct variable_type_map: std::map<std::reference_wrapper<const target_type>,
variable_pattern_map>
{
- build::lookup<const value>
+ build2::lookup<const value>
lookup (const target_type&, const string& name, const variable&) const;
};
}
-#include <build/variable.ixx>
-#include <build/variable.txx>
+#include <build2/variable.ixx>
+#include <build2/variable.txx>
-#endif // BUILD_VARIABLE
+#endif // BUILD2_VARIABLE
diff --git a/build/variable.cxx b/build2/variable.cxx
index 6e02816..27555ba 100644
--- a/build/variable.cxx
+++ b/build2/variable.cxx
@@ -1,17 +1,17 @@
-// file : build/variable.cxx -*- C++ -*-
+// file : build2/variable.cxx -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#include <build/variable>
+#include <build2/variable>
#include <iterator> // make_move_iterator()
-#include <build/utility>
-#include <build/diagnostics>
+#include <build2/utility>
+#include <build2/diagnostics>
using namespace std;
-namespace build
+namespace build2
{
// value
//
@@ -389,7 +389,7 @@ namespace build
const string& name,
const variable& var) const
{
- using result = build::lookup<const value>;
+ using result = build2::lookup<const value>;
// Search across target type hierarchy.
//
diff --git a/build/variable.ixx b/build2/variable.ixx
index 16ea7c0..2933deb 100644
--- a/build/variable.ixx
+++ b/build2/variable.ixx
@@ -1,8 +1,8 @@
-// file : build/variable.ixx -*- C++ -*-
+// file : build2/variable.ixx -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-namespace build
+namespace build2
{
// value
//
@@ -375,7 +375,7 @@ namespace build
// First access after being assigned a type?
//
if (var.type != nullptr && val.type != var.type)
- build::assign (const_cast<value&> (val), var.type, var);
+ build2::assign (const_cast<value&> (val), var.type, var);
return r;
}
@@ -391,7 +391,7 @@ namespace build
// First access after being assigned a type?
//
if (var.type != nullptr && val.type != var.type)
- build::assign (const_cast<value&> (val), var.type, var);
+ build2::assign (const_cast<value&> (val), var.type, var);
return p;
}
diff --git a/build/variable.txx b/build2/variable.txx
index e661879..907072e 100644
--- a/build/variable.txx
+++ b/build2/variable.txx
@@ -1,12 +1,12 @@
-// file : build/variable.txx -*- C++ -*-
+// file : build2/variable.txx -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
#include <iterator> // make_move_iterator()
-#include <build/diagnostics>
+#include <build2/diagnostics>
-namespace build
+namespace build2
{
// vector<T> value
//
diff --git a/build/version b/build2/version
index 96a9274..3339078 100644
--- a/build/version
+++ b/build2/version
@@ -1,4 +1,4 @@
-// file : build/version -*- C++ -*-
+// file : build2/version -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
@@ -25,11 +25,6 @@
#define BUILD2_VERSION 10000
#define BUILD2_VERSION_STR "0.1.0"
-//@@ TMP
-//
-#define BUILD_VERSION BUILD2_VERSION
-#define BUILD_VERSION_STR BUILD2_VERSION_STR
-
// Generally, we expect minor versions to be source code backwards-
// compatible, thought we might have a minimum version requirement.
//
diff --git a/buildfile b/buildfile
index a672050..ccb6f57 100644
--- a/buildfile
+++ b/buildfile
@@ -2,7 +2,7 @@
# copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
-d = build/ tests/
+d = build2/ tests/
./: $d doc{INSTALL LICENSE version} file{bootstrap manifest}
include $d