Age | Commit message (Collapse) | Author |
|
Erlang.mk projects either have a .app.src, or just the Makefile
with an optional .app file for compatibility.
|
|
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.
|
|
|
|
|
|
This will make sure we don't look twice.
Also make a single call to find the common file formats
rather than many calls.
|
|
The initial documentation is a bit rough. It's getting late and
I'd like to have this in sooner rather than later. :-)
|
|
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.
|
|
Error has been detected during the nightly packages build.
|
|
|
|
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.
|
|
.. 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.
|
|
This allows to add standard keys which do not have a corresponding
`PROJECT_` Makefile variable, as well as non-standard keys.
|
|
|
|
|
|
A warning will be displayed for the time being while we keep
compatibility.
Also improves installation docs for Unix.
|
|
|
|
Fix #587
|
|
|
|
|
|
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.
|
|
|
|
This reverts commit d5c32474e0690a32371fb8fb0b5d2db2c567269b.
|
|
This should fix some Windows issues.
|
|
Replicating the behavior for deps/*.
With refactoring from Loïc.
|
|
|
|
|
|
Create ebin dir for all apps_dir apps before building any of them.
|
|
|
|
|
|
|
|
Extended Mode uses { and } as special characters. Making grep
implementations other then GNU grep fail (see
http://www.gnu.org/software/grep/manual/grep.html#Basic-vs-Extended).
|
|
|
|
|
|
Fixes build of a few projects on Windows.
|
|
|
|
For easier reusability in Erlang.mk and plugins.
|
|
When preparing erlc_opts, remove all comma/whitespace pairs instead of
just the first
|
|
Fixes syslog.
|
|
Also includes a fix for multi-application repositories.
|
|
Rebuilding cleanly first prevented rebuilding in test-mode again.
|
|
This makes i18n work. It worked before, but I didn't know,
and broke it. Next commit will add i18n to the index to
ensure this doesn't happen again.
|
|
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.
|
|
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.
|
|
|
|
|
|
This fixes issues when including ErlyDTL in a release.
|
|
|
|
... 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.
|
|
|
|
We can now use 'make -j 32' again. All tests pass. There might
be some issues left with the areas that are not fully tested
yet (some plugins).
A few changes in behavior:
* 'make app' will also do 'make deps' unless SKIP_DEPS is set.
You can use 'make app-build' instead to just build the application.
* 'make rel' will also do 'make app' (and therefore deps). There
are no alternative target to keep the old behavior at this time.
|