summaryrefslogtreecommitdiff
path: root/intro2-tour.orig
blob: d1473a77b3a36ce612c768d6b76617b998e3b16d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
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