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. Cheat sheet
4.1. General commands
4.2. Running tests
4.3. Shell
4.4. Cleaning
4.5. Bootstrap and templates
4.6. Packages
4.7. Dependency lock
4.8. Dependency tree
4.9. Help and updating
4.10. Running a release
5. Updating Erlang.mk
5.1. Initial bootstrap
5.2. Updating
5.3. Customizing the build
6. Limitations
6.1. Erlang must be available
6.2. Spaces in path
6.3. Dependency tracking and modification times
I. Code
7. Building
7.1. How to build
7.2. What to build
7.3. Application resource file
7.4. Automatic application resource file values
7.5. File formats
7.6. Compilation options
7.7. Cold and hot builds
7.8. Dependency tracking
7.9. Generating Erlang source
7.10. Cleaning
8. Packages and dependencies
8.1. Adding dependencies to your project
8.2. Built-in package index
8.3. How deps are fetched and built
8.4. Fetching and listing dependencies only
8.5. Dependency lock
8.6. Querying dependencies
8.7. Dependency tree
8.8. Ignoring unwanted dependencies
8.9. Dependencies directory
8.10. Many applications in one repository
8.11. Repositories with no application at the root level
8.12. Autopatch
8.13. Dealing with duplicate modules
8.14. Skipping deps
9. Publishing to Hex
9.1. API key
9.2. Package metadata
9.3. Package contents
9.4. Publishing a release
9.5. Retiring a release
9.6. Creating the package tarball
9.7. Documentation
9.8. Another Hex API
10. ErlyDTL templates
10.1. Module name
10.2. Compiler options
10.3. Includes and extends
11. NIFs and port drivers
11.1. Generating a NIF skeleton
11.2. C source code location and Erlang environment
11.3. Using a custom Makefile
11.4. Using Erlang.mk directly
11.5. Propagating compile and linker flags to sub-Makefiles
12. Releases
12.1. Requirement
12.2. Setup
12.3. Configuration
12.4. Generating the release
12.5. Running the release
12.6. Upgrading a release
13. Self-extracting releases
13.1. Generating the self-extracting archive
13.2. Running the release
14. Escripts
14.1. Requirements
14.2. Generating an escript
14.3. Configuration
14.4. Extra files
14.5. Optimizing for size
15. OTP version management
15.1. Erlang versions
15.2. OTP version pinning
15.3. Continuous integration
15.4. Configuring Kerl
16. Cross compiling
16.1. Compiling
16.2. Building the release
17. Compatibility with other build tools
17.1. Rebar projects as Erlang.mk dependencies
17.2. Erlang.mk projects as Rebar dependencies
18. Elixir modules and dependencies
18.1. Selecting Elixir
18.2. Elixir compilation
18.3. Elixir dependencies
18.4. Dialyzer
II. Documentation
19. AsciiDoc documentation
19.1. Requirements
19.2. Writing AsciiDoc documentation
19.3. Configuration
19.4. Usage
20. EDoc comments
20.1. Writing EDoc comments
20.2. Configuration
20.3. Usage
20.4. Running EDoc on all applications
21. Sphinx documentation
21.1. Writing Sphinx documentation
21.2. Basic setup
21.3. Erlang.mk configuration
21.4. Generating man pages
III. Tests
22. Erlang shell
22.1. Configuration
22.2. Usage
23. EUnit
23.1. Writing tests
23.2. Configuration
23.3. Usage
24. Common Test
24.1. Writing tests
24.2. Configuration
24.3. Usage
25. PropEr
26. Triq
27. Code coverage
27.1. Enabling cover when running tests
27.2. Adding applications to the cover report
27.3. Removing modules from the cover report
27.4. Configuring paths
27.5. Merging coverdata files
28. Continuous integration
28.1. Configuring Erlang/OTP versions to test
28.2. Running tests across all configured versions
28.3. Extending the CI targets
29. Dialyzer
29.1. How it works
29.2. Configuration
29.3. Usage
29.4. Dialyzing beam files
30. Concuerror
30.1. Configuration
30.2. Writing tests
30.3. Usage
31. Xref
31.1. Usage
31.2. Queries
31.3. Analysis scope
31.4. Ignoring warnings
IV. Third-party plugins
32. External plugins
32.1. Loading all plugins from a dependency
32.2. Loading one plugin from a dependency
32.3. Writing external plugins
32.4. Early-stage plugins
32.5. Loading plugins local to the application
32.6. Adding templates via plugins
33. List of plugins
33.1. ci.erlang.mk
33.2. efene.mk
33.3. elvis.mk
33.4. esh.mk
33.5. geas
33.6. lfe.mk
33.7. reload.mk
33.8. rust.mk
33.9. version.mk
V. About Erlang.mk
34. Why Erlang.mk
34.1. Erlang.mk is fast
34.2. Erlang.mk gives you the full power of Unix
34.3. Erlang.mk is a text file
34.4. Erlang.mk can manage Erlang itself
34.5. Erlang.mk can do more than Erlang
34.6. Erlang.mk integrates nicely in Make and Automake projects
35. Short history
35.1. Before Erlang.mk
35.2. Lifetime of the project
36. Contributing
36.1. Bugs
36.2. Code
36.3. Documentation
36.4. Feature requests