aboutsummaryrefslogtreecommitdiff
path: root/BOOTSTRAP-UNIX.cli
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-09-03 17:27:33 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-09-03 17:27:33 +0200
commit879d7e92d823c9dfe6fb3691541f30b662f2a510 (patch)
tree7b4705029c81f2b5decc16cc63cfc1a88e5c7ff3 /BOOTSTRAP-UNIX.cli
parent8622308eefe9a1d63bb4128548260d0ba3d50d7a (diff)
First take on new installation and upgrade instructions
Diffstat (limited to 'BOOTSTRAP-UNIX.cli')
-rw-r--r--BOOTSTRAP-UNIX.cli80
1 files changed, 80 insertions, 0 deletions
diff --git a/BOOTSTRAP-UNIX.cli b/BOOTSTRAP-UNIX.cli
new file mode 100644
index 0000000..864db7d
--- /dev/null
+++ b/BOOTSTRAP-UNIX.cli
@@ -0,0 +1,80 @@
+// file : BOOTSTRAP-UNIX.cli
+// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd
+// license : MIT; see accompanying LICENSE file
+
+"
+The following instructions are for bootstrapping \c{build2} on UNIX-like
+operating systems (GNU/Linux, FreeBSD, etc). For Mac OS X first see
+\l{#BOOTSTRAP-MACOSX Bootstrapping on Mac OS X}. These instructions should
+also be used for UNIX emulation layers on Windows (for example, MSYS2 or
+Cygwin) where you already have a UNIX shell with standard utilitis.
+
+\dl|
+
+\li|1. Create Build Directory\n
+
+Note that you will want to keep this directory around in order to upgrade to
+new toolchain versions in the future. In this guide we will use
+\c{~/build2-build/} as the build directory and \c{/usr/local/} as the
+installation directory but you can use other paths.
+
+\
+$ cd
+$ mkdir build2-build
+$ cd build2-build
+\
+
+|
+
+\li|\n2. Download, Verify, and Unpack\n
+
+Download \c{build2-toolchain-X.Y.Z.tar.xz} (or its \c{.tar.gz} variant if you
+don't have \cb{xz(1)}) as well as its \c{.sha256} checksum from
+\l{https://download.build2.org}, into \c{~/build2-build/} (build directory).
+
+Verify the archive checksum matches:
+
+\
+# Linux, MSYS, Cygwin:
+#
+$ sha256sum -c build2-toolchain-X.Y.Z.tar.xz.sha256
+
+# Mac OS X:
+#
+$ shasum -a 256 -c build2-toolchain-X.Y.Z.tar.xz.sha256
+
+# FreeBSD:
+#
+$ sha256 -r build2-toolchain-X.Y.Z.tar.xz
+$ cat build2-toolchain-X.Y.Z.tar.xz.sha256
+\
+
+Unpack the archive and change to its directory:
+
+\
+> tar xf build2-toolchain-X.Y.Z.tar.xz
+> cd build2-toolchain-X.Y.Z
+\
+
+||
+
+Next you can either perform the rest of the steps manually or, if you are
+happy with using the defaults, run the \c{build.sh} shell script. It performs
+(and echoes) the same set of steps as outline below but only allows you to
+customization the compiler and installation directory (run \c{build.sh -h} for
+usage) and you can also specify an alternative package repository with the
+\c{BUILD2_REPO} environment variable.
+
+For example, this command will use \c{g++-5} and install the toolchain into
+\c{/usr/local/}.
+
+\
+$ build.sh g++-5
+\
+
+While this will use Clang and install into \c{/opt/build2}:
+
+\
+$ build.sh --install-dir /opt/build2 --sudo sudo clang++
+\
+"