summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-05-04 14:42:58 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-05-04 14:46:36 +0200
commite541a7f334971f913b1033d9e8f4f75f1de02703 (patch)
treec609304002b77001fd356b02e94b6c75a2d178f0
parente9802dbaedcbde98232a46abac22349cb5909ca8 (diff)
Regenerate hello using bdep-new
-rw-r--r--hello/.gitignore9
-rw-r--r--hello/build/.gitignore2
-rw-r--r--hello/build/bootstrap.build2
-rw-r--r--hello/build/root.build7
-rw-r--r--hello/buildfile16
-rw-r--r--hello/hello.cxx22
-rw-r--r--hello/hello/.gitignore5
-rw-r--r--hello/hello/buildfile5
-rw-r--r--hello/hello/hello.cxx16
-rw-r--r--hello/hello/testscript9
-rw-r--r--hello/manifest3
-rw-r--r--hello/test.out2
-rw-r--r--repositories.manifest6
13 files changed, 57 insertions, 47 deletions
diff --git a/hello/.gitignore b/hello/.gitignore
index 1113df3..c3de2e7 100644
--- a/hello/.gitignore
+++ b/hello/.gitignore
@@ -1,6 +1,10 @@
+.bdep/
+
# Compiler/linker output.
#
*.d
+*.t
+*.i
*.ii
*.o
*.obj
@@ -9,10 +13,9 @@
*.a
*.lib
*.exp
+*.pdb
+*.ilk
*.exe
*.exe.dlls/
*.exe.manifest
*.pc
-
-hello
-version
diff --git a/hello/build/.gitignore b/hello/build/.gitignore
index 225c27f..4a730a3 100644
--- a/hello/build/.gitignore
+++ b/hello/build/.gitignore
@@ -1 +1,3 @@
config.build
+root/
+bootstrap/
diff --git a/hello/build/bootstrap.build b/hello/build/bootstrap.build
index 5990cab..3268a30 100644
--- a/hello/build/bootstrap.build
+++ b/hello/build/bootstrap.build
@@ -2,6 +2,6 @@ project = hello
using version
using config
-using dist
using test
+using dist
using install
diff --git a/hello/build/root.build b/hello/build/root.build
index 7c65dab..9c83a8a 100644
--- a/hello/build/root.build
+++ b/hello/build/root.build
@@ -1,9 +1,12 @@
-cxx.std = 11
+cxx.std = latest
using cxx
+hxx{*}: extension = hxx
+ixx{*}: extension = ixx
+txx{*}: extension = txx
cxx{*}: extension = cxx
-# Specify the test target for cross-testing.
+# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target
diff --git a/hello/buildfile b/hello/buildfile
index c5f21a5..8b7417f 100644
--- a/hello/buildfile
+++ b/hello/buildfile
@@ -1,15 +1 @@
-import libs = libhello%lib{hello}
-
-./: exe{hello} doc{version} file{manifest}
-
-# The version file is auto-generated (by the version module) from manifest.
-# Include it in distribution and don't remove when cleaning in src (so that
-# clean results in a state identical to distributed).
-#
-doc{version}: file{manifest}
-doc{version}: dist = true
-doc{version}: clean = ($src_root != $out_root)
-
-exe{hello}: cxx{hello} $libs
-exe{hello}: file{test.out}: test.stdout = true
-exe{hello}: test.arguments = World "Planet #345732"
+./: {*/ -build/} file{manifest}
diff --git a/hello/hello.cxx b/hello/hello.cxx
deleted file mode 100644
index 728af76..0000000
--- a/hello/hello.cxx
+++ /dev/null
@@ -1,22 +0,0 @@
-// file: hello.cxx -*- C++ -*-
-
-#include <iostream>
-
-#include <libhello/hello.hxx>
-
-using namespace std;
-
-int
-main (int argc, char* argv[])
-{
- if (argc < 2)
- {
- cerr << "usage: hello <name>..." << endl;
- return 1;
- }
-
- using hello::say;
-
- for (int i (1); i != argc; ++i)
- say (argv[i]);
-}
diff --git a/hello/hello/.gitignore b/hello/hello/.gitignore
new file mode 100644
index 0000000..c1648ba
--- /dev/null
+++ b/hello/hello/.gitignore
@@ -0,0 +1,5 @@
+hello
+
+# Testscript output directory (can be symlink).
+#
+test-hello
diff --git a/hello/hello/buildfile b/hello/hello/buildfile
new file mode 100644
index 0000000..4a510b0
--- /dev/null
+++ b/hello/hello/buildfile
@@ -0,0 +1,5 @@
+import libs = libhello%lib{hello}
+
+exe{hello}: {hxx ixx txx cxx}{*} $libs test{testscript}
+
+cxx.poptions =+ "-I$out_root" "-I$src_root"
diff --git a/hello/hello/hello.cxx b/hello/hello/hello.cxx
new file mode 100644
index 0000000..0c63c7b
--- /dev/null
+++ b/hello/hello/hello.cxx
@@ -0,0 +1,16 @@
+#include <iostream>
+
+#include <libhello/hello.hxx>
+
+using namespace std;
+
+int main (int argc, char* argv[])
+{
+ if (argc < 2)
+ {
+ cerr << "error: missing name" << endl;
+ return 1;
+ }
+
+ hello::say_hello (cout, argv[1]);
+}
diff --git a/hello/hello/testscript b/hello/hello/testscript
new file mode 100644
index 0000000..cefda39
--- /dev/null
+++ b/hello/hello/testscript
@@ -0,0 +1,9 @@
+: basics
+:
+$* 'World' >'Hello, World!'
+
+: missing-name
+:
+$* 2>>EOE != 0
+error: missing name
+EOE
diff --git a/hello/manifest b/hello/manifest
index 748eb37..182cc36 100644
--- a/hello/manifest
+++ b/hello/manifest
@@ -13,7 +13,6 @@ url: http://www.example.org/hello
src-url: https://git.build2.org/cgit/hello/hello/tree/hello
email: hello-users@example.org
build-email: builds@build2.org
-requires: c++11
depends: * build2 >= 0.7.0-
depends: * bpkg >= 0.7.0-
-depends: libhello [1.0.0 2.0.0-); compatible with libhello-1.X.Y
+depends: libhello [1.0.0 2.0.0-); @@ TMP ^1.0.0
diff --git a/hello/test.out b/hello/test.out
deleted file mode 100644
index 275233c..0000000
--- a/hello/test.out
+++ /dev/null
@@ -1,2 +0,0 @@
-Hello, World!
-Hello, Planet #345732!
diff --git a/repositories.manifest b/repositories.manifest
new file mode 100644
index 0000000..cadceb4
--- /dev/null
+++ b/repositories.manifest
@@ -0,0 +1,6 @@
+: 1
+summary: hello project repository
+
+:
+role: prerequisite
+location: https://git.build2.org/hello/libhello.git