Age | Commit message (Collapse) | Author |
|
The initial documentation is a bit rough. It's getting late and
I'd like to have this in sooner rather than later. :-)
|
|
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.
|
|
|
|
|
|
A warning will be displayed for the time being while we keep
compatibility.
Also improves installation docs for Unix.
|
|
Fix #587
|
|
Replicating the behavior for deps/*.
With refactoring from Loïc.
|
|
|
|
Rebuilding cleanly first prevented rebuilding in test-mode again.
|
|
|
|
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.
|
|
https://github.com/rabbitmq/erlang.mk
|
|
If the local build.config has changes compared to upstream's
master branch, and $(ERLANG_MK_COMMIT) also brings changes to this
file, copying the local file to the checkout before switching to
$(ERLANG_MK_COMMIT) caused git-checkout(1) to abort with:
error: Your local changes to the following files would be overwritten by checkout:
build.config
Please, commit your changes or stash them before you can switch branches.
Aborting
While here, fix `core-upgrade-custom-repo` test case: without switching
back the alternate erlang.mk repository to its master branch, the clone
always got the test-copyright branch by default, making the
ERLANG_MK_COMMIT check ineffective.
|
|
The `-n` flag is not standard and not portable. It is supported by many
Bourne shell to suppress the trailing newline character. But some old
shells do not support this and "-n" is printed.
This is the case for instance on some old versions of Mac OS X where
`/bin/sh` is Bash 3.2.
|
|
|
|
|
|
This changes adds Rebar-like "apps/" functionality.
From this commit onward, Erlang.mk supports 4 types of repositories:
- Repo with an Erlang app at root level + deps/
- Repo with an Erlang app at root level + apps/ deps/
- Repo with no app at root level + deps/
- Repo with no app at root level + apps/ deps/
Example usage:
- make new-app in=webchat
- make new t=gen_server n=my_chat in=webchat
- make
Replace new-app with new-lib to create an OTP library instead of
an OTP application.
|
|
OSX find has this terrible behavior:
$ find test/core_app_asn1/src/ -type f -name \*
test/core_app_asn1/src//CAP.erl
test/core_app_asn1/src//Def.erl
test/core_app_asn1/src//use_cap.erl
test/core_app_asn1/src//use_def.erl
It's been long fixed everywhere else. Change the core_find function
to remove the trailing / if any before calling find.
|
|
|
|
This makes a lot of Erlang.mk work on Windows under the msys2
environment. The msys2 environment is damn close to native,
so it will most likely be good enough for a lot of folks.
|
|
Removes $(ERLANG_MK_TMP) directory on distclean.
* add distclean-tmp target
* add core-clean-tmp test
|
|
|
|
|
|
|
|
Native find is much faster. As for future Windows work,
this is no problem, as the retained solution involves
using find.exe from GnuWin.
|
|
Two reasons for doing this:
* The current solution for enforcing sequential operations makes
a lot of things slower. Either we do it properly or we don't.
* Most of Erlang.mk is sequential by nature. There is very little
to gain from Make's own parallel building. Something more
interesting would be to enable fetching of dependencies
concurrently by other means, and enable compilation of
Erlang files concurrently (requires patching OTP).
|
|
Among the improvements:
* Work with current versions of ErlyDTL
* Add DTL_PATH, defaulting to templates/
* Add DTL_SUFFIX, defaulting to _dtl (suffix of output module names)
* Simplify the Erlang code and port to the erlang function
The erlang function can now accept any command-line argument for
erl as optional second argument.
|
|
Currently build.config can be placed in a different directory via
something like:
ERLANG_MK_BUILD_CONFIG = tools/build.config
but if the name is changed:
ERLANG_MK_BUILD_CONFIG = .erlang-mk.config
it will be ignored.
|
|
|
|
By default templates use tabs. Unfortunately there are misguided
heretics who prefer spaces. Bummer.
Two variables are introduced:
* SP=<number> can be set to use <number> spaces per indentation level.
* WS=<string> can be set to use <string> for each indentation level.
Most users will just want to use SP, for example:
make new t=gen_server n=my_server SP=4
Note that people who want tabs don't have to do anything; tabs
are still the default.
WS is reserved for advanced users. Normal Make rules apply: all
whitespaces are trimmed. To specify 4 spaces using WS, you can
do the following:
make new t=gen_server n=my_server WS='$(empty) $(empty)'
Ugly, right? So just use SP.
Finally, SP and WS can be put in your Makefile directly.
In fact, erlang.mk will automatically add SP to a newly
created project if it was used during creation. For example:
make -f erlang.mk bootstrap SP=2
So in time we should only need to make a note in the docs
at project creation time, as there is very little value
after that point.
|
|
This commit implements a core_find and core_ls function that
can be used to list files recursively or not.
A few other minute changes are included and a couple hacks
removed.
|
|
If you were using the index file as a "lock file",
bear with me for a moment, equivalent functionality
will soon be added. :-)
|
|
This will fix some issues where a symbolic link can link
to another symbolic link (Cowboy examples), and issues
where symbolic links can't be used (VirtualBox shared
folders).
|
|
This removes the need for a .app.src file entirely.
The PROJECT_* variables and the OTP_DEPS variable
allow us to specify everything we need.
REL_DEPS and BUILD_DEPS will be added later on to
allow users to cleanly specify those without adding
them to the .app file.
|
|
Necessary for increased compatibility as we de-rebarize
those dependencies.
|
|
This allows us to skip some of the worst hacks and improve
compatibility since we are using the original code.
|
|
|
|
|
|
|
|
|
|
|
|
Should only be used during development. Stolen idea from
Tristan Sloughter who stole it from Ahmad Sherif.
This commit also introduces the 'erlang' function for
executing Erlang code written directly in the Makefile.
The rest of the project will eventually move to using it
as it's much cleaner than the previous solution.
|
|
Compiles, runs tests and runs all sorts of analysis like Dialyzer.
|
|
|
|
Also added a copyright line in the eunit plugin due to the
extensive work I have done there a few days ago.
|
|
The general idea is that erlang.mk now keeps track of what kind
of build it generated. A test build is valid for all subsequent
test target invocations. A normal build is only valid for itself
and releases.
This rework adds the ability to specify deps to eunit.
The EUNIT_DIR variable is gone in favor of a more global TEST_DIR.
The tests-ct target got renamed to ct and documented.
Many more minor changes were done during the course of testing
these changes.
|
|
No more plugin stuff creeping into core.
|
|
|
|
Use "+A0 -noinput -boot start_clean" as start argument.
Use halt/{1,2} to shutdown the VM faster.
|