From b5d4cb91f80c833795a2d87050c3674bb7aecdc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Tue, 3 Oct 2017 13:39:41 +0200 Subject: Update Hugo, docs --- docs/en/erlang.mk/1/guide/installation/index.html | 353 +++++++++++----------- 1 file changed, 178 insertions(+), 175 deletions(-) (limited to 'docs/en/erlang.mk/1/guide/installation/index.html') diff --git a/docs/en/erlang.mk/1/guide/installation/index.html b/docs/en/erlang.mk/1/guide/installation/index.html index c909fec1..806b25e8 100644 --- a/docs/en/erlang.mk/1/guide/installation/index.html +++ b/docs/en/erlang.mk/1/guide/installation/index.html @@ -7,7 +7,7 @@ - + Nine Nines: Installation @@ -67,186 +67,189 @@

Installation

-
-

On Unix

-
-

Erlang.mk requires GNU Make to be installed. While it will -currently work with GNU Make 3.81, support for this version -is deprecated and will be removed in 2017. We recommend -GNU Make 4.1 or later.

-

Git and Erlang/OTP must also be installed.

-

Some functionality requires that Autoconf 2.59 or later be -installed, in order to compile Erlang/OTP. Erlang/OTP may -have further requirements depending on your needs.

-

Some packages may require additional libraries.

-
-

Linux

-

The commands to install packages vary between distributions:

-
-
Arch Linux
-
-
$ pacman -S erlang git make
-
-
-

FreeBSD

-

FreeBSD comes with binary and source packages:

-
-
Install binary packages
-
-
$ pkg install erlang git gmake
-

On FreeBSD the make command is BSD Make. Use gmake instead.

-
-
-

OS X and macOS

-

While Apple distributes their own GNU Make, their version is -very old and plagued with numerous bugs. It is recommended -to install a more recent version from either Homebrew or -MacPorts:

-
-
Homebrew
-
-
$ brew install erlang git homebrew/dupes/make
-

Homebrew installs GNU Make as gmake. The make command -is the one provided by Apple.

-
-
MacPorts
-
-
$ sudo port install erlang git gmake
-
-
-
-
-

On Windows

-
-

Erlang.mk can be used on Windows inside an MSYS2 environment. -Cygwin, MSYS (the original) and native Windows (both Batch -and PowerShell) are currently not supported.

-
- - - -
-
Note
-
Erlang.mk expects Unix line breaks in most of the files -(LF instead of CRLF). Make sure to configure your text editor -adequately.
-
-

The rest of this section details how to setup Erlang/OTP and -MSYS2 in order to use Erlang.mk.

-
-

Installing Erlang/OTP

-

Erlang.mk requires Erlang/OTP to be installed. The OTP team -provides binaries of Erlang/OTP for all major and minor releases, -available from the official download page. -It is recommended that you use the 64-bit installer unless -technically impossible. Please follow the instructions from -the installer to complete the installation.

-

The OTP team also provides a short guide to -installing Erlang/OTP on Windows -if you need additional references.

-

You can install Erlang/OTP silently using the /S switch -on the command line:

-
-
-
C:\Users\essen\Downloads> otp_win64_18.0.exe /S
-
-
-
-

Installing MSYS2

-

The only supported environment on Windows is MSYS2. MSYS2 is -a lightweight Unix-like environment for Windows that comes -with the Arch Linux package manager, pacman.

-

The MSYS2 project provides a one click installer -and instructions to set things up post-installation.

-

It is currently not possible to use the installer silently. -Thankfully, the MSYS2 project provides an archive that can -be used in lieu of the installer. The archive however requires -7zip to decompress it.

-

First, download the -MSYS2 base archive -and extract it under C:\. Assuming you downloaded the -archive as msys2.tar.xz and put it in C:\, you can -use the following commands to extract it:

-
-
-
C:\> 7z x msys2.tar.xz
-C:\> 7z x msys2.tar > NUL
-
-

Then you can run the two commands needed to perform the -post-installation setup:

-
-
-
C:\> C:\msys64\usr\bin\bash -lc "pacman --needed --noconfirm -Sy bash pacman pacman-mirrors msys2-runtime"
-C:\> C:\msys64\usr\bin\bash -lc "pacman --noconfirm -Syu"
-
-
-
-

Installing the required MSYS2 packages

-

After following these instructions, you can install GNU Make, -Git and any other required softwares. From an MSYS2 shell, -you can call pacman directly:

-
-
-
$ pacman -S git make
-

You can use pacman -Ss to search packages. For example, -to find all packages related to GCC:

-
-
-
$ pacman -Ss gcc
-

If you are going to compile C/C++ code, you will need to -install this package, as Erlang.mk cannot use the normal -"gcc" package:

-
-
-
$ pacman -S mingw-w64-x86_64-gcc
-

You can also run commands under the MSYS2 environment from -the Windows command line or batch files. This command will -install GNU Make and Git:

-
-
-
C:\> C:\msys64\usr\bin\bash -lc "pacman --noconfirm -S git make"
-
-

You can use similar bash commands if you need to run programs -inside the MSYS2 environment from a batch file.

-
-
-

Gotchas

-

While most of the basic functionality will just work, there are -still some issues. Erlang.mk needs to be fixed to pass the -right paths when running Erlang scripts. We are working on it. -Erlang.mk is fully tested on both Linux and Windows, but is -lacking tests in the areas not yet covered by this guide, -so expect bugs to be fixed as more tests are added.

-
-
-
+
+

On Unix

+
+

Erlang.mk requires GNU Make to be installed. While it will +currently work with GNU Make 3.81, support for this version +is deprecated and will be removed in 2017. We recommend +GNU Make 4.1 or later.

+

Git and Erlang/OTP must also be installed.

+

Some functionality requires that Autoconf 2.59 or later be +installed, in order to compile Erlang/OTP. Erlang/OTP may +have further requirements depending on your needs.

+

Some packages may require additional libraries.

+
+

Linux

+

The commands to install packages vary between distributions:

+
+
Arch Linux
+
+
$ pacman -S erlang git make
+
+
+

FreeBSD

+

FreeBSD comes with binary and source packages:

+
+
Install binary packages
+
+
$ pkg install erlang git gmake
+

On FreeBSD the make command is BSD Make. Use gmake instead.

+
+
+

OS X and macOS

+

While Apple distributes their own GNU Make, their version is +very old and plagued with numerous bugs. It is recommended +to install a more recent version from either Homebrew or +MacPorts:

+
+
Homebrew
+
+
$ brew install erlang git homebrew/dupes/make
+

Homebrew installs GNU Make as gmake. The make command +is the one provided by Apple.

+
+
MacPorts
+
+
$ sudo port install erlang git gmake
+
+
+
+
+

On Windows

+
+

Erlang.mk can be used on Windows inside an MSYS2 environment. +Cygwin, MSYS (the original) and native Windows (both Batch +and PowerShell) are currently not supported.

+
+ + + +
+
Note
+
Erlang.mk expects Unix line breaks in most of the files +(LF instead of CRLF). Make sure to configure your text editor +adequately.
+
+

The rest of this section details how to setup Erlang/OTP and +MSYS2 in order to use Erlang.mk.

+
+

Installing Erlang/OTP

+

Erlang.mk requires Erlang/OTP to be installed. The OTP team +provides binaries of Erlang/OTP for all major and minor releases, +available from the official download page. +It is recommended that you use the 64-bit installer unless +technically impossible. Please follow the instructions from +the installer to complete the installation.

+

The OTP team also provides a short guide to +installing Erlang/OTP on Windows +if you need additional references.

+

You can install Erlang/OTP silently using the /S switch +on the command line:

+
+
+
C:\Users\essen\Downloads> otp_win64_18.0.exe /S
+
+
+
+

Installing MSYS2

+

The only supported environment on Windows is MSYS2. MSYS2 is +a lightweight Unix-like environment for Windows that comes +with the Arch Linux package manager, pacman.

+

The MSYS2 project provides a one click installer +and instructions to set things up post-installation.

+

It is currently not possible to use the installer silently. +Thankfully, the MSYS2 project provides an archive that can +be used in lieu of the installer. The archive however requires +7zip to decompress it.

+

First, download the +MSYS2 base archive +and extract it under C:\. Assuming you downloaded the +archive as msys2.tar.xz and put it in C:\, you can +use the following commands to extract it:

+
+
+
C:\> 7z x msys2.tar.xz
+C:\> 7z x msys2.tar > NUL
+
+

Then you can run the two commands needed to perform the +post-installation setup:

+
+
+
C:\> C:\msys64\usr\bin\bash -lc "pacman --needed --noconfirm -Sy bash pacman pacman-mirrors msys2-runtime"
+C:\> C:\msys64\usr\bin\bash -lc "pacman --noconfirm -Syu"
+
+
+
+

Installing the required MSYS2 packages

+

After following these instructions, you can install GNU Make, +Git and any other required softwares. From an MSYS2 shell, +you can call pacman directly:

+
+
+
$ pacman -S git make
+

You can use pacman -Ss to search packages. For example, +to find all packages related to GCC:

+
+
+
$ pacman -Ss gcc
+

If you are going to compile C/C++ code, you will need to +install this package, as Erlang.mk cannot use the normal +"gcc" package:

+
+
+
$ pacman -S mingw-w64-x86_64-gcc
+

You can also run commands under the MSYS2 environment from +the Windows command line or batch files. This command will +install GNU Make and Git:

+
+
+
C:\> C:\msys64\usr\bin\bash -lc "pacman --noconfirm -S git make"
+
+

You can use similar bash commands if you need to run programs +inside the MSYS2 environment from a batch file.

+
+
+

Gotchas

+

While most of the basic functionality will just work, there are +still some issues. Erlang.mk needs to be fixed to pass the +right paths when running Erlang scripts. We are working on it. +Erlang.mk is fully tested on both Linux and Windows, but is +lacking tests in the areas not yet covered by this guide, +so expect bugs to be fixed as more tests are added.

+
+
+
+ + +