diff options
author | Loïc Hoguin <[email protected]> | 2022-05-31 09:53:34 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2022-05-31 09:53:34 +0200 |
commit | af8ba863113fe48b1e83f1a760775e03e3148c41 (patch) | |
tree | 23f8f48d369ce2572eb9a3d8fe4f3dad7508267d | |
parent | da731f370d5440803a294b0d0006d8531ea2e52e (diff) | |
download | erlang.mk-af8ba863113fe48b1e83f1a760775e03e3148c41.tar.gz erlang.mk-af8ba863113fe48b1e83f1a760775e03e3148c41.tar.bz2 erlang.mk-af8ba863113fe48b1e83f1a760775e03e3148c41.zip |
Update user guide
-rw-r--r-- | guide/deps.html | 6 | ||||
-rw-r--r-- | guide/index.html | 2 | ||||
-rw-r--r-- | guide/xref.html | 89 |
3 files changed, 94 insertions, 3 deletions
diff --git a/guide/deps.html b/guide/deps.html index fa9287c..f2de869 100644 --- a/guide/deps.html +++ b/guide/deps.html @@ -47,7 +47,11 @@ tools to find what you need, for example:</p><pre class="programlisting">$ make to your project is a one-liner:</p><pre class="programlisting">DEPS = cowboy</pre><p>And that’s it! The next time you run <code class="literal">make</code>, Erlang.mk will fetch and compile Cowboy. Erlang.mk will also ensure Cowboy is available whenever you use the shell, run tests and any -other operations.</p><p>Erlang.mk will fill in the application resource file with +other operations.</p><p>Note though that you may need to specify the version of a +dependency to use. Otherwise, you may get an outdated version, +since the package index used by Erlang.mk is not always +updated with the latest version of each package.</p><pre class="programlisting">DEPS = cowboy +dep_cowboy_commit = 2.8.0</pre><p>Erlang.mk will fill in the application resource file with all applications found in <code class="literal">DEPS</code>. But not all dependencies are Erlang applications, and not all dependencies need to be a runtime dependency. That’s where the <code class="literal">BUILD_DEPS</code> diff --git a/guide/index.html b/guide/index.html index 415948f..4c7664d 100644 --- a/guide/index.html +++ b/guide/index.html @@ -33,7 +33,7 @@ div.navfooter{margin-bottom:1em} </header> <main> -<div class="navheader"><table width="100%" summary="Navigation header"><tr><td width="20%" align="left"> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="installation.html">Next</a></td></tr></table><hr /></div><div xml:lang="en" class="book" lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="idm1"></a>Erlang.mk User Guide</h1></div><div><div class="author"><h3 class="author"><span class="firstname">Loïc</span> <span class="surname">Hoguin</span></h3><code class="email"><<a class="email" href="mailto:[email protected]">[email protected]</a>></code></div></div></div><hr /></div><div class="toc"><p><strong>Table of Contents</strong></p><dl class="toc"><dt><span class="chapter"><a href="installation.html">1. Installation</a></span></dt><dd><dl><dt><span class="section"><a href="installation.html#_on_unix">1.1. On Unix</a></span></dt><dt><span class="section"><a href="installation.html#_on_windows">1.2. On Windows</a></span></dt></dl></dd><dt><span class="chapter"><a href="getting_started.html">2. Getting started</a></span></dt><dd><dl><dt><span class="section"><a href="getting_started.html#_creating_a_folder_for_your_project">2.1. Creating a folder for your project</a></span></dt><dt><span class="section"><a href="getting_started.html#_downloading_erlang_mk">2.2. Downloading Erlang.mk</a></span></dt><dt><span class="section"><a href="getting_started.html#_getting_started_with_otp_applications">2.3. Getting started with OTP applications</a></span></dt><dt><span class="section"><a href="getting_started.html#_getting_started_with_otp_libraries">2.4. Getting started with OTP libraries</a></span></dt><dt><span class="section"><a href="getting_started.html#_getting_started_with_otp_releases">2.5. Getting started with OTP releases</a></span></dt><dt><span class="section"><a href="getting_started.html#_getting_started_from_scratch">2.6. Getting started from scratch</a></span></dt><dt><span class="section"><a href="getting_started.html#_using_spaces_instead_of_tabs">2.7. Using spaces instead of tabs</a></span></dt><dt><span class="section"><a href="getting_started.html#_using_templates">2.8. Using templates</a></span></dt><dt><span class="section"><a href="getting_started.html#_hiding_erlang_mk_from_git">2.9. Hiding Erlang.mk from git</a></span></dt><dt><span class="section"><a href="getting_started.html#_getting_help">2.10. Getting help</a></span></dt></dl></dd><dt><span class="chapter"><a href="overview.html">3. Overview</a></span></dt><dd><dl><dt><span class="section"><a href="overview.html#_building_your_project">3.1. Building your project</a></span></dt><dt><span class="section"><a href="overview.html#_exploring_the_package_index">3.2. Exploring the package index</a></span></dt><dt><span class="section"><a href="overview.html#_generating_documentation">3.3. Generating documentation</a></span></dt><dt><span class="section"><a href="overview.html#_running_tests">3.4. Running tests</a></span></dt><dt><span class="section"><a href="overview.html#_need_more">3.5. Need more?</a></span></dt></dl></dd><dt><span class="chapter"><a href="updating.html">4. Updating Erlang.mk</a></span></dt><dd><dl><dt><span class="section"><a href="updating.html#_initial_bootstrap">4.1. Initial bootstrap</a></span></dt><dt><span class="section"><a href="updating.html#_updating">4.2. Updating</a></span></dt><dt><span class="section"><a href="updating.html#_customizing_the_build">4.3. Customizing the build</a></span></dt></dl></dd><dt><span class="chapter"><a href="limitations.html">5. Limitations</a></span></dt><dd><dl><dt><span class="section"><a href="limitations.html#_erlang_must_be_available">5.1. Erlang must be available</a></span></dt><dt><span class="section"><a href="limitations.html#_spaces_in_path">5.2. Spaces in path</a></span></dt><dt><span class="section"><a href="limitations.html#_dependency_tracking_and_modification_times">5.3. Dependency tracking and modification times</a></span></dt></dl></dd><dt><span class="part"><a href="code.html">I. Code</a></span></dt><dd><dl><dt><span class="chapter"><a href="building.html">6. Building</a></span></dt><dd><dl><dt><span class="section"><a href="building.html#_how_to_build">6.1. How to build</a></span></dt><dt><span class="section"><a href="building.html#_what_to_build">6.2. What to build</a></span></dt><dt><span class="section"><a href="building.html#_application_resource_file">6.3. Application resource file</a></span></dt><dt><span class="section"><a href="building.html#_automatic_application_resource_file_values">6.4. Automatic application resource file values</a></span></dt><dt><span class="section"><a href="building.html#_file_formats">6.5. File formats</a></span></dt><dt><span class="section"><a href="building.html#_compilation_options">6.6. Compilation options</a></span></dt><dt><span class="section"><a href="building.html#_cold_and_hot_builds">6.7. Cold and hot builds</a></span></dt><dt><span class="section"><a href="building.html#_dependency_tracking">6.8. Dependency tracking</a></span></dt><dt><span class="section"><a href="building.html#_generating_erlang_source">6.9. Generating Erlang source</a></span></dt><dt><span class="section"><a href="building.html#_cleaning">6.10. Cleaning</a></span></dt></dl></dd><dt><span class="chapter"><a href="deps.html">7. Packages and dependencies</a></span></dt><dd><dl><dt><span class="section"><a href="deps.html#_searching_packages">7.1. Searching packages</a></span></dt><dt><span class="section"><a href="deps.html#_adding_dependencies_to_your_project">7.2. Adding dependencies to your project</a></span></dt><dt><span class="section"><a href="deps.html#_how_deps_are_fetched_and_built">7.3. How deps are fetched and built</a></span></dt><dt><span class="section"><a href="deps.html#_fetching_and_listing_dependencies_only">7.4. Fetching and listing dependencies only</a></span></dt><dt><span class="section"><a href="deps.html#_querying_dependencies">7.5. Querying dependencies</a></span></dt><dt><span class="section"><a href="deps.html#_ignoring_unwanted_dependencies">7.6. Ignoring unwanted dependencies</a></span></dt><dt><span class="section"><a href="deps.html#_dependencies_directory">7.7. Dependencies directory</a></span></dt><dt><span class="section"><a href="deps.html#_many_applications_in_one_repository">7.8. Many applications in one repository</a></span></dt><dt><span class="section"><a href="deps.html#_repositories_with_no_application_at_the_root_level">7.9. Repositories with no application at the root level</a></span></dt><dt><span class="section"><a href="deps.html#_autopatch">7.10. Autopatch</a></span></dt><dt><span class="section"><a href="deps.html#_dealing_with_duplicate_modules">7.11. Dealing with duplicate modules</a></span></dt><dt><span class="section"><a href="deps.html#_skipping_deps">7.12. Skipping deps</a></span></dt></dl></dd><dt><span class="chapter"><a href="ports.html">8. NIFs and port drivers</a></span></dt><dd><dl><dt><span class="section"><a href="ports.html#_c_source_code_location_and_erlang_environment">8.1. C source code location and Erlang environment</a></span></dt><dt><span class="section"><a href="ports.html#_using_a_custom_makefile">8.2. Using a custom Makefile</a></span></dt><dt><span class="section"><a href="ports.html#_using_erlang_mk_directly">8.3. Using Erlang.mk directly</a></span></dt><dt><span class="section"><a href="ports.html#_propagating_compile_and_linker_flags_to_sub_makefiles">8.4. Propagating compile and linker flags to sub-Makefiles</a></span></dt></dl></dd><dt><span class="chapter"><a href="relx.html">9. Releases</a></span></dt><dd><dl><dt><span class="section"><a href="relx.html#_setup">9.1. Setup</a></span></dt><dt><span class="section"><a href="relx.html#_configuration">9.2. Configuration</a></span></dt><dt><span class="section"><a href="relx.html#_generating_the_release">9.3. Generating the release</a></span></dt><dt><span class="section"><a href="relx.html#_running_the_release">9.4. Running the release</a></span></dt><dt><span class="section"><a href="relx.html#_upgrading_a_release">9.5. Upgrading a release</a></span></dt><dt><span class="section"><a href="relx.html#_getting_relx_semver_value">9.6. Getting Relx semver value</a></span></dt></dl></dd><dt><span class="chapter"><a href="sfx.html">10. Self-extracting releases</a></span></dt><dd><dl><dt><span class="section"><a href="sfx.html#_generating_the_self_extracting_archive">10.1. Generating the self-extracting archive</a></span></dt><dt><span class="section"><a href="sfx.html#_running_the_release_2">10.2. Running the release</a></span></dt></dl></dd><dt><span class="chapter"><a href="escript.html">11. Escripts</a></span></dt><dd><dl><dt><span class="section"><a href="escript.html#_requirements">11.1. Requirements</a></span></dt><dt><span class="section"><a href="escript.html#_generating_an_escript">11.2. Generating an escript</a></span></dt><dt><span class="section"><a href="escript.html#_configuration_2">11.3. Configuration</a></span></dt><dt><span class="section"><a href="escript.html#_extra_files">11.4. Extra files</a></span></dt><dt><span class="section"><a href="escript.html#_optimizing_for_size">11.5. Optimizing for size</a></span></dt></dl></dd><dt><span class="chapter"><a href="kerl.html">12. OTP version management</a></span></dt><dd><dl><dt><span class="section"><a href="kerl.html#_erlang_versions">12.1. Erlang versions</a></span></dt><dt><span class="section"><a href="kerl.html#otp_version_pinning">12.2. OTP version pinning</a></span></dt><dt><span class="section"><a href="kerl.html#_continuous_integration">12.3. Continuous integration</a></span></dt><dt><span class="section"><a href="kerl.html#_configuring_kerl">12.4. Configuring Kerl</a></span></dt></dl></dd><dt><span class="chapter"><a href="cross_compiling.html">13. Cross compiling</a></span></dt><dd><dl><dt><span class="section"><a href="cross_compiling.html#_compiling">13.1. Compiling</a></span></dt><dt><span class="section"><a href="cross_compiling.html#_building_the_release">13.2. Building the release</a></span></dt></dl></dd><dt><span class="chapter"><a href="compat.html">14. Compatibility with other build tools</a></span></dt><dd><dl><dt><span class="section"><a href="compat.html#_rebar_projects_as_erlang_mk_dependencies">14.1. Rebar projects as Erlang.mk dependencies</a></span></dt><dt><span class="section"><a href="compat.html#_erlang_mk_projects_as_rebar_dependencies">14.2. Erlang.mk projects as Rebar dependencies</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="docs.html">II. Documentation</a></span></dt><dd><dl><dt><span class="chapter"><a href="asciidoc.html">15. AsciiDoc documentation</a></span></dt><dd><dl><dt><span class="section"><a href="asciidoc.html#_requirements_2">15.1. Requirements</a></span></dt><dt><span class="section"><a href="asciidoc.html#_writing_asciidoc_documentation">15.2. Writing AsciiDoc documentation</a></span></dt><dt><span class="section"><a href="asciidoc.html#_configuration_3">15.3. Configuration</a></span></dt><dt><span class="section"><a href="asciidoc.html#_usage">15.4. Usage</a></span></dt></dl></dd><dt><span class="chapter"><a href="edoc.html">16. EDoc comments</a></span></dt><dd><dl><dt><span class="section"><a href="edoc.html#_writing_edoc_comments">16.1. Writing EDoc comments</a></span></dt><dt><span class="section"><a href="edoc.html#_configuration_4">16.2. Configuration</a></span></dt><dt><span class="section"><a href="edoc.html#_usage_2">16.3. Usage</a></span></dt><dt><span class="section"><a href="edoc.html#_running_edoc_on_all_applications">16.4. Running EDoc on all applications</a></span></dt></dl></dd><dt><span class="chapter"><a href="sphinx.html">17. Sphinx documentation</a></span></dt><dd><dl><dt><span class="section"><a href="sphinx.html#_writing_sphinx_documentation">17.1. Writing Sphinx documentation</a></span></dt><dt><span class="section"><a href="sphinx.html#_basic_setup">17.2. Basic setup</a></span></dt><dt><span class="section"><a href="sphinx.html#_erlang_mk_configuration">17.3. Erlang.mk configuration</a></span></dt><dt><span class="section"><a href="sphinx.html#_generating_man_pages">17.4. Generating man pages</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="tests.html">III. Tests</a></span></dt><dd><dl><dt><span class="chapter"><a href="shell.html">18. Erlang shell</a></span></dt><dd><dl><dt><span class="section"><a href="shell.html#_configuration_5">18.1. Configuration</a></span></dt><dt><span class="section"><a href="shell.html#_usage_3">18.2. Usage</a></span></dt></dl></dd><dt><span class="chapter"><a href="eunit.html">19. EUnit</a></span></dt><dd><dl><dt><span class="section"><a href="eunit.html#_writing_tests">19.1. Writing tests</a></span></dt><dt><span class="section"><a href="eunit.html#_configuration_6">19.2. Configuration</a></span></dt><dt><span class="section"><a href="eunit.html#_usage_4">19.3. Usage</a></span></dt></dl></dd><dt><span class="chapter"><a href="ct.html">20. Common Test</a></span></dt><dd><dl><dt><span class="section"><a href="ct.html#_writing_tests_2">20.1. Writing tests</a></span></dt><dt><span class="section"><a href="ct.html#_configuration_7">20.2. Configuration</a></span></dt><dt><span class="section"><a href="ct.html#_usage_5">20.3. Usage</a></span></dt></dl></dd><dt><span class="chapter"><a href="proper.html">21. PropEr</a></span></dt><dt><span class="chapter"><a href="triq.html">22. Triq</a></span></dt><dt><span class="chapter"><a href="coverage.html">23. Code coverage</a></span></dt><dd><dl><dt><span class="section"><a href="coverage.html#_enabling_cover_when_running_tests">23.1. Enabling cover when running tests</a></span></dt><dt><span class="section"><a href="coverage.html#_adding_applications_to_the_cover_report">23.2. Adding applications to the cover report</a></span></dt><dt><span class="section"><a href="coverage.html#_configuring_paths">23.3. Configuring paths</a></span></dt><dt><span class="section"><a href="coverage.html#_merging_coverdata_files">23.4. Merging coverdata files</a></span></dt></dl></dd><dt><span class="chapter"><a href="ci.html">24. Continuous integration</a></span></dt><dd><dl><dt><span class="section"><a href="ci.html#_configuring_erlang_otp_versions_to_test">24.1. Configuring Erlang/OTP versions to test</a></span></dt><dt><span class="section"><a href="ci.html#_running_tests_across_all_configured_versions">24.2. Running tests across all configured versions</a></span></dt><dt><span class="section"><a href="ci.html#_extending_the_ci_targets">24.3. Extending the CI targets</a></span></dt></dl></dd><dt><span class="chapter"><a href="dialyzer.html">25. Dialyzer</a></span></dt><dd><dl><dt><span class="section"><a href="dialyzer.html#_how_it_works">25.1. How it works</a></span></dt><dt><span class="section"><a href="dialyzer.html#_configuration_8">25.2. Configuration</a></span></dt><dt><span class="section"><a href="dialyzer.html#_usage_6">25.3. Usage</a></span></dt><dt><span class="section"><a href="dialyzer.html#_dialyzing_beam_files">25.4. Dialyzing beam files</a></span></dt></dl></dd><dt><span class="chapter"><a href="concuerror.html">26. Concuerror</a></span></dt><dd><dl><dt><span class="section"><a href="concuerror.html#_configuration_9">26.1. Configuration</a></span></dt><dt><span class="section"><a href="concuerror.html#_writing_tests_3">26.2. Writing tests</a></span></dt><dt><span class="section"><a href="concuerror.html#_usage_7">26.3. Usage</a></span></dt></dl></dd><dt><span class="chapter"><a href="xref.html">27. Xref</a></span></dt></dl></dd><dt><span class="part"><a href="plugins.html">IV. Third-party plugins</a></span></dt><dd><dl><dt><span class="chapter"><a href="plugins_usage.html">28. External plugins</a></span></dt><dd><dl><dt><span class="section"><a href="plugins_usage.html#_loading_all_plugins_from_a_dependency">28.1. Loading all plugins from a dependency</a></span></dt><dt><span class="section"><a href="plugins_usage.html#_loading_one_plugin_from_a_dependency">28.2. Loading one plugin from a dependency</a></span></dt><dt><span class="section"><a href="plugins_usage.html#_writing_external_plugins">28.3. Writing external plugins</a></span></dt><dt><span class="section"><a href="plugins_usage.html#_early_stage_plugins">28.4. Early-stage plugins</a></span></dt><dt><span class="section"><a href="plugins_usage.html#_loading_plugins_local_to_the_application">28.5. Loading plugins local to the application</a></span></dt></dl></dd><dt><span class="chapter"><a href="plugins_list.html">29. List of plugins</a></span></dt><dd><dl><dt><span class="section"><a href="plugins_list.html#_ci_erlang_mk">29.1. ci.erlang.mk</a></span></dt><dt><span class="section"><a href="plugins_list.html#_efene_mk">29.2. efene.mk</a></span></dt><dt><span class="section"><a href="plugins_list.html#_elixir_mk">29.3. elixir.mk</a></span></dt><dt><span class="section"><a href="plugins_list.html#_elvis_mk">29.4. elvis.mk</a></span></dt><dt><span class="section"><a href="plugins_list.html#_esh_mk">29.5. esh.mk</a></span></dt><dt><span class="section"><a href="plugins_list.html#_geas">29.6. geas</a></span></dt><dt><span class="section"><a href="plugins_list.html#_hexer_mk">29.7. hexer.mk</a></span></dt><dt><span class="section"><a href="plugins_list.html#_hexpm_mk">29.8. hexpm.mk</a></span></dt><dt><span class="section"><a href="plugins_list.html#_jorel">29.9. jorel</a></span></dt><dt><span class="section"><a href="plugins_list.html#_lfe_mk">29.10. lfe.mk</a></span></dt><dt><span class="section"><a href="plugins_list.html#_mix_mk">29.11. mix.mk</a></span></dt><dt><span class="section"><a href="plugins_list.html#_reload_mk">29.12. reload.mk</a></span></dt><dt><span class="section"><a href="plugins_list.html#_rust_mk">29.13. rust.mk</a></span></dt><dt><span class="section"><a href="plugins_list.html#_version_mk">29.14. version.mk</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="about.html">V. About Erlang.mk</a></span></dt><dd><dl><dt><span class="chapter"><a href="why.html">30. Why Erlang.mk</a></span></dt><dd><dl><dt><span class="section"><a href="why.html#_erlang_mk_is_fast">30.1. Erlang.mk is fast</a></span></dt><dt><span class="section"><a href="why.html#_erlang_mk_gives_you_the_full_power_of_unix">30.2. Erlang.mk gives you the full power of Unix</a></span></dt><dt><span class="section"><a href="why.html#_erlang_mk_is_a_text_file">30.3. Erlang.mk is a text file</a></span></dt><dt><span class="section"><a href="why.html#_erlang_mk_can_manage_erlang_itself">30.4. Erlang.mk can manage Erlang itself</a></span></dt><dt><span class="section"><a href="why.html#_erlang_mk_can_do_more_than_erlang">30.5. Erlang.mk can do more than Erlang</a></span></dt><dt><span class="section"><a href="why.html#_erlang_mk_integrates_nicely_in_make_and_automake_projects">30.6. Erlang.mk integrates nicely in Make and Automake projects</a></span></dt></dl></dd><dt><span class="chapter"><a href="history.html">31. Short history</a></span></dt><dd><dl><dt><span class="section"><a href="history.html#_before_erlang_mk">31.1. Before Erlang.mk</a></span></dt><dt><span class="section"><a href="history.html#_lifetime_of_the_project">31.2. Lifetime of the project</a></span></dt></dl></dd><dt><span class="chapter"><a href="contributing.html">32. Contributing</a></span></dt><dd><dl><dt><span class="section"><a href="contributing.html#_priorities">32.1. Priorities</a></span></dt><dt><span class="section"><a href="contributing.html#_bugs">32.2. Bugs</a></span></dt><dt><span class="section"><a href="contributing.html#_code">32.3. Code</a></span></dt><dt><span class="section"><a href="contributing.html#_packages">32.4. Packages</a></span></dt><dt><span class="section"><a href="contributing.html#_documentation">32.5. Documentation</a></span></dt><dt><span class="section"><a href="contributing.html#_feature_requests">32.6. Feature requests</a></span></dt></dl></dd></dl></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="installation.html">Next</a></td></tr></table></div> +<div class="navheader"><table width="100%" summary="Navigation header"><tr><td width="20%" align="left"> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="installation.html">Next</a></td></tr></table><hr /></div><div xml:lang="en" class="book" lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="idm1"></a>Erlang.mk User Guide</h1></div><div><div class="author"><h3 class="author"><span class="firstname">Loïc</span> <span class="surname">Hoguin</span></h3><code class="email"><<a class="email" href="mailto:[email protected]">[email protected]</a>></code></div></div></div><hr /></div><div class="toc"><p><strong>Table of Contents</strong></p><dl class="toc"><dt><span class="chapter"><a href="installation.html">1. Installation</a></span></dt><dd><dl><dt><span class="section"><a href="installation.html#_on_unix">1.1. On Unix</a></span></dt><dt><span class="section"><a href="installation.html#_on_windows">1.2. On Windows</a></span></dt></dl></dd><dt><span class="chapter"><a href="getting_started.html">2. Getting started</a></span></dt><dd><dl><dt><span class="section"><a href="getting_started.html#_creating_a_folder_for_your_project">2.1. Creating a folder for your project</a></span></dt><dt><span class="section"><a href="getting_started.html#_downloading_erlang_mk">2.2. Downloading Erlang.mk</a></span></dt><dt><span class="section"><a href="getting_started.html#_getting_started_with_otp_applications">2.3. Getting started with OTP applications</a></span></dt><dt><span class="section"><a href="getting_started.html#_getting_started_with_otp_libraries">2.4. Getting started with OTP libraries</a></span></dt><dt><span class="section"><a href="getting_started.html#_getting_started_with_otp_releases">2.5. Getting started with OTP releases</a></span></dt><dt><span class="section"><a href="getting_started.html#_getting_started_from_scratch">2.6. Getting started from scratch</a></span></dt><dt><span class="section"><a href="getting_started.html#_using_spaces_instead_of_tabs">2.7. Using spaces instead of tabs</a></span></dt><dt><span class="section"><a href="getting_started.html#_using_templates">2.8. Using templates</a></span></dt><dt><span class="section"><a href="getting_started.html#_hiding_erlang_mk_from_git">2.9. Hiding Erlang.mk from git</a></span></dt><dt><span class="section"><a href="getting_started.html#_getting_help">2.10. Getting help</a></span></dt></dl></dd><dt><span class="chapter"><a href="overview.html">3. Overview</a></span></dt><dd><dl><dt><span class="section"><a href="overview.html#_building_your_project">3.1. Building your project</a></span></dt><dt><span class="section"><a href="overview.html#_exploring_the_package_index">3.2. Exploring the package index</a></span></dt><dt><span class="section"><a href="overview.html#_generating_documentation">3.3. Generating documentation</a></span></dt><dt><span class="section"><a href="overview.html#_running_tests">3.4. Running tests</a></span></dt><dt><span class="section"><a href="overview.html#_need_more">3.5. Need more?</a></span></dt></dl></dd><dt><span class="chapter"><a href="updating.html">4. Updating Erlang.mk</a></span></dt><dd><dl><dt><span class="section"><a href="updating.html#_initial_bootstrap">4.1. Initial bootstrap</a></span></dt><dt><span class="section"><a href="updating.html#_updating">4.2. Updating</a></span></dt><dt><span class="section"><a href="updating.html#_customizing_the_build">4.3. Customizing the build</a></span></dt></dl></dd><dt><span class="chapter"><a href="limitations.html">5. Limitations</a></span></dt><dd><dl><dt><span class="section"><a href="limitations.html#_erlang_must_be_available">5.1. Erlang must be available</a></span></dt><dt><span class="section"><a href="limitations.html#_spaces_in_path">5.2. Spaces in path</a></span></dt><dt><span class="section"><a href="limitations.html#_dependency_tracking_and_modification_times">5.3. Dependency tracking and modification times</a></span></dt></dl></dd><dt><span class="part"><a href="code.html">I. Code</a></span></dt><dd><dl><dt><span class="chapter"><a href="building.html">6. Building</a></span></dt><dd><dl><dt><span class="section"><a href="building.html#_how_to_build">6.1. How to build</a></span></dt><dt><span class="section"><a href="building.html#_what_to_build">6.2. What to build</a></span></dt><dt><span class="section"><a href="building.html#_application_resource_file">6.3. Application resource file</a></span></dt><dt><span class="section"><a href="building.html#_automatic_application_resource_file_values">6.4. Automatic application resource file values</a></span></dt><dt><span class="section"><a href="building.html#_file_formats">6.5. File formats</a></span></dt><dt><span class="section"><a href="building.html#_compilation_options">6.6. Compilation options</a></span></dt><dt><span class="section"><a href="building.html#_cold_and_hot_builds">6.7. Cold and hot builds</a></span></dt><dt><span class="section"><a href="building.html#_dependency_tracking">6.8. Dependency tracking</a></span></dt><dt><span class="section"><a href="building.html#_generating_erlang_source">6.9. Generating Erlang source</a></span></dt><dt><span class="section"><a href="building.html#_cleaning">6.10. Cleaning</a></span></dt></dl></dd><dt><span class="chapter"><a href="deps.html">7. Packages and dependencies</a></span></dt><dd><dl><dt><span class="section"><a href="deps.html#_searching_packages">7.1. Searching packages</a></span></dt><dt><span class="section"><a href="deps.html#_adding_dependencies_to_your_project">7.2. Adding dependencies to your project</a></span></dt><dt><span class="section"><a href="deps.html#_how_deps_are_fetched_and_built">7.3. How deps are fetched and built</a></span></dt><dt><span class="section"><a href="deps.html#_fetching_and_listing_dependencies_only">7.4. Fetching and listing dependencies only</a></span></dt><dt><span class="section"><a href="deps.html#_querying_dependencies">7.5. Querying dependencies</a></span></dt><dt><span class="section"><a href="deps.html#_ignoring_unwanted_dependencies">7.6. Ignoring unwanted dependencies</a></span></dt><dt><span class="section"><a href="deps.html#_dependencies_directory">7.7. Dependencies directory</a></span></dt><dt><span class="section"><a href="deps.html#_many_applications_in_one_repository">7.8. Many applications in one repository</a></span></dt><dt><span class="section"><a href="deps.html#_repositories_with_no_application_at_the_root_level">7.9. Repositories with no application at the root level</a></span></dt><dt><span class="section"><a href="deps.html#_autopatch">7.10. Autopatch</a></span></dt><dt><span class="section"><a href="deps.html#_dealing_with_duplicate_modules">7.11. Dealing with duplicate modules</a></span></dt><dt><span class="section"><a href="deps.html#_skipping_deps">7.12. Skipping deps</a></span></dt></dl></dd><dt><span class="chapter"><a href="ports.html">8. NIFs and port drivers</a></span></dt><dd><dl><dt><span class="section"><a href="ports.html#_c_source_code_location_and_erlang_environment">8.1. C source code location and Erlang environment</a></span></dt><dt><span class="section"><a href="ports.html#_using_a_custom_makefile">8.2. Using a custom Makefile</a></span></dt><dt><span class="section"><a href="ports.html#_using_erlang_mk_directly">8.3. Using Erlang.mk directly</a></span></dt><dt><span class="section"><a href="ports.html#_propagating_compile_and_linker_flags_to_sub_makefiles">8.4. Propagating compile and linker flags to sub-Makefiles</a></span></dt></dl></dd><dt><span class="chapter"><a href="relx.html">9. Releases</a></span></dt><dd><dl><dt><span class="section"><a href="relx.html#_setup">9.1. Setup</a></span></dt><dt><span class="section"><a href="relx.html#_configuration">9.2. Configuration</a></span></dt><dt><span class="section"><a href="relx.html#_generating_the_release">9.3. Generating the release</a></span></dt><dt><span class="section"><a href="relx.html#_running_the_release">9.4. Running the release</a></span></dt><dt><span class="section"><a href="relx.html#_upgrading_a_release">9.5. Upgrading a release</a></span></dt><dt><span class="section"><a href="relx.html#_getting_relx_semver_value">9.6. Getting Relx semver value</a></span></dt></dl></dd><dt><span class="chapter"><a href="sfx.html">10. Self-extracting releases</a></span></dt><dd><dl><dt><span class="section"><a href="sfx.html#_generating_the_self_extracting_archive">10.1. Generating the self-extracting archive</a></span></dt><dt><span class="section"><a href="sfx.html#_running_the_release_2">10.2. Running the release</a></span></dt></dl></dd><dt><span class="chapter"><a href="escript.html">11. Escripts</a></span></dt><dd><dl><dt><span class="section"><a href="escript.html#_requirements">11.1. Requirements</a></span></dt><dt><span class="section"><a href="escript.html#_generating_an_escript">11.2. Generating an escript</a></span></dt><dt><span class="section"><a href="escript.html#_configuration_2">11.3. Configuration</a></span></dt><dt><span class="section"><a href="escript.html#_extra_files">11.4. Extra files</a></span></dt><dt><span class="section"><a href="escript.html#_optimizing_for_size">11.5. Optimizing for size</a></span></dt></dl></dd><dt><span class="chapter"><a href="kerl.html">12. OTP version management</a></span></dt><dd><dl><dt><span class="section"><a href="kerl.html#_erlang_versions">12.1. Erlang versions</a></span></dt><dt><span class="section"><a href="kerl.html#otp_version_pinning">12.2. OTP version pinning</a></span></dt><dt><span class="section"><a href="kerl.html#_continuous_integration">12.3. Continuous integration</a></span></dt><dt><span class="section"><a href="kerl.html#_configuring_kerl">12.4. Configuring Kerl</a></span></dt></dl></dd><dt><span class="chapter"><a href="cross_compiling.html">13. Cross compiling</a></span></dt><dd><dl><dt><span class="section"><a href="cross_compiling.html#_compiling">13.1. Compiling</a></span></dt><dt><span class="section"><a href="cross_compiling.html#_building_the_release">13.2. Building the release</a></span></dt></dl></dd><dt><span class="chapter"><a href="compat.html">14. Compatibility with other build tools</a></span></dt><dd><dl><dt><span class="section"><a href="compat.html#_rebar_projects_as_erlang_mk_dependencies">14.1. Rebar projects as Erlang.mk dependencies</a></span></dt><dt><span class="section"><a href="compat.html#_erlang_mk_projects_as_rebar_dependencies">14.2. Erlang.mk projects as Rebar dependencies</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="docs.html">II. Documentation</a></span></dt><dd><dl><dt><span class="chapter"><a href="asciidoc.html">15. AsciiDoc documentation</a></span></dt><dd><dl><dt><span class="section"><a href="asciidoc.html#_requirements_2">15.1. Requirements</a></span></dt><dt><span class="section"><a href="asciidoc.html#_writing_asciidoc_documentation">15.2. Writing AsciiDoc documentation</a></span></dt><dt><span class="section"><a href="asciidoc.html#_configuration_3">15.3. Configuration</a></span></dt><dt><span class="section"><a href="asciidoc.html#_usage">15.4. Usage</a></span></dt></dl></dd><dt><span class="chapter"><a href="edoc.html">16. EDoc comments</a></span></dt><dd><dl><dt><span class="section"><a href="edoc.html#_writing_edoc_comments">16.1. Writing EDoc comments</a></span></dt><dt><span class="section"><a href="edoc.html#_configuration_4">16.2. Configuration</a></span></dt><dt><span class="section"><a href="edoc.html#_usage_2">16.3. Usage</a></span></dt><dt><span class="section"><a href="edoc.html#_running_edoc_on_all_applications">16.4. Running EDoc on all applications</a></span></dt></dl></dd><dt><span class="chapter"><a href="sphinx.html">17. Sphinx documentation</a></span></dt><dd><dl><dt><span class="section"><a href="sphinx.html#_writing_sphinx_documentation">17.1. Writing Sphinx documentation</a></span></dt><dt><span class="section"><a href="sphinx.html#_basic_setup">17.2. Basic setup</a></span></dt><dt><span class="section"><a href="sphinx.html#_erlang_mk_configuration">17.3. Erlang.mk configuration</a></span></dt><dt><span class="section"><a href="sphinx.html#_generating_man_pages">17.4. Generating man pages</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="tests.html">III. Tests</a></span></dt><dd><dl><dt><span class="chapter"><a href="shell.html">18. Erlang shell</a></span></dt><dd><dl><dt><span class="section"><a href="shell.html#_configuration_5">18.1. Configuration</a></span></dt><dt><span class="section"><a href="shell.html#_usage_3">18.2. Usage</a></span></dt></dl></dd><dt><span class="chapter"><a href="eunit.html">19. EUnit</a></span></dt><dd><dl><dt><span class="section"><a href="eunit.html#_writing_tests">19.1. Writing tests</a></span></dt><dt><span class="section"><a href="eunit.html#_configuration_6">19.2. Configuration</a></span></dt><dt><span class="section"><a href="eunit.html#_usage_4">19.3. Usage</a></span></dt></dl></dd><dt><span class="chapter"><a href="ct.html">20. Common Test</a></span></dt><dd><dl><dt><span class="section"><a href="ct.html#_writing_tests_2">20.1. Writing tests</a></span></dt><dt><span class="section"><a href="ct.html#_configuration_7">20.2. Configuration</a></span></dt><dt><span class="section"><a href="ct.html#_usage_5">20.3. Usage</a></span></dt></dl></dd><dt><span class="chapter"><a href="proper.html">21. PropEr</a></span></dt><dt><span class="chapter"><a href="triq.html">22. Triq</a></span></dt><dt><span class="chapter"><a href="coverage.html">23. Code coverage</a></span></dt><dd><dl><dt><span class="section"><a href="coverage.html#_enabling_cover_when_running_tests">23.1. Enabling cover when running tests</a></span></dt><dt><span class="section"><a href="coverage.html#_adding_applications_to_the_cover_report">23.2. Adding applications to the cover report</a></span></dt><dt><span class="section"><a href="coverage.html#_configuring_paths">23.3. Configuring paths</a></span></dt><dt><span class="section"><a href="coverage.html#_merging_coverdata_files">23.4. Merging coverdata files</a></span></dt></dl></dd><dt><span class="chapter"><a href="ci.html">24. Continuous integration</a></span></dt><dd><dl><dt><span class="section"><a href="ci.html#_configuring_erlang_otp_versions_to_test">24.1. Configuring Erlang/OTP versions to test</a></span></dt><dt><span class="section"><a href="ci.html#_running_tests_across_all_configured_versions">24.2. Running tests across all configured versions</a></span></dt><dt><span class="section"><a href="ci.html#_extending_the_ci_targets">24.3. Extending the CI targets</a></span></dt></dl></dd><dt><span class="chapter"><a href="dialyzer.html">25. Dialyzer</a></span></dt><dd><dl><dt><span class="section"><a href="dialyzer.html#_how_it_works">25.1. How it works</a></span></dt><dt><span class="section"><a href="dialyzer.html#_configuration_8">25.2. Configuration</a></span></dt><dt><span class="section"><a href="dialyzer.html#_usage_6">25.3. Usage</a></span></dt><dt><span class="section"><a href="dialyzer.html#_dialyzing_beam_files">25.4. Dialyzing beam files</a></span></dt></dl></dd><dt><span class="chapter"><a href="concuerror.html">26. Concuerror</a></span></dt><dd><dl><dt><span class="section"><a href="concuerror.html#_configuration_9">26.1. Configuration</a></span></dt><dt><span class="section"><a href="concuerror.html#_writing_tests_3">26.2. Writing tests</a></span></dt><dt><span class="section"><a href="concuerror.html#_usage_7">26.3. Usage</a></span></dt></dl></dd><dt><span class="chapter"><a href="xref.html">27. Xref</a></span></dt><dd><dl><dt><span class="section"><a href="xref.html#_usage_8">27.1. Usage</a></span></dt><dt><span class="section"><a href="xref.html#_queries">27.2. Queries</a></span></dt><dt><span class="section"><a href="xref.html#_analysis_scope">27.3. Analysis scope</a></span></dt><dt><span class="section"><a href="xref.html#_ignoring_warnings">27.4. Ignoring warnings</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="plugins.html">IV. Third-party plugins</a></span></dt><dd><dl><dt><span class="chapter"><a href="plugins_usage.html">28. External plugins</a></span></dt><dd><dl><dt><span class="section"><a href="plugins_usage.html#_loading_all_plugins_from_a_dependency">28.1. Loading all plugins from a dependency</a></span></dt><dt><span class="section"><a href="plugins_usage.html#_loading_one_plugin_from_a_dependency">28.2. Loading one plugin from a dependency</a></span></dt><dt><span class="section"><a href="plugins_usage.html#_writing_external_plugins">28.3. Writing external plugins</a></span></dt><dt><span class="section"><a href="plugins_usage.html#_early_stage_plugins">28.4. Early-stage plugins</a></span></dt><dt><span class="section"><a href="plugins_usage.html#_loading_plugins_local_to_the_application">28.5. Loading plugins local to the application</a></span></dt></dl></dd><dt><span class="chapter"><a href="plugins_list.html">29. List of plugins</a></span></dt><dd><dl><dt><span class="section"><a href="plugins_list.html#_ci_erlang_mk">29.1. ci.erlang.mk</a></span></dt><dt><span class="section"><a href="plugins_list.html#_efene_mk">29.2. efene.mk</a></span></dt><dt><span class="section"><a href="plugins_list.html#_elixir_mk">29.3. elixir.mk</a></span></dt><dt><span class="section"><a href="plugins_list.html#_elvis_mk">29.4. elvis.mk</a></span></dt><dt><span class="section"><a href="plugins_list.html#_esh_mk">29.5. esh.mk</a></span></dt><dt><span class="section"><a href="plugins_list.html#_geas">29.6. geas</a></span></dt><dt><span class="section"><a href="plugins_list.html#_hexer_mk">29.7. hexer.mk</a></span></dt><dt><span class="section"><a href="plugins_list.html#_hexpm_mk">29.8. hexpm.mk</a></span></dt><dt><span class="section"><a href="plugins_list.html#_jorel">29.9. jorel</a></span></dt><dt><span class="section"><a href="plugins_list.html#_lfe_mk">29.10. lfe.mk</a></span></dt><dt><span class="section"><a href="plugins_list.html#_mix_mk">29.11. mix.mk</a></span></dt><dt><span class="section"><a href="plugins_list.html#_reload_mk">29.12. reload.mk</a></span></dt><dt><span class="section"><a href="plugins_list.html#_rust_mk">29.13. rust.mk</a></span></dt><dt><span class="section"><a href="plugins_list.html#_version_mk">29.14. version.mk</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="about.html">V. About Erlang.mk</a></span></dt><dd><dl><dt><span class="chapter"><a href="why.html">30. Why Erlang.mk</a></span></dt><dd><dl><dt><span class="section"><a href="why.html#_erlang_mk_is_fast">30.1. Erlang.mk is fast</a></span></dt><dt><span class="section"><a href="why.html#_erlang_mk_gives_you_the_full_power_of_unix">30.2. Erlang.mk gives you the full power of Unix</a></span></dt><dt><span class="section"><a href="why.html#_erlang_mk_is_a_text_file">30.3. Erlang.mk is a text file</a></span></dt><dt><span class="section"><a href="why.html#_erlang_mk_can_manage_erlang_itself">30.4. Erlang.mk can manage Erlang itself</a></span></dt><dt><span class="section"><a href="why.html#_erlang_mk_can_do_more_than_erlang">30.5. Erlang.mk can do more than Erlang</a></span></dt><dt><span class="section"><a href="why.html#_erlang_mk_integrates_nicely_in_make_and_automake_projects">30.6. Erlang.mk integrates nicely in Make and Automake projects</a></span></dt></dl></dd><dt><span class="chapter"><a href="history.html">31. Short history</a></span></dt><dd><dl><dt><span class="section"><a href="history.html#_before_erlang_mk">31.1. Before Erlang.mk</a></span></dt><dt><span class="section"><a href="history.html#_lifetime_of_the_project">31.2. Lifetime of the project</a></span></dt></dl></dd><dt><span class="chapter"><a href="contributing.html">32. Contributing</a></span></dt><dd><dl><dt><span class="section"><a href="contributing.html#_priorities">32.1. Priorities</a></span></dt><dt><span class="section"><a href="contributing.html#_bugs">32.2. Bugs</a></span></dt><dt><span class="section"><a href="contributing.html#_code">32.3. Code</a></span></dt><dt><span class="section"><a href="contributing.html#_packages">32.4. Packages</a></span></dt><dt><span class="section"><a href="contributing.html#_documentation">32.5. Documentation</a></span></dt><dt><span class="section"><a href="contributing.html#_feature_requests">32.6. Feature requests</a></span></dt></dl></dd></dl></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="installation.html">Next</a></td></tr></table></div> </main> </body> </html> diff --git a/guide/xref.html b/guide/xref.html index 8c930a2..35ea94e 100644 --- a/guide/xref.html +++ b/guide/xref.html @@ -33,7 +33,94 @@ div.navfooter{margin-bottom:1em} </header> <main> -<div class="navheader"><table width="100%" summary="Navigation header"><tr><td width="20%" align="left"><a accesskey="p" href="concuerror.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="plugins.html">Next</a></td></tr></table><hr /></div><div class="chapter"><div class="titlepage"><div><div><h2 class="title"><a id="xref"></a>Chapter 27. Xref</h2></div></div></div><p>Placeholder chapter.</p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="concuerror.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="tests.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="plugins.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> </td></tr></table></div> +<div class="navheader"><table width="100%" summary="Navigation header"><tr><td width="20%" align="left"><a accesskey="p" href="concuerror.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="plugins.html">Next</a></td></tr></table><hr /></div><div class="chapter"><div class="titlepage"><div><div><h2 class="title"><a id="xref"></a>Chapter 27. Xref</h2></div></div></div><p>Xref is a cross reference tool for analyzing dependencies +between functions, modules, applications and releases. +Erlang.mk provides an interface to analyzing all except +the releases.</p><p>Both predefined checks and custom queries are supported +in Erlang.mk.</p><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_usage_8"></a>27.1. Usage</h2></div></div></div><p>To run Xref with the default predefined checks:</p><pre class="programlisting">$ make xref</pre><p>Erlang.mk will error out when warnings are found.</p><p>The following predefined checks can be used:</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"> +<code class="literal">undefined_function_calls</code> +</li><li class="listitem"> +<code class="literal">undefined_functions</code> (similar to the previous) +</li><li class="listitem"> +<code class="literal">locals_not_used</code> (detected by the compiler) +</li><li class="listitem"> +<code class="literal">exports_not_used</code> +</li><li class="listitem"> +<code class="literal">deprecated_function_calls</code> (also detected by the compiler) +</li><li class="listitem"> +<code class="literal">deprecated_functions</code> (similar to the previous) +</li><li class="listitem"> +<code class="literal">{deprecated_function_calls, Flag}</code> +</li><li class="listitem"> +<code class="literal">{deprecated_functions, Flag}</code> (similar to the previous) +</li></ul></div><p>Erlang.mk will only run the <code class="literal">undefined_function_calls</code> +check by default.</p><p>To change the check the <code class="literal">XREF_CHECKS</code> variable can be used:</p><pre class="programlisting">$ make xref XREF_CHECKS=exports_not_used</pre><p>Multiple checks can be run at once. The checks variable +must be defined as an Erlang list:</p><pre class="programlisting">$ make xref XREF_CHECKS="[undefined_function_calls, exports_not_used]"</pre><p>Erlang.mk also supports informational analyses. Those will +not error out when results are found, since they are not +errors. To find all modules that call <code class="literal">cowboy_req</code> functions:</p><pre class="programlisting">$ make xref XREF_CHECKS="{module_use, cowboy_req}"</pre><p>The following informational checks are supported:</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"> +<code class="literal">{call, MFA}</code> - functions that MFA calls +</li><li class="listitem"> +<code class="literal">{use, MFA}</code> - functions that call MFA +</li><li class="listitem"> +<code class="literal">{module_call, Mod}</code> - modules that Mod calls (Mod depends on them) +</li><li class="listitem"> +<code class="literal">{module_use, Mod}</code> - modules that call Mod (they depend on Mod) +</li><li class="listitem"> +<code class="literal">{application_call, App}</code> - apps that App calls (App depends on them) +</li><li class="listitem"> +<code class="literal">{application_use, App}</code> - apps that call App (they depend on App) +</li></ul></div><p>The scope might need to be increased in order to obtain +the complete results of informational checks. This is +especially true for module and applications, with +application results being dependent on the applications +being added to the scope to be found.</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_queries"></a>27.2. Queries</h2></div></div></div><p>Erlang.mk provides an interface to the Xref query +functions. To perform a query, the <code class="literal">q</code> variable +must be used instead of <code class="literal">XREF_CHECKS</code>. For example, +to obtain all unresolved calls:</p><pre class="programlisting">$ make xref q=UC</pre><p>The query language is documented at the top of the +<a class="ulink" href="https://www.erlang.org/doc/man/xref.html" target="_top">XRef manual page</a>.</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_analysis_scope"></a>27.3. Analysis scope</h2></div></div></div><p>Erlang.mk will set the scope of analysis to the current +project by default. The scope can be automatically +extended to the applications from multi-application +repositories, to dependencies and to the built-in +Erlang/OTP applications themselves.</p><p>To change the scope, the <code class="literal">XREF_SCOPE</code> variable can be +set. The variable can either be set in your Makefile +or from the command line. The following values can +be defined:</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"> +<code class="literal">app</code> - the current project +</li><li class="listitem"> +<code class="literal">apps</code> - applications from multi-application repositories +</li><li class="listitem"> +<code class="literal">deps</code> - dependencies +</li><li class="listitem"> +<code class="literal">otp</code> - Erlang/OTP applications +</li></ul></div><p>To get the most complete analysis possible they should +all be added to the variable:</p><pre class="programlisting">$ make xref XREF_CHECKS="{application_use, ssl}" XREF_SCOPE="app apps deps otp" +Application ssl is used by: +- my_app +- diameter +- eldap +- ftp +- inets +- ssl</pre><p>Additional applications can be provided using the +<code class="literal">XREF_EXTRA_APP_DIRS</code> variable. Note that these +applications will need to be compiled before they +can be found by Xref.</p><p>Similarly, non-application directories can be +added using <code class="literal">XREF_EXTRA_DIRS</code>. The directory +to be provided must be the one that contains +the beam files.</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_ignoring_warnings"></a>27.4. Ignoring warnings</h2></div></div></div><p>Sometimes it is necessary to ignore warnings because +they are expected. This is the case for example +when multiple Erlang/OTP versions must be supported +and modules or functions have been added or removed.</p><p>Erlang.mk supports both project-wide configuration +and Rebar-compatible inline ignores. To ignore +warnings for a function in the current module the +following line can be added to the source file:</p><pre class="programlisting">-ignore_xref({log, 1}).</pre><p>The module name can be specified explicitly:</p><pre class="programlisting">-ignore_xref({my_mod, log, 1}).</pre><p>As well as a full module can be ignored:</p><pre class="programlisting">-ignore_xref(my_mod).</pre><p>The ignored functions can be provided as a list:</p><pre class="programlisting">-ignore_xref([{log, 1}, {pretty_print, 1}]).</pre><p>The <code class="literal">XREF_IGNORE</code> variable can be used to define +functions and modules to ignore project-wide. It +accepts either MFAs or modules:</p><pre class="programlisting">XREF_IGNORE={my_mod, log, 1}</pre><p>Multiple ignores must be provided as an Erlang +list:</p><pre class="programlisting">XREF_IGNORE=[{my_mod, log, 1}, other_mod]</pre><p>By default Erlang.mk will ignore unused exports +for behavior callbacks when the <code class="literal">exports_not_used</code> +check is run. It is possible to override this +behavior, or to ignore the callbacks for queries +and other checks, by defining the <code class="literal">XREF_IGNORE_CALLBACKS</code> +variable:</p><pre class="programlisting">$ make xref XREF_CHECKS=exports_not_used XREF_IGNORE_CALLBACKS=0</pre></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="concuerror.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="tests.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="plugins.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> </td></tr></table></div> </main> </body> </html> |