Age | Commit message (Collapse) | Author |
|
Also remove usage of grep for ignoring files since find
can do this directly.
|
|
Loïc: Added more info to guide.
|
|
|
|
This is still a bit hackish but it appears that some projects
have wrong erl_first_files entries (module exists but not at
the location configured) and so we have to do a bit of
manipulation before we can find the module. We also need
to be cautious about .yrl/.xrl because their corresponding
.erl files may not exist in the repository before compilation
yet can be listed in erl_first_files.
|
|
We use the same strategy as ~= we try to look for the version
in the .lock file and if we can't find it we guess for now.
|
|
Hut has both a Makefile and erlang.mk but the default target
does not build the project. To fix a few packages we have a
special patch HUT_PATCH that will call the appropriate target.
|
|
|
|
|
|
|
|
We expect users to fetch these projects from hex.pm now
and the packages no longer worked.
|
|
Otherwise some dependencies may get the wrong ERLC_OPTS
and may end up with invalid or duplicate options.
|
|
It was removed by mistake.
|
|
|
|
Thanks Luke Bakken for the report!
|
|
This is the case in erlang-systemd [1]. As far as I can tell, the format
is the same for the bits Erlang.mk is interested in.
The testsuite is expanded to use version 0.6.0 of erlang-systemd.
[1] https://github.com/rabbitmq/erlang-systemd
|
|
This reverts commit 1762278d9654e5f90ab587cbde7bac0e2b220014.
|
|
|
|
To reproduce:
```
git clone https://github.com/rabbitmq/inet_tcp_proxy.git
cd inet_tcp_proxy
$ make BRANCH=master QUERY='name fetch_method repo version absolute_path' query-deps
/bin/sh: /home/lbakken/development/rabbitmq/umbrella/deps/inet_tcp_proxy/.erlang.mk/recursive-tmp-deps-231462.log: No such file or directory
rm: cannot remove '/home/lbakken/development/rabbitmq/umbrella/deps/inet_tcp_proxy/.erlang.mk/recursive-tmp-deps-231462.log': No such file or directory
make: *** [erlang.mk:7642: /home/lbakken/development/rabbitmq/umbrella/deps/inet_tcp_proxy/.erlang.mk/recursive-deps-list.log] Error 1
```
|
|
In commit c55d0dcd6182983521d4ab34478cfe4b093edb12, the recipe was
improved to only rebuild out-of-date test files (not everything as it
was the case before).
However in the process, the exit status of the Erlang compiler was not
checked anymore, leading to build failures in the test directory to be
ignored. This patch fixes this bug.
|
|
|
|
... instead of always rebuilding all of them each time a testsuite is
executed.
The only exception is when a Makefile was modified: like for main
source files, test modules are all recompiled in this case.
|
|
In some cases the input will be parsed as UTF-8 and converted
to "characters" and in others it won't and will be processed
as bytes (for example, `erl -oldshell` will do that). This means
that encoding-dependent characters such as "é" only need to be
converted to binary in the former case.
To detect which situation we are in we check what the value of
"é" is. If it is [233] then the eval input was parsed as UTF-8
and converted to characters. Otherwise we assume it wasn't.
|
|
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.
|
|
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.
|
|
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.
|
|
Properly fixes partisan.
|
|
Fixes partisan.
|
|
|
|
|
|
|
|
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.
|
|
They are already listed in `$^` and thus already taken care of. No need
to visit them twice.
|
|
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.
|
|
--first-parent is not available on CentOS 7.
|
|
|
|
... in addition to the `$(force_rebuild_dep)` function.
It's easier for the common use case than specify a function.
|
|
|
|
|
|
|
|
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'
|
|
|
|
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.
|
|
Allow a lack of space in the front. This will of course need
to be handled better eventually.
|
|
... exactly as it is displayed for Git-based dependencies.
|
|
|
|
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.
|
|
For now, ~> is expanded to a full version only.
|
|
|
|
$ must be escaped as $$ in templates.
|
|
|