From 4d18b3968b7b18b7da63da5a35733df638c744c0 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 9 May 2018 15:13:05 +0200 Subject: Add commands for Unpackaged Dependencies section to intro2-tour --- intro2-tour | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'intro2-tour') diff --git a/intro2-tour b/intro2-tour index d9ef011..2a2c8bc 100755 --- a/intro2-tour +++ b/intro2-tour @@ -163,6 +163,36 @@ show bdep status -r show bdep status -o libhello show bdep sync libhello/1.0.0 +# Unpackaged Dependencies. +# +cd .. +rm -rf libextra libextra-gcc unpkg-gcc hello-gcc-1 +show bdep new -C libextra-gcc -t lib -l c++ libextra cc config.cxx=$gcc +show b install: libextra/ config.install.root=/tmp/unpkg-gcc +show tree unpkg-gcc +cd hello + +show bdep init -C ../hello-gcc-1 @gcc1 cc config.cxx=$gcc \ +config.cc.poptions=-I$tmp/unpkg-gcc/include \ +config.cc.loptions=-L$tmp/unpkg-gcc/lib + +sed -i -re 's/^libs =/import libs = libextra%lib{extra}/' hello/buildfile +cat <>hello/hello.cxx +#include + +void f () +{ + extra::say_hello (cout, "Extra"); +} +EOF + +show b test: ../hello-gcc-1/ + +show b configure: ../hello-gcc/ \ +config.cc.poptions+=-I$tmp/unpkg-gcc/include \ +config.cc.loptions+=-L$tmp/unpkg-gcc/lib +show b test + # Versioning and Release Management. # git add . -- cgit v1.1