aboutsummaryrefslogtreecommitdiffstats
path: root/core/deps.mk
AgeCommit message (Collapse)Author
2020-03-04Add the query-deps family of targets2020.03.05Loïc Hoguin
The query-deps, query-doc-deps, query-rel-deps, query-test-deps and query-shell-deps targets go through dependencies and print some information about them: $ make query-deps ... cowboy: cowlib git https://github.com/ninenines/cowlib 2.7.3 cowboy: ranch git https://github.com/ninenines/ranch 1.7.1 $ make query-deps QUERY="name repo version absolute_path" ... cowboy: cowlib https://github.com/ninenines/cowlib 2.7.3 /path/to/deps/cowlib cowboy: ranch https://github.com/ninenines/ranch 1.7.1 /path/to/deps/ranch The query-deps target is recursive; the others aren't. This mirrors the behavior when fetching and building dependencies. The full list of options is: QUERY="fetch_method name repo version extra absolute_path" When an option has no corresponding value, "-" will be printed. For example most fetch methods do not have extra information to print. When there is extra information, the value will be prefixed with a descriptive name. For example: package-name=uuid_erl This commit also introduces changes to deps handling: some of the functions for querying will now be used directly. In the future the goal is to remove the old dep_name, dep_commit, etc. functions and replace their usage with the new query functions. Custom fetch methods should implement query functions in order to have information about the relevant dependencies printed properly.
2020-02-11Support Hex packages with name different from application2020.02.11Loïc Hoguin
Properly fixes partisan.
2020-02-11Add yet another dep spec format for rebar.config autopatchLoïc Hoguin
Fixes partisan.
2019-06-28Accept a list of deps to forcibly rebuild in `$(FORCE_REBUILD)`Jean-Sébastien Pédron
... in addition to the `$(force_rebuild_dep)` function. It's easier for the common use case than specify a function.
2019-06-24Rename force_rebuilding_dep to force_rebuild_depLoïc Hoguin
2019-06-24Fix the force_rebuilding_dep testLoïc Hoguin
2019-06-24Accept `$(force_rebuilding_dep)` to tune the behavior of `$(FULL)`Jean-Sébastien Pédron
By default, Erlang.mk only builds dependencies once, the first time the top-level project is compiled. A forced rebuild of all dependencies can be forced by setting the `$(FULL)` variable to a non-empty value. For developers working on the top-level project and one or more dependencies at the same time, Erlang.mk now accepts a variable/function called `$(force_rebuilding_dep)` which is called to determine if the dependency passed as the first argument should be forcibly rebuilt. It allows a developer to filter the dependencies he works on (so they are always rebuilt) from other third-party dependencies he never touches (i.e. they are only built once at the beginning). The content of `$(force_rebuilding_dep)` is expected to be a shell one-liner where the `$(1)` Make variable is set to the path to the dependency. Here is an example from the testsuite: force_rebuilding_dep = test '$(1)' = '$(CURDIR)/deps/cowlib'
2019-06-20Small correction to semver conversion for hexLoïc Hoguin
Allow a lack of space in the front. This will of course need to be handled better eventually.
2019-06-20Display Hex dependency version in the "DEP mydep (version)" lineJean-Sébastien Pédron
... exactly as it is displayed for Git-based dependencies.
2019-05-27Do git describe on the right folder for {vsn,git}Loïc Hoguin
2018-12-31Add skeleton compatibility for semver versionsLoïc Hoguin
For now, ~> is expanded to a full version only.
2018-12-11Silence some boring output in autopatched dependencies2018.12.11Loïc Hoguin
2018-12-10Optimization: reduce the number of shell commands on noopsLoïc Hoguin
2018-12-10Correct expanding of shell variables in autopatch againLoïc Hoguin
This solution should work better, previous one would sometimes expand incorrectly and fail.
2018-12-07Autopatch: allow configuring REBAR_GIT and REBAR_COMMITLoïc Hoguin
And use this in the tests to fetch Rebar only once and then clone from the local repository. This should speed up tests a little.
2018-12-07Autopatch: erl_first_files can contain xrl/yrlLoïc Hoguin
2018-12-05Allow hooking before/after autopatchLoïc Hoguin
2018-12-04Remove some repetition in some outputLoïc Hoguin
2018-12-03Don't rebuild dependencies by defaultLoïc Hoguin
Unless it's a symbolic link, it's built directly, FULL=1 is set or the file ebin/dep_built in the dependency is removed. See the documentation changes for more details. This provides immense build speed gains, for example on a RabbitMQ project it went from 10s to 1s for the 2nd+ builds.
2018-11-30Support Elixir as a dependency via ELIXIR_PATCH=1Loïc Hoguin
For example: DEPS = elixir ELIXIR_PATCH = 1 include erlang.mk A language test suite will soon be added with a test for this.
2018-11-30Correct expanding of shell variables in autopatchLoïc Hoguin
The $(...) form was improperly converted. In addition it must be changed into a $(shell ...) form.
2018-11-30Add rebar3 hex package definenevar
2018-11-30Add autopatch for LFE projectsLoïc Hoguin
Currently experimental. It'll enable lfe.mk when it encounters the rebar3 plugin lfe-compile. Tested against some small library. Note that it adds lfe as a build dependency with no version given so the latest master will be fetched right now. This can be overriden in the parent project.
2018-11-29Ignore rebar3 plugins for the time beingLoïc Hoguin
Until it is found that one is needed to compile a project.
2018-11-28Call git describe for {vsn,git} during autopatchLoïc Hoguin
2018-11-27Don't use the non-portable flock -c, use flock sh -cLoïc Hoguin
2018-11-27Fix jobserver unavailable warningsLoïc Hoguin
When the $(MAKE) is inside an $(eval $(call ...)) then it needs to be escaped as $$(MAKE). When the $(MAKE) is inside a $(call ...) then I did not figure out a way other than passing it as an argument. When the $(MAKE) is inside many levels of $(call $(call ...)) it's easier to avoid it if at all possible, so I replaced the rebar $(MAKE) call with ./bootstrap. I confirmed it works fine on Windows as well.
2018-11-26Use flock/lockf when available to avoid a -j issueLoïc Hoguin
Fetching rebar is conditional depending on the project being built, and if two projects require it and -j is used this could mean the fetching happens at the same time and one would fail.
2018-11-25Build issues testing multi-apps projectsLoïc Hoguin
I've reworked how the multi-apps projects are built. In particular I've made sure the test build is made from the top-level once, and then only tests are run on this build. It used to build multiple times and some builds would not include test mode, not good. I've also fixed issues with running tests in parallel. All tests now pass with -j8 on my machine. It's possible more issues remain that are not covered by tests yet though.
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