Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
`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).
|
|
|
|
Because we were unconditionally including the makedep file,
it would be built even if the target was unrelated (like
"make help"), and it would also trigger building of xrl
and other files that produce Erlang code.
Instead the makedep file is now included as a wildcard:
if it exists it gets included, if it doesn't it's not,
and if it's created in the middle of execution it gets
included only then.
More details on the technique can be found at
http://make.mad-scientist.net/papers/advanced-auto-dependency-generation/
A test has been added to make sure the behavior does not
come back at a later time.
|
|
`ERLC_ASN1_OPTS` can be used to pass compiler options when compiling
ASN.1 files. By default, Erlang.mk will leave this empty, but it can
be redefined in a Makefile.
|
|
... not $(ESCRIPT_NAME), which can be set to another value.
While here, add a testcase for `make distclean`.
|
|
Before we had Dialyzer look for BEAM files in every subfolders
of every deps. This resulted in the PLT bundling extra files
and/or Dialyzer failing because some of them are not built with
+debug_info, or because there are duplicates (in test logs for
example). Now Dialyzer will only look in ebin/.
|
|
|
|
|
|
This is a start for moving from Python's Asciidoc to
the Erlang implementation.
Please report any issue with this change, I will fix everything
at lightning speed!
|
|
The plugin can now easily generate escripts as complex as relx
or rebar/rebar3. It generates a proper structure and allows
embedding extra files by extending the escript-zip target.
Documentation and tests have been added.
|
|
|
|
|
|
|
|
The initial documentation is a bit rough. It's getting late and
I'd like to have this in sooner rather than later. :-)
|
|
|
|
* relx-rel
+ check that relx gets downloaded when relx.config exists,
+ check structure of built release
+ check that _rel directory does not get delete by 'make clean'
* relx-run
+ build a simple release, check if it starts and stops normally
* relx-rel-tar
+ check if RELX_OPTS are respected via supplying the 'tar' target
* relx-distclean-relx
+ check that relx executable gets deleted
* relx-distclean-relx-rel
+ check that _rel directory gets deleted
* relx-relup
+ check if relup generation is possible and generated relup is working
add sleeps after calls to async actions of the relx boot script
|
|
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.
|
|
.. 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.
|
|
|
|
|
|
DTL_SUFFIX:
- make sure it is actually used
- add a test for it (and one combined with other options)
DTL_PATH:
- handle correctly with or without trailing /
- don't hard-code the `doc_root` opt - the erlydtl default is better
|
|
|
|
Fix #587
|
|
|
|
|
|
https://github.com/rabbitmq/erlang.mk
|
|
|
|
|
|
Splitting arguments on `-` was dangerous: if a path contained such a
character, it would be split and the second half thrown away by the
filtering.
Now, `$(ERLC_OPTS)` is passed to erl(1) after `-extra`. Thus
arguments parsing is done by the shell and we only have to call
init:get_plain_arguments/0 to get them as a list.
|
|
Replicating the behavior for deps/*.
With refactoring from Loïc.
|
|
|
|
Erlc will not include_lib() apps that do not have an ebin/ directory. This test case demonstrates that.
|
|
|
|
This is a first step toward semi-automated version management.
Cowboy, Cowlib and Ranch still use tags for the time being.
We can make a better update to those when there's a lock
feature added.
|
|
|
|
|
|
|
|
|
|
|
|
Every .erl source file will need at least a -module and a single -export
definition. With the 'module' template a file can be quickly created that
already populates -module with the right value as well as an empty
export field.
|