Age | Commit message (Collapse) | Author |
|
Dirty, dirty files!
|
|
This ensures all generated dependencies are prepared and the .d file is
ready before the actual build is started.
|
|
|
|
* Move the .app generation to the .app rule (don't remake it
for no reasons when nothing needs to be done)
* Rever the previous double colon commit; add touch $@ in depend
* Move the creation of ebin/ directory in its own rule
* Temporarily remove the ignore on missing depend file
|
|
https://github.com/rabbitmq/erlang.mk
|
|
|
|
The touch(1) happens after `$(PROJECT).d` is generated. Therefore, with
the next run of make, `$(PROJECT).d` is considered obsolete and
recreated. Source files are touched again, and so on.
This makes the whole project to be rebuilt with every run of make.
|
|
When files are generated, this avoids a warning because the target would
be redefined.
|
|
This is a very large change of a central part of Erlang.mk.
I will admit that I am not quite confident on that one. If
you do have issues following this change, please open a
ticket and I will look at it immediately.
At this point, it works for me, but I wouldn't be surprised
to hear about a few minor issues.
This commit introduces a dependency file $(PROJECT).d which
contains Makefile rules between Erlang source files and
headers, behaviors and parse_transforms. This allows us
to rebuild only the files that are needed.
The $(PROJECT).d is generated automatically when missing,
and when any of the files change.
It is possible to hook before and after this generation,
by defining a $(PROJECT).d:: rule. This allows users to
generate Erlang files which are then compiled by Erlang.mk
automatically (and to track their dependencies, of course).
Here goes nothing...
|
|
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).
|
|
Plugins can automatically be fetched and included from
dependencies. All that is needed is to add either the
dependency name or the name + path of the plugin to the
DEP_PLUGINS variable.
Useful for allowing tools to easily add support for new
targets, adding templates or for putting the whole build
ecosystem in one common dependency.
|
|
Fixes riak_control generating JS files.
|
|
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.
|
|
|
|
This commit does a few things:
* Fix svn and cp fetch methods
* Resolve what commands to run for fetching directly in make
* Make it easier to add fetch methods in the future
* Move legacy fetching into its own method for compatibility
* Don't require three words for hex; two are enough
|
|
|
|
Fix a bug where deps that use erlang.mk didn't have the -Werror
option suppressed automatically.
|
|
|
|
|
|
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.
|
|
Considering vmq_server is the first to use it, I suppose it's new.
Oh well that's just yet another way to specify deps in rebar.config.
:-)
|
|
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.
|
|
I don't recommend relying on it in your applications just yet.
It's not finalized yet. Let's wait and see what happens.
|
|
If you were using the index file as a "lock file",
bear with me for a moment, equivalent functionality
will soon be added. :-)
|
|
|
|
Seems like it works fine for all packages and fix issues
with some that wouldn't compile properly otherwise.
|
|
$$$$ after replace by make is $$ and in bash it is pid of process.
|
|
|
|
|
|
The good news is that these changes work with FreeBSD,
as opposed to before the merges.
|
|
$(MAKE) works everywhere, including space.
|
|
$(MAKE) works everywhere, including FreeBSD.
|
|
|
|
... before writing to it.
This fixes the following error which is logged with a fresh checkout:
/bin/sh: cannot create (...)/.erlang.mk/deps.log: No such file or directory
|
|
Consider the following test:
elif [ 0 != `find ... | xargs grep -ci rebar` ]; then
find(1) may return no file at all and xargs has nothing on its stdin. In
this case, GNU xargs (from findutils) still executes the given command
and grep(1) returns 0.
However, FreeBSD's xargs for instance does not run the command at all if
there is nothing on stdin. Therefore nothing is printed on stdout and the
test becomes:
elif [ 0 != ]; then
This triggers a warning from the shell:
[: !=: argument expected
Prepending both operands with a literal 'x' fixes the problem.
For consistency's sake, I modified the two other tests as well, though
I didn't have any problem with them.
|
|
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).
|
|
|
|
Users need to deploy both client and server to production,
therefore the server needs to be fetched and its folder
named correctly.
|
|
|
|
While this is not quite "just work" due to other packages
depending on a forked off rabbitmq, this is still pretty
good as it actually makes it work and still leaves a choice
between upstream and the fork.
Hopefully people will start to use upstream but you know how
these things tend to go.
|
|
We do this automatically to make the fetching of dependencies
a safer experience. Ensuring it's secure is better than hoping
everyone puts the right URI in their deps.
|
|
We keep track of which dependencies we compiled in the current
session in the $(ERLANG_MK_TMP)/deps.log file.
This will help save a little time when projects depend more than
once on the same dependency. While going in the directory and
running make was already quick, it's quicker if not, and the
logs end up cleaner.
|
|
Was using $(MODULES) instead of $(2).
|
|
Fixes a previous incomplete PR merged by mistake.
|
|
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.
|
|
|
|
|
|
Makes lasp and nkbase work.
|