aboutsummaryrefslogtreecommitdiffstats
path: root/core/deps.mk
AgeCommit message (Collapse)Author
2018-11-24Add the git-subfolder fetch methodLoïc Hoguin
It clones and checkouts like the git fetch method, but does so in the Erlang.mk temporary directory. It then creates a symbolic link to the subfolder for the dependency.
2018-11-23Ensure apps eunit tests only run once when called directlyLoïc Hoguin
2018-06-21Add the version fetched to the DEP lineLoïc Hoguin
Also add a missing space character.
2018-05-14Display the version fetched of dependenciesLoïc Hoguin
It's cheap, can be useful to detect issues, so why not?
2018-04-25Fix rebar pre_hooks patchSerhii Kostiushkin
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-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-07-06Fix handling of Rebar's .app.src.script files2017.07.06Loïc Hoguin
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-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.
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-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-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-21Update Copyright notices2016.10.21Loïc Hoguin
2016-10-19merge PortSpec env into each output envHesaam Farhang
2016-10-09Support C compiler flag overrides for dependenciesFrank Hunleth
This change makes it possible to override the ERL_CFLAGS and ERL_LDFLAGS Makefile variables in project dependencies. For the main project, the ability to override variables associated with C compilation already existed in plugins/c_src.mk. With this change, the C compiler flag semantics are similar for both the main project and dependencies. This is important for cases where the automatically determined values for the ERTS include and library directories are incorrect. This happens in cross-compiled environments where they point to the host's include and library directories. However, the desired behaviour is to have them point to those that have been cross-compiled for the target.
2016-10-04Update rebar (should be correct this time)Loïc Hoguin
2016-10-04Revert "Update rebar in autopatch"Loïc Hoguin
This reverts commit d5c32474e0690a32371fb8fb0b5d2db2c567269b.
2016-10-04Update rebar in autopatchLoïc Hoguin
This should fix some Windows issues.
2016-07-14Build apps/* only onceKrister Svanlund
Replicating the behavior for deps/*. With refactoring from Loïc.
2016-06-09Clean up output from a previous commitLoïc Hoguin
2016-05-17Fix for issue 447.Daniel Goertzen
Create ebin dir for all apps_dir apps before building any of them.
2016-01-24Quote paths in autopatch generated MakefileLoïc Hoguin
Fixes build of a few projects on Windows.
2015-12-29If the rebar binary is present, this is a rebar depLoïc Hoguin
Fixes syslog.
2015-12-16Improve file dependency detectionLoïc Hoguin
One case was added, where a -compile attribute specified a list that included a parse_transform. This affected alog, for example. The COMPILE_FIRST variable is now filled from a digraph. This allows us to keep track of the dependency tree properly, rather than rely on luck. This affected erlando. With both of these changes in, a large chunk of the rebar autopatch code can be removed, the part that concerned the auto detection of file dependencies. On the other hand, we still need to honor the erl_first_files configuration value, otherwise the parse_trans project fails to build. While it would be possible to detect these dependencies automatically too, it's probably too complex to bother, at least for now.
2015-12-15Detect Erlang.mk before RebarLoïc Hoguin
This allows us to avoid autopatching when the Makefile of an Erlang.mk project contains the word "rebar". Had to update elvis and xref_runner to master for now because of incompatibilities. The problem went unnoticed for a while because they were autopatched.
2015-12-14Fix for bcrypt compilation on OSX El CapitanBrujo Benavides
2015-12-09autopatch: do not run autoreconf if configure script already existsJean Parpaillon
2015-12-04Autopatch: handle $(PROJECT).app.src.script filesLoïc Hoguin
This fixes issues when including ErlyDTL in a release.
2015-11-21Merge branch 'late-autopatch' of https://github.com/rabbitmq/erlang.mkLoïc Hoguin
2015-11-21deps.mk: In dep_target, call dep_autopatch during the second evalJean-Sébastien Pédron
... not the first. dep_autopatch can be an expensive macro, in particular because it executes Erlang. So if NO_AUTOPATCH is set, it's best to avoid calling dep_autopatch as the result will be unused anyway. While here, add a test for autopatched rebar-based dependencies.
2015-11-20Merge branch 'set-x-on-verbose-2' of https://github.com/rabbitmq/erlang.mkLoïc Hoguin