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. Getting started from scratch
2.7. Using spaces instead of tabs
2.8. Using templates
2.9. Hiding Erlang.mk from git
2.10. 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. Fetching and listing dependencies only
7.5. Querying dependencies
7.6. Ignoring unwanted dependencies
7.7. Dependencies directory
7.8. Many applications in one repository
7.9. Repositories with no application at the root level
7.10. Autopatch
7.11. Dealing with duplicate modules
7.12. 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
8.4. Propagating compile and linker flags to sub-Makefiles
9. Releases
9.1. Setup
9.2. Configuration
9.3. Generating the release
9.4. Running the release
9.5. Upgrading a release
9.6. Getting Relx semver value
10. Self-extracting releases
10.1. Generating the self-extracting archive
10.2. Running the release
11. Escripts
11.1. Requirements
11.2. Generating an escript
11.3. Configuration
11.4. Extra files
11.5. Optimizing for size
12. OTP version management
12.1. Erlang versions
12.2. OTP version pinning
12.3. Continuous integration
12.4. Configuring Kerl
13. Cross compiling
13.1. Compiling
13.2. Building the release
14. Compatibility with other build tools
14.1. Rebar projects as Erlang.mk dependencies
14.2. Erlang.mk projects as Rebar dependencies
15. Elixir modules and dependencies
15.1. Selecting Elixir
15.2. Elixir compilation
15.3. Elixir dependencies
15.4. Dialyzer
II. Documentation
16. AsciiDoc documentation
16.1. Requirements
16.2. Writing AsciiDoc documentation
16.3. Configuration
16.4. Usage
17. EDoc comments
17.1. Writing EDoc comments
17.2. Configuration
17.3. Usage
17.4. Running EDoc on all applications
18. Sphinx documentation
18.1. Writing Sphinx documentation
18.2. Basic setup
18.3. Erlang.mk configuration
18.4. Generating man pages
III. Tests
19. Erlang shell
19.1. Configuration
19.2. Usage
20. EUnit
20.1. Writing tests
20.2. Configuration
20.3. Usage
21. Common Test
21.1. Writing tests
21.2. Configuration
21.3. Usage
22. PropEr
23. Triq
24. Code coverage
24.1. Enabling cover when running tests
24.2. Adding applications to the cover report
24.3. Removing modules from the cover report
24.4. Configuring paths
24.5. Merging coverdata files
25. Continuous integration
25.1. Configuring Erlang/OTP versions to test
25.2. Running tests across all configured versions
25.3. Extending the CI targets
26. Dialyzer
26.1. How it works
26.2. Configuration
26.3. Usage
26.4. Dialyzing beam files
27. Concuerror
27.1. Configuration
27.2. Writing tests
27.3. Usage
28. Xref
28.1. Usage
28.2. Queries
28.3. Analysis scope
28.4. Ignoring warnings
IV. Third-party plugins
29. External plugins
29.1. Loading all plugins from a dependency
29.2. Loading one plugin from a dependency
29.3. Writing external plugins
29.4. Early-stage plugins
29.5. Loading plugins local to the application
29.6. Adding templates via plugins
30. List of plugins
30.1. ci.erlang.mk
30.2. efene.mk
30.3. elixir.mk
30.4. elvis.mk
30.5. esh.mk
30.6. geas
30.7. hexer.mk
30.8. hexpm.mk
30.9. jorel
30.10. lfe.mk
30.11. mix.mk
30.12. reload.mk
30.13. rust.mk
30.14. version.mk
V. About Erlang.mk
31. Why Erlang.mk
31.1. Erlang.mk is fast
31.2. Erlang.mk gives you the full power of Unix
31.3. Erlang.mk is a text file
31.4. Erlang.mk can manage Erlang itself
31.5. Erlang.mk can do more than Erlang
31.6. Erlang.mk integrates nicely in Make and Automake projects
32. Short history
32.1. Before Erlang.mk
32.2. Lifetime of the project
33. Contributing
33.1. Priorities
33.2. Bugs
33.3. Code
33.4. Packages
33.5. Documentation
33.6. Feature requests