From 33728ad57de0799c32cad1dc3ce642e6b2476d79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Mon, 14 Dec 2015 18:45:36 +0100 Subject: Update user guide --- guide/ch01.html | 4 +++- guide/ch08.html | 12 +++++++++--- guide/index.html | 2 +- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/guide/ch01.html b/guide/ch01.html index 8815cd6..da70bee 100644 --- a/guide/ch01.html +++ b/guide/ch01.html @@ -64,7 +64,9 @@ post-installation setup:

C:\> C:\msys64\usr\bin\bash -
 C:\> C:\msys64\usr\bin\bash -lc "pacman --noconfirm -Syu"

1.2.3. 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

You can also run commands under the MSYS2 environment from +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.

1.2.4. Gotchas

While most of the basic functionality will just work, there are diff --git a/guide/ch08.html b/guide/ch08.html index 23f8429..756d96a 100644 --- a/guide/ch08.html +++ b/guide/ch08.html @@ -60,9 +60,15 @@ environment detection:

include env.mk
Erlang.mk comes with rules to build both shared libraries and executables, using the source files it finds in $(C_SRC_DIR).

By default, Erlang.mk will create a shared library. To change this and create an executable instead, put this in your Makefile -before including Erlang.mk:

C_SRC_TYPE = executable

The generated file will be saved to $(C_SRC_OUTPUT). It -defaults to $(CURDIR)/priv/$(PROJECT).so, the filename -adequately fitting a Unix shared library.

Erlang.mk sets appropriate compile and linker flags by default. +before including Erlang.mk:

C_SRC_TYPE = executable

The generated file name varies depending on the type of project +you have (shared library or executable) and on the platform you +build the project on.

For shared libraries, the generated file name will be +$(C_SRC_OUTPUT)$(C_SRC_SHARED_EXTENSION), with the default +being $(CURDIR)/priv/$(PROJECT) followed by the extension: +.dll on Windows, .so everywhere else.

For executables, the generated file name is +$(C_SRC_OUTPUT)$(C_SRC_EXECUTABLE_EXTENSION), with the same +default except for the extension: .exe on Windows, and otherwise +nothing.

Erlang.mk sets appropriate compile and linker flags by default. These flags vary depending on the platform, and can of course be overriden.

CC diff --git a/guide/index.html b/guide/index.html index 4f17e24..72ec45c 100644 --- a/guide/index.html +++ b/guide/index.html @@ -31,7 +31,7 @@ div.navfooter{margin-bottom:1em}
-

Erlang.mk User Guide

Loïc Hoguin


Table of Contents

1. Installation
1.1. On Unix
1.2. On Windows
2. Getting started
2.1. Creating a folder for your project
2.2. Downloading Erlang.mk
2.3. Getting started with OTP applications
2.4. Getting started with OTP libraries
2.5. Getting started with OTP releases
2.6. Using spaces instead of tabs
2.7. Using templates
2.8. Getting help
3. Overview
3.1. Building your project
3.2. Exploring the package index
3.3. Generating documentation
3.4. Running tests
3.5. Need more?
4. Updating Erlang.mk
4.1. Initial bootstrap
4.2. Updating
4.3. Customizing the build
5. Limitations
5.1. Erlang must be available
5.2. Spaces in path
5.3. Dependency tracking and modification times
I. Code
6. Building
6.1. How to build
6.2. What to build
6.3. Application resource file
6.4. Automatic application resource file values
6.5. File formats
6.6. Compilation options
6.7. Cold and hot builds
6.8. Dependency tracking
6.9. Generating Erlang source
6.10. Cleaning
7. Packages and dependencies
7.1. Searching packages
7.2. Adding dependencies to your project
7.3. How deps are fetched and built
7.4. Ignoring unwanted dependencies
7.5. Dependencies directory
7.6. Dependencies local to the repository
7.7. Repositories with no application at the root level
7.8. Autopatch
7.9. Skipping deps
8. NIFs and port drivers
8.1. C source code location and Erlang environment
8.2. Using a custom Makefile
8.3. Using Erlang.mk directly
9. Releases
9.1. Setup
9.2. Configuration
9.3. Generating the release
9.4. Running the release
10. Escripts
11. Compatibility with other build tools
11.1. Rebar projects as Erlang.mk dependencies
11.2. Erlang.mk projects as Rebar dependencies
II. Documentation
12. Asciidoc documentation
13. EDoc comments
III. Tests
14. Erlang shell
14.1. Configuration
14.2. Usage
15. EUnit
16. Common Test
17. Property based testing
18. Code coverage
19. Continuous integration
20. Dialyzer
20.1. How it works
20.2. Configuration
20.3. Usage
21. Xref
IV. Third-party plugins
22. External plugins
22.1. Loading all plugins from a dependency
22.2. Loading one plugin from a dependency
22.3. Writing external plugins
V. About Erlang.mk
23. Why Erlang.mk
23.1. Erlang.mk is fast
23.2. Erlang.mk gives you the full power of Unix
23.3. Erlang.mk is a text file
23.4. Erlang.mk can manage Erlang itself
23.5. Erlang.mk can do more than Erlang
23.6. Erlang.mk integrates nicely in Make and Automake projects
24. Short history
24.1. Before Erlang.mk
24.2. Lifetime of the project
25. Contributing
25.1. Priorities
25.2. Bugs
25.3. Code
25.4. Packages
25.5. Documentation
25.6. Feature requests
+

Erlang.mk User Guide

Loïc Hoguin


Table of Contents

1. Installation
1.1. On Unix
1.2. On Windows
2. Getting started
2.1. Creating a folder for your project
2.2. Downloading Erlang.mk
2.3. Getting started with OTP applications
2.4. Getting started with OTP libraries
2.5. Getting started with OTP releases
2.6. Using spaces instead of tabs
2.7. Using templates
2.8. Getting help
3. Overview
3.1. Building your project
3.2. Exploring the package index
3.3. Generating documentation
3.4. Running tests
3.5. Need more?
4. Updating Erlang.mk
4.1. Initial bootstrap
4.2. Updating
4.3. Customizing the build
5. Limitations
5.1. Erlang must be available
5.2. Spaces in path
5.3. Dependency tracking and modification times
I. Code
6. Building
6.1. How to build
6.2. What to build
6.3. Application resource file
6.4. Automatic application resource file values
6.5. File formats
6.6. Compilation options
6.7. Cold and hot builds
6.8. Dependency tracking
6.9. Generating Erlang source
6.10. Cleaning
7. Packages and dependencies
7.1. Searching packages
7.2. Adding dependencies to your project
7.3. How deps are fetched and built
7.4. Ignoring unwanted dependencies
7.5. Dependencies directory
7.6. Dependencies local to the repository
7.7. Repositories with no application at the root level
7.8. Autopatch
7.9. Skipping deps
8. NIFs and port drivers
8.1. C source code location and Erlang environment
8.2. Using a custom Makefile
8.3. Using Erlang.mk directly
9. Releases
9.1. Setup
9.2. Configuration
9.3. Generating the release
9.4. Running the release
10. Escripts
11. Compatibility with other build tools
11.1. Rebar projects as Erlang.mk dependencies
11.2. Erlang.mk projects as Rebar dependencies
II. Documentation
12. Asciidoc documentation
13. EDoc comments
III. Tests
14. Erlang shell
14.1. Configuration
14.2. Usage
15. EUnit
16. Common Test
17. Property based testing
18. Code coverage
19. Continuous integration
20. Dialyzer
20.1. How it works
20.2. Configuration
20.3. Usage
21. Xref
IV. Third-party plugins
22. External plugins
22.1. Loading all plugins from a dependency
22.2. Loading one plugin from a dependency
22.3. Writing external plugins
V. About Erlang.mk
23. Why Erlang.mk
23.1. Erlang.mk is fast
23.2. Erlang.mk gives you the full power of Unix
23.3. Erlang.mk is a text file
23.4. Erlang.mk can manage Erlang itself
23.5. Erlang.mk can do more than Erlang
23.6. Erlang.mk integrates nicely in Make and Automake projects
24. Short history
24.1. Before Erlang.mk
24.2. Lifetime of the project
25. Contributing
25.1. Priorities
25.2. Bugs
25.3. Code
25.4. Packages
25.5. Documentation
25.6. Feature requests
-- cgit v1.2.3