summaryrefslogtreecommitdiff
path: root/intro2-tour.orig
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-05-08 19:30:55 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-05-08 19:30:55 +0200
commitdc7f3cd85d61ca7af6a935c30b32d71026efdffe (patch)
treec6f4cee93b1fd68f47ae557b50f13e10f3ac320a /intro2-tour.orig
parent64c272dfc5a40082b2a8f488e99bf758223f8a8a (diff)
Add intro2 scripts
Diffstat (limited to 'intro2-tour.orig')
-rw-r--r--intro2-tour.orig431
1 files changed, 431 insertions, 0 deletions
diff --git a/intro2-tour.orig b/intro2-tour.orig
new file mode 100644
index 0000000..d1473a7
--- /dev/null
+++ b/intro2-tour.orig
@@ -0,0 +1,431 @@
+
++ bdep new -t exe -l c++ hello
+created new executable project hello in /tmp/hello/
+
++ tree hello
+hello
+├── build
+│   ├── bootstrap.build
+│   └── root.build
+├── buildfile
+├── hello
+│   ├── buildfile
+│   ├── hello.cxx
+│   └── testscript
+├── manifest
+└── repositories.manifest
+
+2 directories, 8 files
+
++ cd hello
+
++ cat hello/hello.cxx
+#include <iostream>
+
+using namespace std;
+
+int main (int argc, char* argv[])
+{
+ if (argc < 2)
+ {
+ cerr << "error: missing name" << endl;
+ return 1;
+ }
+
+ cout << "Hello, " << argv[1] << '!' << endl;
+}
+
++ cat hello/buildfile
+libs =
+#import libs += libhello%lib{hello}
+
+exe{hello}: {hxx ixx txx cxx}{*} $libs test{testscript}
+
+cxx.poptions =+ "-I$out_root" "-I$src_root"
+
++ cat hello/testscript
+: basics
+:
+$* 'World' >'Hello, World!'
+
+: missing-name
+:
+$* 2>>EOE != 0
+error: missing name
+EOE
+
++ cat manifest
+: 1
+name: hello
+version: 0.1.0-a.0.z
+summary: hello executable project
+license: proprietary
+url: https://example.org/hello
+email: you@example.org
+depends: * build2 >= 0.7.0-
+depends: * bpkg >= 0.7.0-
+#depends: libhello ^1.0.0
+
++ bdep init -C ../hello-gcc @gcc cc config.cxx=g++
+initializing project /tmp/hello/
+created configuration @gcc /tmp/hello-gcc/ (1, default, forwarded, auto-synchronized)
+synchronizing:
+ new hello/0.1.0-a.0.19700101000000
+
++ bdep init -C ../hello-clang @clang cc config.cxx=clang++-5.0
+initializing project /tmp/hello/
+created configuration @clang /tmp/hello-clang/ (2, auto-synchronized)
+synchronizing:
+ new hello/0.1.0-a.0.19700101000000
+
++ ls -d -1 ../hello ../hello1 ../hello1-gcc ../hello2 ../hello2-gcc ../hello-clang ../hello-gcc ../hello.git
+../hello
+../hello1
+../hello1-gcc
+../hello2
+../hello2-gcc
+../hello-clang
+../hello-gcc
+../hello.git
+
++ bdep init -C ../hello-vc-debug @debug cc config.cxx=cl-15 config.cc.coptions=/MDd /Z7 config.cc.loptions=/DEBUG
+initializing project /tmp/hello/
+created configuration @debug /tmp/hello-vc-debug/ (3, auto-synchronized)
+synchronizing:
+ new hello/0.1.0-a.0.19700101000000
+
++ bdep init -C ../hello-vc-release @release cc config.cxx=cl-15 config.cc.coptions=/O2
+initializing project /tmp/hello/
+created configuration @release /tmp/hello-vc-release/ (4, auto-synchronized)
+synchronizing:
+ new hello/0.1.0-a.0.19700101000000
+
++ bdep status
+hello configured 0.1.0-a.0.19700101000000
+
++ b
+mkdir ../hello-gcc/hello/fsdir{hello/}
+c++ hello/cxx{hello}@../hello-gcc/hello/hello/
+ld ../hello-gcc/hello/hello/exe{hello}
+ln ../hello-gcc/hello/hello/exe{hello} -> hello/
+
++ b test
+test hello/test{testscript}@../hello-gcc/hello/hello/ ../hello-gcc/hello/hello/exe{hello}
+
++ hello/hello World
+Hello, World!
+
++ bdep status @clang
+hello configured 0.1.0-a.0.19700101000000
+
++ b ../hello-clang/hello/
+mkdir ../hello-clang/hello/fsdir{hello/}
+c++ hello/cxx{hello}@../hello-clang/hello/hello/
+ld ../hello-clang/hello/hello/exe{hello}
+
++ b test: ../hello-clang/hello/
+test hello/test{testscript}@../hello-clang/hello/hello/ ../hello-clang/hello/hello/exe{hello}
+
++ ../hello-clang/hello/hello/hello World
+Hello, World!
+
++ bdep init -C ../hello-mingw @mingw cc config.cxx=x86_64-w64-mingw32-g++
+initializing project /tmp/hello/
+created configuration @mingw /tmp/hello-mingw/ (5, auto-synchronized)
+synchronizing:
+ new hello/0.1.0-a.0.19700101000000
+
++ b ../hello-mingw/hello/
+mkdir ../hello-mingw/hello/fsdir{hello/}
+c++ hello/cxx{hello}@../hello-mingw/hello/hello/
+ld ../hello-mingw/hello/hello/exe{hello}
+
++ b test: ../hello-mingw/hello/
+test hello/test{testscript}@../hello-mingw/hello/hello/ ../hello-mingw/hello/hello/exe{hello}
+
++ ../hello-mingw/hello/hello/hello.exe Windows
+Hello, Windows!
+
++ bdep new -C hello-gcc @gcc -t exe -l c++ hello cc config.cxx=g++
+created new executable project hello in /tmp/hello/
+created configuration @gcc /tmp/hello-gcc/ (1, default, forwarded, auto-synchronized)
+synchronizing:
+ new hello/0.1.0-a.0.19700101000000
+
++ bdep init -C ../hello-clang @clang cc config.cxx=clang++-5.0
+initializing project /tmp/hello/
+created configuration @clang /tmp/hello-clang/ (2, auto-synchronized)
+synchronizing:
+ new hello/0.1.0-a.0.19700101000000
+
++ bpkg rep-info https://git.build2.org/hello/libhello.git
+querying https://git.build2.org/hello/libhello.git
+fetching from https://git.build2.org/hello/libhello.git
+git:build2.org/hello/libhello https://git.build2.org/hello/libhello.git
+prerequisite git:build2.org/hello/libprint##HEAD https://git.build2.org/hello/libprint.git##HEAD
+prerequisite git:build2.org/hello/libformat##HEAD https://git.build2.org/hello/libformat.git##HEAD
+
+libhello/1.0.0
+libmhello/1.0.0
+libhello/1.1.0
+libmhello/1.1.0
+
++ bpkg rep-info https://git.build2.org/hello/libhello.git#HEAD
+querying https://git.build2.org/hello/libhello.git
+fetching from https://git.build2.org/hello/libhello.git
+git:build2.org/hello/libhello#HEAD https://git.build2.org/hello/libhello.git#HEAD
+prerequisite git:build2.org/hello/libprint##HEAD https://git.build2.org/hello/libprint.git##HEAD
+prerequisite git:build2.org/hello/libformat##HEAD https://git.build2.org/hello/libformat.git##HEAD
+
+libhello/1.1.0
+libmhello/1.1.0
+
++ bdep status
+fetching pkg:stage.build2.org (prerequisite of dir:/tmp/hello)
+warning: authenticity of the certificate for repository pkg:stage.build2.org cannot be established
+certificate is for **stage.build2.org, "Code Synthesis" <stage-admin@build2.org>
+certificate SHA256 fingerprint:
+37:CE:2C:A5:1D:CF:93:81:D7:07:46:AD:66:B3:C3:90:83:B8:96:9E:34:F0:E7:B3:A2:B0:6C:EF:66:A4:BE:65
+trust this certificate? [y/n] hello configured 0.1.0-a.0.19700101000000 available 0.1.0-a.0.19700101000000#1
+
++ bdep sync
+synchronizing:
+ new libhello/1.0.0 (required by hello)
+ upgrade hello/0.1.0-a.0.19700101000000#1
+
+ 0K ... 100% 95.5M=0s
++ b
+synchronizing /tmp/hello-gcc/:
+ upgrade hello/0.1.0-a.0.19700101000000#2
+mkdir ../hello-gcc/hello/fsdir{hello/}
+ver ../hello-gcc/libhello-1.0.0/libhello/version.hxx.in
+c++ ../hello-gcc/libhello-1.0.0/libhello/cxx{hello}
+c++ hello/cxx{hello}@../hello-gcc/hello/hello/
+ld ../hello-gcc/libhello-1.0.0/libhello/libs{hello}
+ld ../hello-gcc/hello/hello/exe{hello}
+ln ../hello-gcc/hello/hello/exe{hello} -> hello/
+
++ bdep status -ai
+in configuration @gcc:
+hello configured 0.1.0-a.0.19700101000000#2
+ libhello ^1.0.0 configured 1.0.0
+
+in configuration @clang:
+fetching pkg:stage.build2.org (prerequisite of dir:/tmp/hello)
+hello configured 0.1.0-a.0.19700101000000 available 0.1.0-a.0.19700101000000#1
+
++ bdep sync -a
+in configuration @gcc:
+
+in configuration @clang:
+synchronizing:
+ new libhello/1.0.0 (required by hello)
+ upgrade hello/0.1.0-a.0.19700101000000#1
+
+ 0K ... 100% 97.3M=0s
++ bdep status
+hello configured 0.1.0-a.0.19700101000000#2 available 0.1.0-a.0.19700101000000#3
+
++ bdep sync
+synchronizing:
+ drop libhello/1.0.0 (unused)
+ upgrade hello/0.1.0-a.0.19700101000000#3
+synchronizing:
+ new libhello/1.0.0 (required by hello)
+ upgrade hello/0.1.0-a.0.19700101000000#4
+
+ 0K ... 100% 89.0M=0s
++ bdep fetch
+fetching git:build2.org/hello/libhello (prerequisite of dir:/tmp/hello)
+querying https://git.build2.org/hello/libhello.git
+fetching from https://git.build2.org/hello/libhello.git
+fetching git:build2.org/hello/libformat##HEAD (prerequisite of git:build2.org/hello/libhello)
+querying https://git.build2.org/hello/libformat.git
+fetching from https://git.build2.org/hello/libformat.git
+fetching git:build2.org/hello/libprint##HEAD (prerequisite of git:build2.org/hello/libhello)
+querying https://git.build2.org/hello/libprint.git
+fetching from https://git.build2.org/hello/libprint.git
+fetching pkg:stage.build2.org (prerequisite of dir:/tmp/hello)
+
++ bdep status libhello
+libhello configured 1.0.0 available [1.1.0]
+
++ bdep sync libhello
+synchronizing:
+ new libformat/1.0.0 (required by libhello)
+ new libprint/1.0.0 (required by libhello)
+ upgrade libhello/1.1.0
+ reconfigure hello/0.1.0-a.0.19700101000000#4
+distributing libformat/1.0.0
+distributing libprint/1.0.0
+distributing libhello/1.1.0
+
++ bdep status -r
+hello configured 0.1.0-a.0.19700101000000#4
+ libhello ^1.0.0 configured 1.1.0
+ libformat ^1.0.0 configured 1.0.0
+ libprint ^1.0.0 configured 1.0.0
+
++ bdep status -o libhello
+libhello configured 1.1.0 available (1.1.0) [1.0.0]
+
++ bdep sync libhello/1.0.0
+synchronizing:
+ drop libprint/1.0.0 (unused)
+ drop libformat/1.0.0 (unused)
+ downgrade libhello/1.0.0
+ reconfigure hello/0.1.0-a.0.19700101000000#4
+distributing libhello/1.0.0
+[master (root-commit) 7183b8d] Start hello project
+ 11 files changed, 110 insertions(+)
+ create mode 100644 .gitignore
+ create mode 100644 build/.gitignore
+ create mode 100644 build/bootstrap.build
+ create mode 100644 build/root.build
+ create mode 100644 buildfile
+ create mode 100644 hello/.gitignore
+ create mode 100644 hello/buildfile
+ create mode 100644 hello/hello.cxx
+ create mode 100644 hello/testscript
+ create mode 100644 manifest
+ create mode 100644 repositories.manifest
+
++ bdep status
+hello configured 0.1.0-a.0.19700101000000#4 available 0.1.0-a.0.20180507065733.7183b8d4b235
+
++ b info
+project: hello
+version: 0.1.0-a.0.20180507065733.7183b8d4b235
+summary: hello executable project
+url: https://example.org/hello
+src_root: /tmp/hello/
+out_root: /tmp/hello-gcc/hello/
+amalgamation: ../
+subprojects:
+
++ bdep sync
+synchronizing:
+ upgrade hello/0.1.0-a.0.20180507065733.7183b8d4b235
+
++ bdep status
+hello configured 0.1.0-a.0.20180507065733.7183b8d4b235
+[master 9628993] Another commit
+ 1 file changed, 1 insertion(+)
+
++ bdep status
+hello configured 0.1.0-a.0.20180507065733.7183b8d4b235 available 0.1.0-a.0.20180507065734.9628993ae538
+
++ bpkg create -d tools cc config.cxx=g++ config.cc.coptions=-O3 config.install.root=/opt/tools config.install.sudo=sudo config.bin.rpath=/opt/tools/lib
+created new configuration in /tmp/tools/
+
++ cd tools
+
++ bpkg build hello@https://git.build2.org/hello/hello.git
+added git:build2.org/hello/hello
+fetching git:build2.org/hello/hello
+querying https://git.build2.org/hello/hello.git
+fetching from https://git.build2.org/hello/hello.git
+fetching git:build2.org/hello/libhello (prerequisite of git:build2.org/hello/hello)
+querying https://git.build2.org/hello/libhello.git
+fetching from https://git.build2.org/hello/libhello.git
+fetching git:build2.org/hello/libformat##HEAD (prerequisite of git:build2.org/hello/libhello)
+querying https://git.build2.org/hello/libformat.git
+fetching from https://git.build2.org/hello/libformat.git
+fetching git:build2.org/hello/libprint##HEAD (prerequisite of git:build2.org/hello/libhello)
+querying https://git.build2.org/hello/libprint.git
+fetching from https://git.build2.org/hello/libprint.git
+ new libformat/1.0.0 (required by libhello)
+ new libprint/1.0.0 (required by libhello)
+ new libhello/1.1.0 (required by hello)
+ new hello/1.0.0
+continue? [Y/n] distributing libformat/1.0.0
+checked out libformat/1.0.0
+configured libformat/1.0.0
+distributing libprint/1.0.0
+checked out libprint/1.0.0
+configured libprint/1.0.0
+distributing libhello/1.1.0
+checked out libhello/1.1.0
+configured libhello/1.1.0
+distributing hello/1.0.0
+checked out hello/1.0.0
+configured hello/1.0.0
+ver libhello-1.1.0/libhello/version.hxx.in
+ver libprint-1.0.0/libprint/version.hxx.in
+ver libformat-1.0.0/libformat/version.hxx.in
+c++ libprint-1.0.0/libprint/cxx{print}
+c++ libhello-1.1.0/libhello/cxx{hello}
+c++ libformat-1.0.0/libformat/cxx{format}
+c++ hello-1.0.0/hello/cxx{hello}
+ld libprint-1.0.0/libprint/libs{print}
+ld libformat-1.0.0/libformat/libs{format}
+ld libhello-1.1.0/libhello/libs{hello}
+ld hello-1.0.0/hello/exe{hello}
+updated hello/1.0.0
+
++ bpkg install hello
+ld libhello-1.1.0/libhello/libs{hello}
+ld hello-1.0.0/hello/exe{hello}
+install /opt/tools/
+install /opt/tools/include/
+install /opt/tools/include/libhello/
+install libhello-1.1.0/libhello/hxx{export}
+install libhello-1.1.0/libhello/hxx{hello}
+install libhello-1.1.0/libhello/hxx{version}
+install /opt/tools/include/libprint/
+install libprint-1.0.0/libprint/hxx{print}
+install libprint-1.0.0/libprint/hxx{export}
+install libprint-1.0.0/libprint/hxx{version}
+install libprint-1.0.0/libprint/libs{print}
+install /opt/tools/include/libformat/
+install libformat-1.0.0/libformat/hxx{export}
+install libformat-1.0.0/libformat/hxx{format}
+install libformat-1.0.0/libformat/hxx{version}
+install libformat-1.0.0/libformat/libs{format}
+install libhello-1.1.0/libhello/libs{hello}
+install /opt/tools/bin/
+install hello-1.0.0/hello/exe{hello}
+installed hello/1.0.0
+
++ /opt/tools/bin/hello World
+Hello, World!
+
++ bpkg uninstall hello
+uninstall hello-1.0.0/hello/exe{hello}
+uninstall /opt/tools/bin/
+uninstall libhello-1.1.0/libhello/libs{hello}
+uninstall libformat-1.0.0/libformat/libs{format}
+uninstall libformat-1.0.0/libformat/hxx{version}
+uninstall libformat-1.0.0/libformat/hxx{format}
+uninstall libformat-1.0.0/libformat/hxx{export}
+uninstall /opt/tools/include/libformat/
+uninstall libprint-1.0.0/libprint/libs{print}
+uninstall libprint-1.0.0/libprint/hxx{version}
+uninstall libprint-1.0.0/libprint/hxx{export}
+uninstall libprint-1.0.0/libprint/hxx{print}
+uninstall /opt/tools/include/libprint/
+uninstall libhello-1.1.0/libhello/hxx{version}
+uninstall libhello-1.1.0/libhello/hxx{hello}
+uninstall libhello-1.1.0/libhello/hxx{export}
+uninstall /opt/tools/include/libhello/
+uninstall /opt/tools/include/
+uninstall /opt/tools/
+uninstalled hello/1.0.0
+
++ bpkg drop hello
+following dependencies were automatically built but will no longer be used:
+ libhello
+ libformat
+ libprint
+drop unused packages? [Y/n] drop hello
+ drop libhello
+ drop libformat
+ drop libprint
+continue? [Y/n] disfigured hello
+disfigured libhello
+disfigured libformat
+disfigured libprint
+purged hello
+purged libhello
+purged libformat
+purged libprint