aboutsummaryrefslogtreecommitdiffstats
path: root/core
AgeCommit message (Collapse)Author
2020-04-12core/test.mk: Build application before its testsJean-Sébastien Pédron
This fixes compiler warnings if modules under `tests` implement behaviors defined in `src`. This way, we make sure behaviors are compiled before the test modules.
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-25Replace +A0 with +A1Loïc Hoguin
In recent versions there has been issues with disabling +A completely. Starting in OTP-23 the VM will automatically use +A1 when the +A0 argument is given, as well.
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.
2020-02-07Copy src/$(PROJECT).appup to ebin/ on build if anyLoïc Hoguin
2019-10-09Use no_dot_erlang instead of start_cleanLoïc Hoguin
2019-08-29Build symlinked source filesLars Kroll
2019-08-29core/erlc.mk: Support non-US-ASCII characters in pathsJean-Sébastien Pédron
Internally, strings were stored using Unicode code points. However, when being written to disk with the `file:write_file()` function, there were converted to ISO-8859-1. According to the documentation, that is because the file module is bytewise-oriented: the conversion to another encoding than ISO-8859-1 is the responsibility of the caller. Using unicode:character_to_binary() permits the script to convert the Unicode string to an UTF-8-encoded binary. Without this patch, the added testcase would fail with the following error: gmake[3]: *** No rule to make target '(...)/erlang.mk/test/h��test_core_makedep_non_usascii_paths/deps/test_core_makedep_non_usascii_paths_dep/include/hello.hrl', needed by 'src/hello.erl'. Stop. In this case, the path (passed from the Makefile to the `makedep.erl` script) contains UTF-8-encoded `é` characters but it was converted when doing the final file I/O.
2019-07-30Recursive deps list: don't handle apps specificallyJean-Sébastien Pédron
They are already listed in `$^` and thus already taken care of. No need to visit them twice.
2019-07-30Fix concurrent creation of `recursive-*deps-list.log` filesJean-Sébastien Pédron
To do that, we simply include the PID of the Make process in temporary file. We also compare the finished temporary file with the actual target file. If they are different, the temporary file is moved to the final target, otherwise, we just get rid of the temporary file. This way, the target timestamp stays the same if the content does not change.
2019-06-30Make a "git describe" fall back for older git versionsLoïc Hoguin
--first-parent is not available on CentOS 7.
2019-06-29Filter out master when getting the LATEST_ERLANG_OTPLoïc Hoguin
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-26Fix "make eunit/ct" not fetching apps dependenciesLoïc Hoguin
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-22Use forward slashes in the Windows pathsLoïc Hoguin
2019-06-21Include applications `$(APPS_DIR)` in the `list-deps` targetsJean-Sébastien Pédron
In the case of a multi-applications repository, if one application depends on another one (using `$(LOCAL_DEPS)`), it will now be listed in the `list-deps` targets. Add `ssl` to the `$(LOCAL_DEPS)` in the testcase to ensure that applications not in `$(APPS_DIR)` are not affected by this change. Add a changelog entry.
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
2019-01-02Fix rebuild on Makefile change when new deps are addedLoïc Hoguin
The issue was that when a new dep is added the last-makefile-change update was done in the dependency and not in the top-level Makefile, preventing the rebuild of the top-level project. A test was also added to do the same when editing dependencies and things seem to work properly in that case. Thanks to robinchew on IRC for the great help debugging this.
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-11Fix a bug where ct-* targets produced an empty GEN lineLoïc Hoguin
$ must be escaped as $$ in templates.
2018-12-10Make the version warning less repetitiveLoï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-07core_find: Ignore files with spaces to avoid issuesLoïc Hoguin
2018-12-07Autopatch: erl_first_files can contain xrl/yrlLoïc Hoguin
2018-12-05Implement the dep_built optimization for test/shell depsLoïc Hoguin
2018-12-05Better handle ERLANG_OTP and ERLANG_HIPELoïc Hoguin
A release that gets removed in a ci:: preceding the running of CI rules would end up not rebuilding it due to how a warning was silenced when using ERLANG_OTP.
2018-12-05Allow hooking before/after autopatchLoïc Hoguin
2018-12-04Remove some repetition in some outputLoïc Hoguin
2018-12-04Delete $(ERLANG_MK_TMP) directory after 'make erlang-mk'Loïc Hoguin
This allows refreshing tools at the same time Erlang.mk gets updated.
2018-12-04Add a V=3 that works like V=2 across all shell commandsLoïc Hoguin
V=2 only works against target commands, V=3 will also work against $(shell ...) commands.
2018-12-03Print a changelog when updating Erlang.mkLoï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-30Validate the .app file after generating itLoïc Hoguin
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-29Add the target help-plugins to document external pluginsLoïc Hoguin
It's better than extending help:: because this gets printed at the end instead of before Erlang.mk's own help.
2018-11-28Call git describe for {vsn,git} during autopatchLoïc Hoguin
2018-11-28Fix asn1 compilation with the +maps optionLoïc Hoguin
When this option is used no include file is generated. Therefore don't error out if no include file can be found.