aboutsummaryrefslogtreecommitdiffstats
path: root/core
AgeCommit message (Collapse)Author
2018-05-14Fix #757: recompile erl if hrl from another app was updatedStanislav Ovchar
2018-05-07Escape double quotes when passing ERLC_OPTS during testsLoïc Hoguin
2018-05-02Add LATEST_ERLANG_OTP=1 to automatically select the latest buildLoïc Hoguin
I need this for CI because I want to run Dialyzer only against the most recent OTP after tests have passed everywhere. Left undocumented for now. [ci skip]
2018-04-25Fix rebar pre_hooks patchSerhii Kostiushkin
2018-03-14Speed up the git clone download by using shallow downloads.Andreas Krüger
2018-03-05Fetch the version from rebar.lock if not specified in rebar.config2018.03.05Loïc Hoguin
This fixes hackney.
2018-03-01Change to repo.hex.pm, S3 URL is deprecated2018.03.01Eric Meadows-Jönsson
2018-03-01.app.src.script files may return app specification directlyHans Bulfone
(i.e. not wrapped inside a list - rebar3 allows this as well)
2017-11-15Use dep rather than package names in .app filesThomas Nixon
2017-10-23Masquerade the version when {vsn, {cmd, "..."}} is usedLoïc Hoguin
Ew, rebar, again!
2017-10-23Add CONFIG and SCRIPT variables to .app.src.script filesLoïc Hoguin
Ew rebar, geez!
2017-10-19Handle lists in -D compiler switches in autopatchLoïc Hoguin
2017-08-30Support in pattern matching of extra data typeplakshman93
This will support defining macro in `rebar.config.script`. An extra data type pattern matching is added in `dep_autopatch_rebar` function.
2017-08-28Remove stray $t variable2017.08.28Loïc Hoguin
2017-08-23Ensure the current shell knows about PATH when pinning OTPLoïc Hoguin
2017-08-16More improvements to version pinningLoïc Hoguin
The output of kerl will now be printed, and the way we do the recursive invocation for building the Erlang/OTP version we want should be more solid.
2017-08-15Prevent recursion when building a pinned Erlang/OTPLoïc Hoguin
Also add a user friendly message to inform the user of what we are doing.
2017-08-14Add experimental pinning of Erlang/OTP versionLoïc Hoguin
By defining the ERLANG_OTP or ERLANG_HIPE variable, you can let Erlang.mk manage which version of Erlang/OTP will be used for your project. It will build it if necessary, and will activate it automatically when make is invoked.
2017-07-06Fix handling of Rebar's .app.src.script files2017.07.06Loïc Hoguin
2017-05-15Add tweaks and tests for the WITHOUT featureLoïc Hoguin
2017-05-15Add WITHOUT variable to exclude components on buildbenoitc
This allows to ignore lines from the default build.config if needed. For example to not include packages run make WITHOUT=index
2017-05-15Support plugins local to the applicationJean-Sébastien Pédron
If the application's Makefile specify either: DEP_PLUGINS = $(PROJECT) or e.g.: DEP_PLUGINS = $(PROJECT)/mk/dist.mk then load the plugin from the application instead of a dependency. This helps when you have an application with common Erlang modules and Erlang.mk plugins: your common application can load Erlang.mk plugins exactly like other applications depending on the common application.
2017-05-15Add dep_fetch_lnderwinlu
2017-05-15Make autopatch of Erlang.mk projects less obtrusiveLoïc Hoguin
We do not touch the erlang.mk file anymore. We only patch the Makefile to include the top-level Erlang.mk by changing the 'include erlang.mk' line to look for ERLANG_MK_FILENAME if it is defined. The modified Makefile can be committed safely.
2017-05-12Support early-stage plugins through `$(DEP_EARLY_PLUGINS)`Jean-Sébastien Pédron
Regular plugins (`$(DEP_PLUGINS)`) are loaded near the end of Erlang.mk. This is fine when you want to modify variables initialized earlier in Erlang.mk or add new targets and variables. However, it doesn't allow you to declare more dependencies because they are loaded too late for that. This commit introduces a new variable, `$(DEP_EARLY_PLUGINS)`, which can be used to list plugins meant to be loaded near the beginning of Erlang.mk. Those allow to append to the list of dependencies. They work exactly like regular plugins otherwise. The default filename loaded is `early-plugins.mk`.
2017-05-12Make sure the build fails if a docs/rel/test/shell dep failsJean-Sébastien Pédron
Before this change, the build would continue, even if a dependency failed to build. This could lead to obscure errors in the middle of a testsuite for instance. With this change, the build fails immediately, exactly like when a regular dependency fails to build. While here, replace most uses of `|| exit $$?` with `set -e`. This simplifies error handling if we need to add more commands to each blocks. Also, echo error messages to stderr.
2017-05-12core/deps.mk: Move .app in autopatch2 only if file existsJean-Sébastien Pédron
This silences warnings such as: mv: rename file.app to file.app.src: No such file or directory They are harmless really, but still annoying.
2017-04-28Consider all projects with a rebar.lock rebar projectsLoïc Hoguin
2017-04-25core/erlc.mk: added src subfolders support in makedep.erlOleksiy Kebkal
2017-04-25compile apps in the right order by looking at their LOCAL_DEPSJeffrey Griffin
we also use LOCAL_DEPS at the top-level, if it exists, to determine which local apps to compile, in the interest of saving compile time for projects that have many apps and multiple release configurations
2017-04-25fix removing deps.log at toplevel when in a multi-app layoutJeffrey Griffin
`rm deps.log` was not being executed, because of 1) the ifeq around it, checking for an empty ALL_DEPS_DIRS, which i believe was a logical error; and 2) deps depended on apps, which means apps were compiled before its recipe was executed, and the `rm deps.log` would be executed after it had been written to by recursive make of the apps. the important reason to remove deps.log is so that dependencies get remade when they change. otherwise you'll get mysterious errors about missing dependencies if they need to be rebuilt, or worse, have wrong stale beam files bundled in your release. tests core-deps-apps and core-deps-apps-only now manually clean the cowlib dep and rebuild at the top-level to make sure cowlib gets rebuilt. both tests indeed fail without this fix. this attempts to fix #1 by removing the ifeq, and #2 by having deps and apps depend on deps.log, with deps.log 'built' (but actually removed) by a double-colon rule with no prerequisites (which means its recipe always be run).
2017-04-19Move external plugin loading at the end of erlang.mkLoïc Hoguin
This allows all plugins to append to existing variables and makes it easier to augment the functionality of the core plugins.
2017-04-10Only makedep and build asn1/xrl/mib files when necessaryLoïc Hoguin
Because we were unconditionally including the makedep file, it would be built even if the target was unrelated (like "make help"), and it would also trigger building of xrl and other files that produce Erlang code. Instead the makedep file is now included as a wildcard: if it exists it gets included, if it doesn't it's not, and if it's created in the middle of execution it gets included only then. More details on the technique can be found at http://make.mad-scientist.net/papers/advanced-auto-dependency-generation/ A test has been added to make sure the behavior does not come back at a later time.
2017-01-12Set ASN.1 compilation options using ERLC_ASN1_OPTS2017.01.12Klas Johansson
`ERLC_ASN1_OPTS` can be used to pass compiler options when compiling ASN.1 files. By default, Erlang.mk will leave this empty, but it can be redefined in a Makefile.
2016-12-19core/erlc.mk: Quote application name in .appJean-Sébastien Pédron
2016-11-20Only delete ebin when fetching Erlang.mk projectsLoïc Hoguin
Erlang.mk projects either have a .app.src, or just the Makefile with an optional .app file for compatibility.
2016-11-20Better .app autopatch handlingLoïc Hoguin
If we have a .app and a .app.src we delete the .app. If we have a Rebar project with a .app file, rename it to .app.src and continue with autopatch. If we have a non-Rebar project, leave the .app file, and then... For all cases, delete the ebin/ folder after autopatch completes.
2016-11-19Don't autopatch if rebar is mentioned in commentsLoïc Hoguin
2016-10-30Fix running Dialyzer on apps/* when they have depsLoïc Hoguin
2016-10-30Use := instead of = for list of filesLoïc Hoguin
This will make sure we don't look twice. Also make a single call to find the common file formats rather than many calls.
2016-10-28Add "make relup"Loïc Hoguin
The initial documentation is a bit rough. It's getting late and I'd like to have this in sooner rather than later. :-)
2016-10-28Use an intermediate timestamp file to know when to touch source filesJean-Sébastien Pédron
The previous approach spawned a shell for every single source files. As we disable parallel make jobs, this is very time consuming. The new approach uses an intermediate timestamp file in $(ERLANG_MK_TMP) to record the last modification of any of $(MAKEFILE_LIST) and touch all source files in one command. Then, the .app file depends on this timestamp file. We test the existence of this timestamp file: if if doesn't exist, don't touch source files, they will be built anyway. $(PROJECT).d now depends directly on $(MAKEFILE_LIST); before, this dependency was indirect through $(ERL_FILES). Also, once $(ERL_FILES) were touched, we do the same with $(PROJECT).d because there is no need to regen it because of this.
2016-10-27Fix Hex package downloads on FreeBSDLoïc Hoguin
Error has been detected during the nightly packages build.
2016-10-25Use curl to fetch Hex dependenciesLoïc Hoguin
2016-10-25Use curl instead of wget/erl for fetching filesLoïc Hoguin
After a lot of soul searching and experiments, I am opting to using curl for fetching files. It works with very little manipulation on all supported systems. Some might need it installed, but most come with it. While wget was working, it had TLS validation deactivated because some users didn't have CA certificates on their system or wget was not configured properly. This does not seem to be a problem with curl as far as I tested, in particular on OSX. The fallback to use Erlang was also insecure, and probably not the best idea. Let's keep things simple. Curl is required.
2016-10-25core/deps-tools.mk: New targets `fetch-deps` and `list-deps`Jean-Sébastien Pédron
.. to fetch and list deps recurvively. Therefore, they work on direct dependencies, dependencies' dependencies, and so on. Nothing is built with those targets. The following targets are also available to work on other kinds of dependencies: make fetch-doc-deps make fetch-rel-deps make fetch-test-deps make fetch-shell-deps make list-doc-deps make list-rel-deps make list-test-deps make list-shell-deps In all cases, they include "normal" and eg. "test" dependencies of the top-level project, then only "normal" dependencies' dependencies. It's possible to include several kinds in one go: make fetch-deps DEP_TYPES='doc test' make list-deps DEP_TYPES='doc test' As it may be difficult to use the output of `make list-*` because the list could appear after other targets output (like dependencies fetching), the list is available in files pointed by the following variables: $(ERLANG_MK_RECURSIVE_DEPS_LIST) $(ERLANG_MK_RECURSIVE_DOC_DEPS_LIST) $(ERLANG_MK_RECURSIVE_REL_DEPS_LIST) $(ERLANG_MK_RECURSIVE_TEST_DEPS_LIST) $(ERLANG_MK_RECURSIVE_SHELL_DEPS_LIST) Internally, `list-deps` is simply implemented on top of `fetch-deps`: the latter fills a sorted log with all the directories it traversed. `list-deps` finally just prints the log file to stdout. Fixes #560.
2016-10-23Support PROJECT_APP_EXTRA_KEYS to add keys to the .app fileJean-Sébastien Pédron
This allows to add standard keys which do not have a corresponding `PROJECT_` Makefile variable, as well as non-standard keys.
2016-10-21Update Copyright notices2016.10.21Loïc Hoguin
2016-10-21Erlang.mk is rolling releasesLoïc Hoguin
2016-10-21Deprecate Make 3Loïc Hoguin
A warning will be displayed for the time being while we keep compatibility. Also improves installation docs for Unix.