Commit graph

899 commits

Author SHA1 Message Date
Max Lapshin
8666d57d78 Expand variables in replace overlay 2011-04-29 14:58:31 +04:00
Tuncer Ayaz
f51e3df3b9 Add missing newline in port_compiler debug msg 2011-04-28 18:39:46 +02:00
Tuncer Ayaz
61c564bf72 Update mustache.erl 2011-04-27 10:19:34 +02:00
Andrew Thompson
2e654513dd Fix eunit regression (reported-by Alexander Dorofeev) 2011-04-23 17:17:49 +02:00
Tuncer Ayaz
98312c881f Adjust deprecation message 2011-04-21 22:03:40 +02:00
Tuncer Ayaz
20dfd32c85 Add support for command-specific env for hooks 2011-04-21 21:38:16 +02:00
Dave Smith
85eb2957c3 Add list-deps command 2011-04-21 06:08:40 -06:00
Evax Software
447417098a Support settable plt dir for dialyzer
Allow rebar to use dialyzer plt files from an alternate directory
through the use of the REBAR_PLT_DIR environment variable.
2011-04-12 15:46:15 +02:00
Tuncer Ayaz
67af251d52 Remove lfe_opts (suggested by Tim Dysinger) 2011-04-11 14:08:39 +02:00
Dave Smith
bda6ee0e48 Centralize variable resolution; add target_dir variable 2011-04-10 16:12:50 -06:00
Dave Smith
4dc2414d89 Add support for priv/<vcs.vsn> as fallback for version info 2011-04-10 16:12:50 -06:00
Dave Smith
c4907b6297 Add support for loading template vars from external file 2011-04-10 16:12:50 -06:00
Dave Smith
3e2baf1a07 Add support for template_wildcarding; allows files from many directories to be templated. 2011-04-10 16:12:50 -06:00
Dave Smith
b7111dce85 Refactor overlay_vars to enable overrides from command-line 2011-04-10 16:12:50 -06:00
Dave Smith
4be3631687 Make sure to pass dir of app when invoking git; enhance shell logging output 2011-04-10 16:12:50 -06:00
Tuncer Ayaz
055ac99d6f Deprecate fail_on_warning and refactor code 2011-04-07 21:56:53 +02:00
Tim Watson
2d385970bf Pass extra params to ct (thanks Mickael Remond)
This patch adds a `ct_extra_params` option to rebar.config, the value
of which is appended to the shell command when executing common test.
2011-04-06 20:11:13 +02:00
Andrew Thompson
310a1bb7ea New eunit param skip_app, allow suite to be a list
This patch allows the 'suite' argument to eunit to be a comma separated
list of modules to test instead of being a single module. This allows
fine-grained testing when one test suite interferes with another and its
not clear which suite is causing the problem. It also lets you run the
test suite in a different order for a similar reason.

The other enhancement is to add a new eunit parameter; 'skip_app' which
like 'app' is a comma separated list of modules to skip testing on. This
parameter is only applied if the app parameter is not passed. Its
purpose is to avoid forcing you to specify all the apps to test if you
only want to skip a handful and there are many apps to test.
2011-04-06 18:56:35 +02:00
Tuncer Ayaz
153aabee9b Use infinite receive (thanks Hakan Mattsson) 2011-04-04 16:39:05 +02:00
David Reid
300a4ac22e Use abort in check-plt and update doc 2011-04-02 17:57:13 +02:00
Tuncer Ayaz
be209f24ff Make debug_info default
Add no_debug_info option.
Remove debug_info=1 option.
2011-03-30 11:19:37 +02:00
Tuncer Ayaz
6d75bfbeb0 Clean up specs 2011-03-28 18:39:38 +02:00
Jordi Chacon
e684af36f0 Fix bug: xref should be stopped after being run
Xref not being stopped caused a crash in subsequent xref runs.
2011-03-26 12:25:25 +01:00
Tuncer Ayaz
2ee4899d24 Fix code clarity and formatting 2011-03-22 11:12:57 +01:00
Shunichi Shinohara
cd3653616b Fix ct include option prefix 2011-03-22 11:08:45 +01:00
Tuncer Ayaz
fa38ed64cc Simplify find_dep_in_dir 2011-03-13 15:55:36 +01:00
Tuncer Ayaz
85e820096d Fix comments 2011-03-13 14:11:24 +01:00
Tuncer Ayaz
4ceb9e07a3 Deprecate old hooks 2011-03-12 16:48:16 +01:00
Tuncer Ayaz
bc98a4820e Simplify hook changes to rebar_core 2011-03-12 16:32:44 +01:00
Tim Watson
e76770511a Add pre and post script support for all commands
This change makes it possible to assign pre/post scripts to all
rebar commands. This allows users fine grained control over
when scripts and/or shell commands should be executed, where such
extensions are absolutely needed.

Several examples have been added to the rebar.config.sample file.
2011-03-12 16:31:41 +01:00
Tuncer Ayaz
81be474c30 Fix regression (thanks Anthony Molinaro) 2011-03-07 20:16:29 +01:00
joewilliams
0f99ba2280 Fix bug that causes appup generation to fail
This commit changes how rebar determines which apps have been
updated, added and removed from a release during appup generation.
Rather than use app files it now determines this from the rel file
in each version of the release. In addition it fixes a bug reported
on the mailing list when generating appups when an application has
been added or removed from either release.
2011-03-03 16:02:37 -08:00
Christopher Brown
0a603435f5 honor local deps before code path 2011-03-02 21:06:30 -08:00
Juan Jose Comellas
58661a92e2 Convert the entries in the code path to absolute paths
Rebar will exit with {error,bad_directory} when trying to restore the code
path after it has finished working on a subdirectory if there are invalid
relative paths in it. The problem was seen when executing the last line of
rebar_erlc_compiler:doterl_compile/3 (true = code:set_path(CurrPath)).
2011-02-26 15:57:17 +01:00
joewilliams
90d2ce5e07 Ignore app files not in ebin 2011-02-25 18:38:50 +01:00
Tuncer Ayaz
2cff499a34 Fix regression in rebar_lfe_compiler 2011-02-22 17:28:49 +01:00
Tuncer Ayaz
3356c2d9e8 Use erlang:function_exported/3 2011-02-21 17:42:10 +01:00
Tuncer Ayaz
c6f6e8a572 Fix Dialyzer warning and slightly reformat code 2011-02-21 15:43:07 +01:00
Tim Dysinger
6f97e6e55b Add up to date instructions in case LFE is missing 2011-02-21 15:29:50 +01:00
Tim Dysinger
5049da8ec4 Add fail_on_warning support for LFE 2011-02-21 15:29:25 +01:00
Tim Watson
3db8f585f1 Add -spec support to rebar_ct command line
This change adds support for executing ct test runs based on test
specificiations, which was missing previously. The rebar_ct module
now looks for any number of files with a name ending in `test.spec`
and if it finds one or more, passes these after the `-spec` argument
to ct_run instead of explicitly configuring the config, user config
and coverage config variables.

When no specifications are found, then the module behaves as it did
before this change, and both the ct1 and (new) ct2 integration tests
appear to show this is a backwards compatible patch.
2011-02-21 15:08:24 +01:00
Dave Smith
6056c63eed Clean up and simplify {vsn, VCS} support 2011-02-18 10:59:57 +01:00
Tuncer Ayaz
01a7473dac Add {vsn,Vcs} support for bzr, hg and svn 2011-02-17 19:23:43 +01:00
Adam Kocoloski
b0860da124 Expand {vsn,git} in app.src to git-describe output 2011-02-17 19:17:28 +01:00
joewilliams
1e9b2b844b Clean up trailing whitespace 2011-02-17 10:12:32 -08:00
joewilliams
4e8dcfbfad Clean up rebar_appups and rebar_upgrade 2011-02-17 17:13:19 +01:00
Tuncer Ayaz
377c9e86d5 Add PropEr support 2011-02-16 17:36:11 +01:00
joewilliams
c6da0b3ef6 Fix generate-appups regression (atom vs list) 2011-02-16 17:07:12 +01:00
joewilliams
11bf6b4aab Add 'generate-appups' command
To further support OTP releases I have added support for generating
application appup files. These include instructions that systools uses
to generate a relup file which contains the low level instructions
needed to perform a hot code upgrade. My goal with this module is to
produce "good enough" appup files or at least a skeleton to help one get
started with something more complex. If an appup file already exists for
an application this command will not attempt to create a new one.

Usage:
$ rebar generate-appups previous_release=/path/to/old/version

Generally this command will be run just before 'generate-upgrade'.
2011-02-15 18:33:18 +01:00
Anthony Ramine
9ee8ed9181 Give an absolute path to code:add_path/1
If an app uses -include_lib for its own included files, compilation
fails if the app directory isn't in $ERL_LIBS because code:lib_dir/1
will return an error. An absolute path needs to be added to code path
instead of just "ebin".
2011-02-15 18:32:42 +01:00
Tuncer Ayaz
b70f374f89 Remove export_all directive 2011-02-13 16:38:04 +01:00
Joseph Wayne Norton
e4cd50e2a3 Add eunit_first_files option 2011-02-13 16:26:48 +01:00
David Reid
3241165ced Support 2 forms of implicit HEAD for git
In git origin/HEAD is a pointer to the default branch.  This patch
allows two alternatives to explicitly specifying "HEAD" in git VC specs.

The first is a 2 arity form {git, Url} and the second is {git, Url, ""}
which worked in pre-update-deps rebars.
2011-02-13 16:05:42 +01:00
Tuncer Ayaz
63de05d914 Clean up code 2011-02-06 17:41:04 +01:00
Tuncer Ayaz
c466076ffb Clean up emacs file local variables 2011-01-31 17:55:36 +01:00
Tuncer Ayaz
0e729bf90e Fix Dialyzer warnings in rebar_upgrade 2011-01-29 16:18:14 +01:00
Tim Watson
7ac3a5aa9b Move BUILD_TIME and VCS_INFO macros
I have moved these macros from rebar_core.erl to rebar.erl
in order to prevent eunit tests from failing (which they
currently are).
2011-01-29 16:16:37 +01:00
Tuncer Ayaz
926baa1c31 Use filename:join instead of ?FMT 2011-01-28 20:15:22 +01:00
Tuncer Ayaz
8f5bfea9c4 Fix help: previous_release is mandatory 2011-01-28 19:05:20 +01:00
joewilliams
5298e93a18 Add 'generate-upgrade' command
To support OTP release upgrades I have added support for building
upgrade packages. Support for this is included in the
rebar_upgrade module, specifically generate_upgrade/2. It requires
one variable to be set on the command line 'previous_release' which
is the absolute path or relative path from 'rel/' to the previous
release one is upgrading from. Running an upgrade will create the
needed files, including a relup and result in a tarball containing
the upgrade being written to 'rel/'. When done it cleans up the
temporary files systools created.

Usage:
$ rebar generate-upgrade previous_release=/path/to/old/version

This also includes a dummy application that can be used to test
upgrades as well as an example.

Special thanks to Daniel Reverri, Jesper Louis Andersen and
Richard Jones for comments and patches.
2011-01-27 18:37:39 +01:00
Tuncer Ayaz
3fd3bfc89a Fix circular dependency 2011-01-27 15:57:55 +01:00
Dave Smith
a8066b35a9 Use an order independent method for exact matches when looking for command candidates 2011-01-25 21:29:08 -07:00
Klas Johansson
6978504d43 Add support for abbreviated command names
This change makes it possible to type the beginning (the prefix) of a
command name and rebar will guess the full name of the command,
thereby saving the user precious keystrokes.  As long as the prefix
matches only one command, rebar runs that command, otherwise rebar
prints a list of candidate command names. The "-" character is
considered to be a word separator and the prefix matching is done per
word.

Example prefix matches:

    co       ==> compile
    cl       ==> clean
    create   ==> create
    create-a ==> create-app
    c-a      ==> create-app
    c-app    ==> create-app
2011-01-24 17:18:33 +01:00
Tuncer Ayaz
d1ff83a898 Move command line handling funs into rebar.erl 2011-01-24 17:17:23 +01:00
Tuncer Ayaz
a3615a4b82 Update getopt 2011-01-23 16:05:25 +01:00
Andrew Tunnell-Jones
b52b82cc29 Add support for arch specific port_sources
On one project I have a need to specify port_sources on R14 only
and on another different project port_sources for Darwin and Linux.
To this end add support to handle tuples of the form
{ArchRegex, PortSource} in the port_sources list, eg:

    {port_sources, [{"R14", ["c_src/*.c"]}]}.
2011-01-17 16:57:46 +01:00
Tuncer Ayaz
8940f07801 Fix underspec (thanks Kostis Sagonas) 2011-01-13 17:39:14 +01:00
Tuncer Ayaz
932eb2e343 Simplify rebar_core 2011-01-13 17:39:14 +01:00
Tuncer Ayaz
ebcae06928 Fix grep invocations 2011-01-13 17:39:14 +01:00
Tuncer Ayaz
bb6731208e Fix indentation in rebar_ct 2011-01-13 17:39:14 +01:00
Tuncer Ayaz
3b0568ebb7 Simplify and cleanup rebar_templater 2011-01-13 17:39:14 +01:00
Tuncer Ayaz
150c9d0b47 Simplify and cleanup rebar_xref 2011-01-13 17:39:14 +01:00
Tuncer Ayaz
e4036cbe56 Apply Tidier suggestions 2011-01-13 17:39:14 +01:00
Tuncer Ayaz
d922985b36 Fix typos 2011-01-13 17:39:14 +01:00
Tuncer Ayaz
58fd80917a Fix file existence checks 2011-01-13 17:39:14 +01:00
Tuncer Ayaz
a8870807fc Fix code clarity 2011-01-13 17:39:14 +01:00
Joseph Wayne Norton
5b05e54cda Add otp_release to platform string 2011-01-09 16:06:51 +01:00
Tuncer Ayaz
5a37149642 Fix Dialyzer warning 2011-01-09 09:46:08 +01:00
Tuncer Ayaz
220eec71f6 Remove unused fun rebar_utils:get_os/0 2011-01-09 09:45:43 +01:00
Tuncer Ayaz
46b2c0612e Fix bug 770 2011-01-08 19:20:40 +01:00
Tuncer Ayaz
422beee324 Return more descriptive dependency errors 2011-01-06 15:50:16 +01:00
Juhani Rankimies
9441251f9f Use file:change_mode/2 instead of invoking chmod 2011-01-06 15:02:23 +01:00
Juhani Rankimies
52ca7795fe Unify executable invocation
Add flags to rebar_utils:sh to control output and error handling.
Replace calls to os:cmd with calls to rebar_utils:sh.
2011-01-06 15:02:19 +01:00
Charles McKnight
f83f18eb3b Fix error where ebin was created as a file
This patch remedies an issue where the ebin directory would be
erroneously created as a file by the first "mv" command in
rebar_protobuffs_compile.erl [line 106] if the ebin file did not
exist at the root application level.

In essence, the patch ensures that the ebin directory exists at
the application directory level before any "mv" commands are
executed. The following code was inserted at line 106:

    ok = filelib:ensure_dir(filename:join("ebin","dummy")),
2011-01-06 12:30:32 +01:00
Tuncer Ayaz
9c0d51bc0b Fix order of erl_opts to be more accurate 2011-01-04 11:27:17 +01:00
Joseph Wayne Norton
a529577b74 Remove erlc target after fail_on_warning failure
Prevent overlooking a compilation warning by removing the target beam
file after fail_on_warning failure.
2010-12-27 13:29:53 +01:00
Anthony Ramine
008dcb8542 Add abnfc support
abnfc is an ABNF parser generator.
Options are:
	- doc_root (defaults to "src")
	- out_dir (defaults to "src")
	- source_ext (defaults to ".abnf")
	- module_ext (defaults to "")
2010-12-22 17:57:21 +01:00
David Reid
63d5ceb61d Support single level of nested template variables
Add support for defining template variables of the following form:

{variables, [{appid, "mochiwebapp"},
         {author, "Mochi Media <dev@mochimedia.com>"},
         {year, "2010"},
         {version, "0.1"},
         {port, 8080},
         {dest, "{{appid}}"}]}.

Where dest may be overridden on the commandline but will default to
being the appid. Mochiweb uses this so that we can create new
projects from the template in a configurable directory.

So

$ rebar create template=mochiwebapp dest=foo appid=bar

I thought about special casing dest but figured it might be generally
useful to be able to nest template vars.

However this patch only does one level of resolution. So if

{variables, [{foo, "{{bar}}"},
                {bar, "{{foo}}"}]}.

then bar will end up being the literal string {{bar}} and foo the
literal string {{foo}}.
2010-12-22 17:56:52 +01:00
Dave Smith
9b0d35d986 Adding support for app_vars in external file 2010-12-20 08:55:31 -07:00
Tuncer Ayaz
d8e50e8c2d Implement update-deps and disable auto update 2010-12-17 12:39:50 +01:00
Anthony Ramine
9ecc3455bf Fix typo in rebar_erlydtl_compiler 2010-12-16 15:40:15 +01:00
klaar
48ee15c7e7 Fix conversion of boolean atom to string
mustache:render("{{banan}}", dict:from_list([{banan, true}])).

** exception error: no function clause matching mustache:escape(true,[])
     in function  erl_eval:do_apply/5
     in call from erl_eval:expr/5
     in call from erl_eval:expr/5
     in call from mustache:render/3
2010-12-09 23:28:05 +01:00
Benjamin Nortier
ab4e0a32ab Add rebar code path to common test code path 2010-12-09 00:20:54 +01:00
Tuncer Ayaz
07269ebdb9 Add VCS dir check for bzr and svn 2010-12-07 19:32:58 +01:00
Dave Smith
3e12630f23 Check for VCS directory before attempting source update. 2010-12-07 10:38:00 -07:00
Tuncer Ayaz
0bb429c197 Fix code clarity 2010-12-07 01:03:17 +01:00
Mihai Balea
837192e34e Fix compilation of *_first_files
- Check the existence of first_files and fail if they are not present
 - Get first_files lists from local instead of inherited config
   definitions, since they only make sense in the local context
2010-12-01 17:30:23 +01:00
Adam Kocoloski
8118083122 Return descriptive errors from is_app_available() 2010-11-30 01:18:48 +01:00
Joseph Wayne Norton
d24021f4e3 Add new global flag 'debug_info' to erlc_compiler
Using rebar's commandline, enable/disable 'debug_info' for
compilation. This feature if added to all rebar compilers could help
simplify and standardize this common use case for all rebar build
targets.
2010-11-30 00:24:20 +01:00
Joseph Wayne Norton
e36783112d Support dialyzer plt paths having "~/" as a prefix
e.g. {dialyzer_opts, [{plt, "~/.dialyzer_plt.R14B"}]}.
2010-11-23 19:03:56 +01:00
Juhani Rankimies
fe664e8c50 Fix bug 805
Use rebar_utils:find_executable/1 that wraps the
path in quotes to make it work even if it contains
whitespace.
2010-11-22 23:48:28 +01:00
Misha Gorodnitzky
064195dc5a Fix git tag and branch dependency handling
Change git downloads and updates to not create branches and fix git
tag handling.
2010-11-20 23:32:49 +01:00
Daniel Néri
72cdcd9573 Remove mention of "clean" command from rebar_edoc 2010-11-14 13:35:14 +01:00
Daniel Néri
6785c16f02 Fix EDoc syntax errors 2010-11-14 13:32:30 +01:00
Anders
513ae33c5c Add possibility to specify rebar config for the "main" application 2010-11-09 20:19:38 -07:00
Anders
c604d85ed5 Create ebin directory if it is missing for deps 2010-11-09 20:19:38 -07:00
Andrew Thompson
5158f9531d Stop clean from erroring if there's no .app file
If rebar tries to clean the .app file (because there's a .app.src file)
and it doesn't exist (possibly because of a bad compile), don't fail.
2010-10-29 11:52:20 -04:00
Andrew Thompson
ff5a7982eb Improve error logging when running a command fails
Make the error message newline terminated and, if possible, log the name
of the module in which the failure occured.
2010-10-29 11:52:13 -04:00
Juhani Rankimies
fd5ebe69a4 Port rebar_file_utils to Windows
Modify rm_rf and cp_r to work when {win32,_} = os:type().
Simplify rm_rf to only accept one filename, directoryname or wildcard.
Add unit tests to ensure a similar behaviour on windows and unix.

Thanks to tuncer for guidance and feedback.
2010-10-27 11:39:12 -06:00
Juhani Rankimies
75fc2378bf Remove unused functions from rebar_file_utils
mkdir_p/1 and ln_sf/2.
2010-10-27 11:39:12 -06:00
Kostis Sagonas
7dc76d578e Tidier improvements 2010-10-26 00:38:51 +02:00
Tuncer Ayaz
1a577fcd43 Clarify rebar_utils:ensure_dir/1 comment 2010-10-25 23:09:37 +02:00
Tuncer Ayaz
2d2aed627f Refactor Dialyzer support to make it more usable 2010-10-25 22:37:18 +02:00
Dave Smith
7ddd4bdaad Fixed 819; removed the edoc clean function entirely in favor of requiring user to explicitly specify what files should be deleted.
If there is no convention or way to programatically figure out what files to process, don't guess.
2010-10-25 06:31:07 -06:00
Tuncer Ayaz
1690139be9 Match ok result of filelib:ensure_dir/1 2010-10-22 22:12:25 +02:00
Dave Smith
67d4fbf337 Add support for overriding the default name/location of the escript; add support for cleaning generated script file
--HG--
extra : rebase_source : 466f440dcb699e031c5c520d28ee7731b60c535a
2010-10-19 14:21:41 -06:00
David Reid
968ef1cc77 First pass at updating dependencies (svn, hg, bzr untested) 2010-10-03 08:22:47 -07:00
Oscar Hellström
8ea62597ff Use eunit_dir() instead of ?EUNIT_DIR since the function exists.
The eunit_dir() does use the ?EUNIT_DIR macro internally, but it also builds, what I guess is, an absolute path, which might be better :) At least it's more consistent.
2010-08-24 21:59:59 +02:00
Oscar Hellström
8c03d5959b Make sure *both* .eunit and ebin directory exists before setting up the code path.
Normally the ebin directory doesn't contain any source files. Therefore it won't be kept in the repository by, at least, mercurial and also maybe git unless you put some .keep file in it or do some other hack. The ebin directory is created by rebar compile, but if rebar eunit is called before rebar compile, you end up with a {'EXIT', {{badmatch,{error,bad_directory}},...}. Another approach would be not to match cod:add_pathz(ebin_dir()) with ok, but I think this is an ok solution as well.
2010-08-24 21:54:54 +02:00
Tuncer Ayaz
79546e66ff Add spec: rebar_utils:abort/2 does not return
Thanks to Kostis for no_return() result type.
2010-10-15 18:10:20 +02:00
Tuncer Ayaz
77660c5da6 Fix bug found by Dialyzer in neotoma compiler
Thanks to Cliff Moon for correct fun clause to add.
2010-10-14 22:05:11 +02:00
Tuncer Ayaz
c2917b31d4 Fix issues found by dialyzer 2010-10-10 23:24:20 +02:00
Kostis Sagonas
e024778599 Dialyzer related cleanups 2010-10-10 14:11:13 -06:00
Dave Smith
93f77b50fc Made OTP app module validation optional 2010-10-10 13:30:44 -06:00
Andrew Thompson
1bf45036dc Parse transforms and behaviours are compiled first
The previous code in rebar that was trying to ensure that parse
transforms and behaviours were compiled first doesn't work with multiple
compiler workers because of the possiblity of one of the workers
compiling a file that needs a parse transform or a behaviour at the same
time another worker is compiling that same parse transform or behaviour.

The solution this patch implements is to append any parse transforms and
any behaviours (in that order) to erl_first_files to ensure that they
are compiled before any regular files. This patch won't break any
currently working uses of erl_first files because we only append to the
list, so anything in erl_first_files is still compiled before anything
else.
2010-10-05 17:59:52 -04:00
Andrew Thompson
f2244b26be Add optional eunit coverage report to terminal
Add a coverage report similar to the one output to index.html except
that it is output to the terminal if the new rebar.conf option
'cover_print_enabled' is set to true.
2010-10-06 21:05:13 +02:00
Tuncer Ayaz
2f1d527ef1 Fix bug 676
The previous fix to relax the regex was insufficient.
This is basically the diff proposed by Bryan Fink with
the difference of using 'C' instead of 'en_US'.
2010-10-02 22:58:25 +02:00
Tuncer Ayaz
73398562aa Fix xrl_opts/yrl_opts option handling 2010-10-02 19:26:03 +02:00
Tuncer Ayaz
0a05775eed Make SVN version matching locale agnostic
Reported-by: Manuel Duran Aguete <manuel@aguete.org>
2010-10-02 18:54:04 +02:00
Tuncer Ayaz
392e312b3f Update TODO comment 2010-10-01 16:57:49 +02:00
Tuncer Ayaz
7200d18671 getopt optimization and dialyzer fix from Kostis 2010-10-01 15:55:17 +02:00
Tuncer Ayaz
933e4f7620 Fix dialyzer warning. Thanks Kostis 2010-10-01 14:37:42 +02:00
Tuncer Ayaz
851c602b20 Remove never matching clause 2010-10-01 14:26:38 +02:00
Tuncer Ayaz
778d4350b3 Fix warning: access the right record field 2010-10-01 13:41:55 +02:00
Tuncer Ayaz
1712425588 Fix another filename:join/2 warning. Thanks Kostis 2010-10-01 13:39:02 +02:00
Tuncer Ayaz
ba8daa5212 Log {error, read_error} dialyzer plt_info error 2010-09-30 13:38:14 +02:00
Tuncer Ayaz
59ecb2028d Fix dialyzer warning: io:format/2 -> ok 2010-09-29 23:43:54 +02:00
Tuncer Ayaz
820012410a Fix dialyzer warning for call to code:which/1 2010-09-29 23:31:50 +02:00
Tuncer Ayaz
b8b112524b Fix dialyzer warning: os:find_executable(string()) 2010-09-29 23:18:20 +02:00
Tuncer Ayaz
e33285aeaf Fix dialyzer warnings in scm client vsn checks 2010-09-29 23:09:04 +02:00
Tuncer Ayaz
f8900aecc3 Fix dialyzer warning for rebar_utils:sh/2 call
rebar_utils:sh/2 terminates on error and does not return an error code
as expected.
2010-09-29 21:34:09 +02:00
Tuncer Ayaz
d590c18b5a Fix dialyzer warning for filename:join/2 calls 2010-09-29 21:28:20 +02:00
Tuncer Ayaz
3354e8ebe0 Update getopt to v0.3.0
2010-09-23 Juan Jose Comellas <juanjo@comellas.org>

  * Released v0.3.0
  * Added support for rebar.
  * Cleaned up dialyzer warnings.
2010-09-29 14:50:24 +02:00
Benjamin Nortier
ed8ecf751f Added support for checking out tags from git 2010-09-15 11:10:53 +01:00
Dan Gudmundsson
83cece0f80 Basic tweaks for compiling ports/nifs on mingw 2010-09-18 16:34:19 -06:00
Dave Smith
9813126176 Adding support for embedding other apps via escript_incl_apps
--HG--
extra : rebase_source : 9eccc596d8fe55b2e0fe3ff2c9c0a9f9a8c92e11
2010-08-29 14:33:17 -06:00
Dave Smith
b32eeeafb7 Add support for specifying template directory on the command line 2010-08-28 08:04:47 -06:00
Tuncer Ayaz
33918a0612 Remove 'install' from available commands list 2010-08-25 22:32:42 +02:00
Dave Smith
51ed787290 Removing 'install' command; semantics were poorly defined could damage a typical OTP installation 2010-08-20 12:49:13 -06:00
Andrew Thompson
24cc775e88 Warn when a command is not implemented. Fail when no supplied commands are implemented
Rebar currently doesn't give any feedback on an invalid command. This change
makes rebar keep track of how many operations each command triggers, if a
particular command doesn't change the count, there were no modules implementing
it. If at the end of handling all commands, tje count is 0, none of the supplied
commands were valid and ?FAIL is called to trigger a non zero exit status.
2010-07-25 01:56:46 -04:00
Dave Smith
ce74846e4e Fix bug 499; do not delete dependencies that are not in the deps/ directory 2010-08-20 10:42:02 -06:00
Dave Smith
ed59ed2b52 Fix bug 629; updated help for new common_test command 2010-08-20 09:53:23 -06:00
Dave Smith
b063d3b8df Fix bug 438; add support for listing available templates 2010-08-20 09:30:37 -06:00
Juhani Rankimies
de716e1852 fix get-deps on win32 2010-08-04 11:07:37 +03:00
Dave Smith
101ea0f968 Fixing bug 463; trivial typo in @spec as identified by Bob Ippolito 2010-08-20 07:09:26 -06:00
Dave Smith
0262a3b461 Fixing bug 518; original patch by Tim Watson with some minor cleanups/clarifications 2010-07-28 07:57:04 -06:00
Dave Smith
370d8df02f Only run pre/post scripts for current directory; thanks to Tim Watson for pointing this out 2010-07-27 20:27:57 -06:00
Tuncer Ayaz
34647928b2 Add rebar_pre_script courtesy of Geoff Cant 2010-07-24 01:53:17 +02:00
Dave Smith
5ee59c377a Defaulting CC->cc and CXX->c++ for better cross platform support 2010-07-12 08:36:11 -06:00
Russell Brown
e4772c0763 beam_lib:chunks needs abs path to beam.
Uses code:which or cover:is_compiled to get path the beam for chunks
2010-07-04 22:14:56 +01:00
Tuncer Ayaz
688430fac0 Document doc command 2010-06-30 20:25:13 +02:00
Dave Smith
ef175652e4 Fix up code path for eunit so that parse transforms in eunit tests work properly 2010-06-28 15:19:19 -06:00
Dave Smith
f75bcdc7d5 Only skip eunit on apps IIF the app= parameter is specified
--HG--
extra : rebase_source : 2f2b819e209a912424c328dd57ec5e00268d40bc
2010-06-25 15:12:02 -06:00
Tuncer Ayaz
8ebbffafe6 Correct typo 2010-06-23 13:27:48 +02:00
Dave Smith
3588c69ad2 Fix bug 255; O/S environment vars should be processed last, not first 2010-06-22 20:38:45 -06:00
Dave Smith
8d14f3193d Initial cleanup pass on rebar_ct; removing other targets in favor of "ct" (ala how eunit support works) 2010-06-22 15:43:09 -06:00
Dave Smith
c2b58ac62f Change console message to debug message (more appropriate) 2010-06-22 15:42:05 -06:00
Dave Smith
9d09ccc99a Adding support for restricting eunit to a specific application 2010-06-22 14:31:31 -06:00
Dave Smith
1f3c49cae7 Move version check/enforcement for reltool into rebar_reltool; rebar should work (excepting reltool support) with anything as far back as R12, once you've compiled it 2010-06-22 14:13:39 -06:00
Dave Smith
02bc52fc6a Add support for embedding VCS info into the version data 2010-06-22 13:47:06 -06:00
Dave Smith
c32d26f509 Enable target_dir to be passed as command-line parameter 2010-06-22 10:25:42 -06:00
Dave Smith
127483f32b Make sure to apply any file perms when doing a templated file 2010-06-21 15:08:30 -06:00
Dave Smith
f3039c7a87 Escape backslashes prior to escaping the quotes 2010-06-21 14:48:37 -06:00
Klas Johansson
07b20d16f8 Remove warnings reported by xref
Replace rebar_util:get_cwd/0 by rebar_utils:get_cwd/0.  Luckily the
misspelt module name doesn't seem to have caused any harm, since
rebar_app_utils:is_app_dir/0 and rebar_rel_utils:is_rel_dir/0 aren't
called (only their /1 counterparts).
2010-06-19 18:53:54 +02:00
Klas Johansson
aea3184139 Fix compiler warnings 2010-06-19 15:46:57 +02:00
Dave Smith
ad7a494bde Change semantics of skip_deps=true such that deps still get pre/post processed, just not actually run 2010-06-21 10:24:01 -06:00
Klas Johansson
4dae6318aa Bugfix call to lists:member/2 in ulist/2
Change from lists:is_member/2 to lists:member/2, since the former
doesn't exist (the bug only affects rebar_plugins).
2010-06-19 10:08:34 +02:00
Andy Gross
b5d6fed2f6 fix call to dict:new (should be dict:from_list) 2010-06-16 22:57:01 -04:00
Dave Smith
68c0def250 Fix missing parameter when invoking rebar_utils:sh 2010-06-15 14:49:03 -06:00
Dave Smith
6f40b80ee3 Fixing http://hg.basho.com/rebar/issue/6; rebar_edoc was a little enthusiastic about deleting the doc dir 2010-06-15 14:37:00 -06:00
Dave Smith
4a12b13939 Refactor of overlay support in reltool extension; adding support for templating overlay files
--HG--
extra : rebase_source : f042bd65d63dbaf4177f444f66033883bf7522a5
2010-06-14 18:16:26 -06:00
Cliff Moon
55c1e44ba5 Added a compiler plugin for neotoma grammars 2010-05-03 22:59:43 -07:00
Dave Smith
deaabbe9a7 Adding support for compile/clean post scripts, per suggestion from Kevin Smith 2010-06-14 05:59:14 -06:00
Chris Chew
73a67adab4 Fixed problem where install was broken when the .app file is generated from 2010-06-07 11:55:22 -06:00
Russell Brown
7d6f04b42f Stuffed in a global for deps dir.
*If* there is a deps_dir tuple in the root rebar.config then
that is used globally as the deps dir. This is to stop dependencies for dependencies being
created in a different deps_dir even if the sub dependency so specifies.
2010-06-12 21:55:58 +01:00
Tuncer Ayaz
6ea5a548e1 Add missing comma 2010-06-12 13:38:41 +02:00
Dave Smith
8f9300124e Make delete-deps a bit smarter 2010-06-11 10:03:41 -06:00
Dave Smith
6efd2516ce Re-add support for delete-deps 2010-06-09 14:07:34 -06:00
Dave Smith
9dda9c2578 Re-adding support for plugin modules
--HG--
extra : rebase_source : 90052500da62af1d32337f2d540acb39fdf67db4
2010-06-09 13:45:55 -06:00
Dave Smith
a86cb0b4fa Re-add support for skip_deps
--HG--
extra : rebase_source : bd95812644fc600e7439f40d68259687e1bf9073
2010-06-09 13:32:28 -06:00
Dave Smith
3df1d4292a Heavy-duty refactor to support truly transitive dependencies
--HG--
extra : rebase_source : 41c7f1c337a7cb63582aecd7b87ba998b40ba3aa
2010-06-09 13:16:58 -06:00
Dave Smith
dfb0d87658 Removing some unnecessary debugging messages
--HG--
extra : rebase_source : 05a045be5aed66ee292e6f5896ab6de71d4a2128
2010-06-09 13:16:12 -06:00
Dave Smith
5ec8918636 Cleaning up logging messages
--HG--
extra : rebase_source : 60b49fa683387a1cea498c2bec50421ef855fea6
2010-06-09 13:15:49 -06:00
Dave Smith
a2f1b62d74 Slightly different fix for bug#5 that avoids running preprocess twice 2010-06-08 13:31:43 -06:00
theiw
a88d70c627 Include EDoc generation support 2010-03-04 13:00:14 +00:00
Dave Smith
623200ec17 Adding rt for bug 5 2010-06-04 12:21:24 -06:00
Dave Smith
30ae41dafd Minor cleanup of acc_modules for readability 2010-06-03 15:12:13 -06:00
Dave Smith
1866f65758 Refactor/simplify things since we only run one command at a time (versus a string of them) 2010-06-03 14:47:13 -06:00
Chris Bernard
4825353a23 Fix incorrect coverage count when prod modules include EUnit header.
Modules that include the EUnit header get an implicit test/0 fun,
which cover considers a runnable line, but eunit:(TestRepresentation)
never calls.  Result: prod modules with tests can never reach 100%
coverage.  Ironic.  In this case, fix it by decrementing the NotCovered
counter returned by cover:analyze/3.
2010-05-15 15:09:45 -04:00
Bob Ippolito
35a928ecf2 merge ssh://hg@bitbucket.org/basho/rebar 2010-05-15 13:59:33 -07:00
Bob Ippolito
9dd9585d5b include source path in compiler errors, process commands separately (to make get-deps compile work), ensure ebin dir, process iteratively to support transitive deps 2010-05-15 13:57:07 -07:00
Bob Ippolito
fc58d12820 fix hg and git clone commands for when repo does not exactly match application name 2010-05-11 14:46:20 -07:00
Bob Ippolito
124897e937 run plugins once, do not run as a preprocessor, add ebin to path early 2010-05-11 13:07:13 -07:00
Bob Ippolito
89b57e3aa4 when using plugin_modules, add ebin to path 2010-05-11 12:33:52 -07:00
Bob Ippolito
66f44c6362 fix backwards match for debugging print 2010-05-11 12:07:19 -07:00
Bob Ippolito
92be7a38bf rebar_plugins in rebar_config to allow extensions 2010-05-11 08:35:47 -07:00
Bob Ippolito
59ab113f3b Run the preprocess again if subdirs were compiled, fixes http://bitbucket.org/basho/rebar/issue/5 2010-05-08 07:07:28 -07:00
Bob Ippolito
100f277192 comment typo 2010-05-08 04:52:52 -07:00
Jeremy Raymond
8e195e5337 Make 'command does not apply' warning into a warning 2010-05-11 12:22:12 -04:00
Bob Ippolito
317655f724 comment typo 2010-05-08 04:52:52 -07:00
Bob Ippolito
f436d7cd3c add variables for create-app and create-node to help 2010-05-08 03:49:10 -07:00
Dave Smith
2af6dc84ae Complete implementation for simplistic .app.src processing. 2010-05-07 12:01:48 -06:00
Dave Smith
902e00fb93 Add support for requiring a specific ERTS or OTP version via a regex 2010-05-03 19:47:07 -06:00
David Reid
b85c0b4515 Add a global config option skip_deps which when present will cause dependencies not to be added to the list of directories to process, useful for ./rebar skip_deps=true eunit so that you don't run the tests of every dependency. 2010-04-29 14:40:37 -07:00
Jon Meredith
bf3dfcb34b Taught eunit/coverage to split the src module coverage stats from any test code. 2010-05-03 11:37:14 -06:00
Dave Smith
ff1cf0365b Make sure that the so_specs stuff is properly backwards compatible 2010-05-03 10:27:00 -06:00
Dave Smith
1826e62069 Copy all source files for eunit to .eunit directory so that cover works properly (ick!) 2010-05-03 09:45:21 -06:00
Tuncer Ayaz
914e5fbf68 New commands and opts (-V/--version/version/help) 2010-05-03 11:38:27 +02:00
Tuncer Ayaz
c319662849 Correct comment 2010-05-03 04:15:16 +02:00
Tuncer Ayaz
56b801b2c9 Add new erl_opts option to specify platform-specific defines 2010-05-03 04:03:38 +02:00
Tuncer Ayaz
60c649bc4e Add missing CXXFLAGS equivalents of CFLAGS 2010-04-29 15:34:14 +02:00
Cliff Moon
939c36e527 merged from basho 2010-04-28 19:37:46 -07:00
Cliff Moon
c3fe43a0ba add new configuration option so_specs which allows multiple drivers to be built in the same project. 2010-04-28 16:27:54 -07:00
Dave Smith
c28a16258c Add caching of app file 2010-04-28 13:02:51 -06:00
Dave Smith
f81cf34bb9 Add default CFLAGS for platforms where there can be variation of 32/64 bit Erlang VMs 2010-04-28 09:31:38 -06:00
Dave Smith
c19b8ac003 Refactoring app file access to be via rebar_app_utils in prep for supporting .app.src 2010-04-28 08:44:06 -06:00
Jeremy Raymond
87bca27644 Copy src files to .eunit so that cover can always find them 2010-04-22 22:35:16 -04:00
Dave Smith
dbfd2a08cd Merging w/ mainline 2010-04-23 10:10:11 -06:00
Dave Smith
0add7acdbf Make sure to add ebin/ to the code path as well so that xref can properly determine source/line of code. 2010-04-23 09:27:50 -06:00
Tuncer Ayaz
99bf0f3918 Reuse rebar_utils:get_cwd/0 2010-04-21 21:36:47 +02:00
Dave Smith
8f85d70897 Verify that we work with minimal git of 1.5 2010-04-19 08:06:07 -06:00
Dave Smith
29a3d7267c Merging w/ mainline 2010-04-17 07:35:40 -06:00
Dave Smith
266d82f871 Add simple warning if no modules are interested in handling a command for a given directory 2010-04-17 07:34:54 -06:00
Dave Smith
66906bc39e Make sure to add .eunit as an absolute directory so that we avoid weirdness with code loading stuffs. 2010-04-16 12:58:10 -06:00
Tuncer Ayaz
1e8916ba87 Document xref command
Also add a sleep after printing so that the io server has
written all output before exiting. It's a work around.
2010-04-15 20:20:20 +02:00
Dave Smith
aea6f66939 Tested mercurial checkout down to 1.1 2010-04-14 12:51:52 -06:00
Dave Smith
7218213d1c Support older, more deployed version of mercurial 2010-04-14 10:39:46 -06:00
Dave Smith
ab817cd020 Merging w/ mainline 2010-04-09 09:26:04 -06:00
Dave Smith
fcf4507a80 Add stub for xref support; not yet done 2010-04-09 09:25:00 -06:00
Bryan Fink
4f470fcddd clean up .yrl and .xrl handling 2010-03-31 15:21:13 -04:00
Bryan Fink
e6e36834f9 add leex .xrl handling as well 2010-03-31 15:03:29 -04:00
Bryan Fink
cf820007fc add handling for yecc's .yrl files to erlc compiler 2010-03-31 11:35:06 -04:00
Tuncer Ayaz
0f494c2a14 Add check-deps to shell completion and commands info 2010-03-26 19:28:01 +01:00
Dave Smith
84f5108e17 Adding check-deps and helper target for compilation 2010-03-25 13:34:19 -06:00
Tuncer Ayaz
5f98b6b65a Add ASN.1 support (via Ruslan Babayev)
Add support for compiling ASN.1 files with asn1ct.
Patch from Ruslan Babayev.
2010-03-22 18:31:01 +01:00
Tuncer Ayaz
3dfc7a8486 Add get-deps and delete-deps to commands info and shell completion
Add get-deps and delete-deps to commands info string and
bash completion script.
2010-03-17 01:26:32 +01:00
Dave Smith
c71ec1d68f Merging w/ mainline 2010-03-16 13:30:52 -06:00
Dave Smith
be6bb20c59 Revamp deps system to NOT pull down deps automatically. You must now use pull-deps explicitly 2010-03-16 13:30:22 -06:00
Dave Smith
a12778ba65 Removing overly verbose debug message (yes, I realize the irony) 2010-03-16 13:29:49 -06:00
Tuncer Ayaz
faf21694fe Make sure zip module is loaded
Before we check for zip:foldl/3 make sure zip module is loaded.
2010-03-11 01:27:46 +01:00
Tuncer Ayaz
ebfb1dc40d Add option to show available commands
Implement new option -c/--commands to print available
commands and its variables.
2010-03-08 21:14:06 +01:00
Tuncer Ayaz
aeabfb6fe9 Add escript_foldl/3 TODO
Comment what has to be done when the new OTP release is out
and the time is right.
2010-03-06 00:04:50 +01:00
Tuncer Ayaz
dfb5af4049 Add forward-compatible escript_foldl function
escript:foldl/3 was undocumented and has been replaced with
better APIs post-R13B04. The new exported funs are officially
documented.
2010-03-05 22:56:31 +01:00
Dave Smith
a49d257412 Merging eunit fixes + some UNIT TESTS!! from cebernard 2010-03-05 13:27:45 -07:00
Dave Smith
95227cf6ef Merging changes from vagabond 2010-03-05 10:25:47 -07:00
David Reid
a29da71aac Support for downloading deps via bzr. 2010-03-05 00:06:39 -08:00
David Reid
92a5a326d5 Support downloading deps via SVN. 2010-03-04 23:50:57 -08:00
Chris Bernard
25538e071f Fixed 3 bugs in rebar_eunit. Added EUnit tests to capture them.
1.  When running the eunit command with the convention of putting
tests in "*_tests" modules, eunit would run those tests twice.  This
is because: 1) eunit:test/1 will naturally look for foo's tests both
in foo, and in foo_tests, and 2) eunit:test/1 was being folded over
all project modules.  The fix is to filter "*_tests" modules from the
list passed to eunit:test/1.

2.  When running the eunit command with cover enabled and tests in a
'test' directory, cover would error because it couldn't find the
source code for those tests.  This is because cover:analyze/3 will
only find module source in "." and "../src".  This is hard-coded in
cover :-(.  Since cover shouldn't be calculating code coverage on test
code anyway, the fix is to not fold cover:analyze/3 over
non-production code.

3.  When running the eunit command with cover enabled and a test suite
defined, cover would only attempt to calculate coverage on the the
test suite itself.  This was because only the suite was passed to
cover:analyze/3.  The fix is to fold cover:analyze/3 over all the
production code, filtering out the suite module if it is defined.
2010-03-04 20:53:12 -05:00
Vagabond
50832a1a14 Don't detect the source file as an include of itself 2010-03-02 18:04:08 -05:00
Vagabond
a3f8489340 Move the .erl sorting to the right place 2010-03-02 17:58:05 -05:00
Vagabond
c4d3f0ea65 Fix dependancy checking for headers by ensuring "include" is always in the eep IncludePath 2010-03-02 17:34:12 -05:00
Vagabond
4ce01860e9 Compile parse transform and custom behaviours first 2010-03-02 17:13:58 -05:00
Tuncer Ayaz
23781ae460 Fix unused var warning 2010-02-25 19:57:02 +01:00
theiw
8a3ad89f7c Refactor eunit and cover 2010-02-19 22:37:48 +00:00
Dave Smith
872076be3f Adding cleaner module to permit users to specify their own set of files to delete 2010-02-21 05:39:12 -07:00
Dave Smith
28d3b75641 Fix bug in templater where escript was not found in subdirs were specified in rebar.config; minor formatting cleanups 2010-02-20 20:15:07 -07:00
Dave Smith
496851cefd Add support for installing to a target directory as alternative to Erlang base dir 2010-02-20 13:42:44 -07:00
Tuncer Ayaz
00c855d030 Update comment for filelib:ensure_dir/1 wrapper.
The wrapper can now be removed as I've fixed the problem in R13B04.
2010-02-17 23:38:06 +01:00
Dave Smith
b0dfd233ae Make sure to add ebin/ to current path when compiling doterl files; found by @sj_mackenzie 2010-02-16 15:16:19 -07:00
Dave Smith
6714d47efb Deal properly with env vars that have multiple = in the value 2010-02-16 11:00:14 -07:00
Dave Smith
1f6d861aba Overhaul env expansion so that rebar fully expands env refs prior to invoking the shell script. Also now using DRV_* env vars for compilation/linking of files found in c_src; this frees up "normal" CFLAGS/LDFLAGS for usage in sub build scripts. 2010-02-16 07:05:29 -07:00
Dave Smith
7bfa2405db Merging w/ http://bitbucket.org/bryan/rebar 2010-02-14 09:24:47 -07:00
Bryan Fink
f6feac493d provide separate 'file' and 'template' directives, instead of one 'file' directive with a boolean Render flag 2010-02-13 14:14:29 -05:00
Dave Smith
0f7b47ce7b Merging w/ mainline 2010-02-13 10:18:18 -07:00
Dave Smith
d486dff6e8 Merging with OJ's branch 2010-02-13 10:17:44 -07:00
Dave Smith
96c1ceba60 Break out arch string function; update ERLANG_TARGET to include bitness of the Erlang target 2010-02-12 15:05:32 -07:00
Dave Smith
a0732e9e78 Make sure to cover all edge cases when parsing module names 2010-02-12 11:57:50 -07:00
Dave Smith
1def586e39 Merging w/ mainline 2010-02-12 11:33:32 -07:00
Dave Smith
22d21f63d0 Append wordsize to the architecture string 2010-02-10 14:05:52 -07:00
Ryan Tilder
f502bb09dd I'm a moron. Make it a string. 2010-02-10 11:23:53 -08:00
Dave Smith
268405d0dc Adding new vars for scripts to determine architecture (32/64 bit) and target platform of Erlang VM; courtesy of rtilder 2010-02-10 11:15:55 -07:00
theiw
788bd3df72 Provide package support for eunit; build_plt now includes listed applications; begin including -spec annotations 2010-02-05 17:34:38 +00:00
Bryan Fink
60629e8516 add chmod template directive for changing file file permission
usage: {chmod, Mode, File}
where: Mode is an integer, as specified by the 'mode' field of the file_info record
       (see docs for file:write_file_info/2)
2010-02-04 17:45:05 -05:00
Bryan Fink
4c2dade0f4 add Render flag to 'file' template directive
{file,In,Out,true} = render with mustache
{file,In,Out,false} = do not render with mustache (leave as-is)

old-form {file,In,Out} is equivalent to {file,In,Out,true}
2010-02-04 15:52:44 -05:00
Bryan Fink
4e01b32d5d look for templates in local directory as well 2010-02-04 14:30:10 -05:00
OJ Reeves
71c974e341 Added support for the speficiation of test suite names
eg.  rebar eunit              -- runs all tests in all modules
     rebar eunit suite=foo    -- only runs tests in foo.erl/foo_tests.erl

Added an entry to .hgignore to avoid .swp files (created by VIM).
2010-02-03 22:27:09 +10:00
Tuncer Ayaz
2734f2bcc2 Do not print dynamic escript name in usage info 2010-02-02 12:56:16 +01:00
Dave Smith
bd510dea20 Tweaking order of defaults so that -shared is default across platforms unless explicitly overridden 2010-02-01 10:56:47 -07:00
Dave Smith
f333bc2a92 Removing useless debug message and extraneous newline 2010-02-01 09:29:13 -07:00
Dave Smith
b9e78d6722 Add support for passing addt'l list of sources to erlc_compiler 2010-02-01 08:37:52 -07:00
Dave Smith
47e70f308a Add support for forcibly overwriting output files; courtesy of OJ Reeves 2010-01-30 09:56:06 -07:00
Dave Smith
12420ee43c Fix typo; courtesy of OJ Reeves 2010-01-30 09:48:28 -07:00
Dave Smith
7bcbe026d4 Merging support from asonge for custom_tags_dir 2010-01-29 22:02:47 -07:00
Dave Smith
1582f2e243 Tweak support for controlling so_name 2010-01-26 13:50:17 -07:00
Alex Songe
73ee6e442b Added support for custom_tags_dir compile option to rebar_erlydtl_compiler 2010-01-16 13:58:34 -06:00
Dave Smith
96e9a2a521 Look for dirs named erts-vsn when setting up spec for copying files 2010-01-14 07:46:00 -05:00
Dave Smith
66fa90ce6c Try previous commit again; make sure include/ directory exists 2010-01-14 07:08:12 -05:00
Dave Smith
dce1673fdb Make sure include/ directory exists 2010-01-14 07:02:14 -05:00
Dave Smith
407486bc62 Merging mainline 2010-01-09 05:35:04 -07:00
OJ Reeves
49aef70f9b [mq]: eunit-fix 2010-01-09 22:19:55 +10:00
Tuncer Ayaz
e9ddd08e2a Simplified usage info printing with getopt v0.2 2010-01-09 00:36:29 +01:00
Tuncer Ayaz
4ac1f3efe9 Fixed issue 1 "priv/mibs/ is not automatically created" 2010-01-08 23:06:29 +01:00
Dave Smith
ec4e805898 Adding sketch of functionality for creating a reltool node from template 2010-01-08 12:16:57 -07:00
Dave Smith
8c4f35a294 Basic implementation of templater is complete 2010-01-08 10:54:43 -07:00
Dave Smith
2d9af6cf48 Sketching out templating system 2010-01-07 22:18:55 -07:00
Dave Smith
3ed1b99438 Adding mustache.erl from http://github.com/mojombo/mustache.erl 2010-01-07 21:22:19 -07:00
iw
39907904e8 Include support for dialyzer 2010-01-07 15:10:20 +00:00
Dave Smith
47a430c3b8 A bit of consolidation of version checking for scm clients; adding support for git 2010-01-07 07:46:06 -07:00
iw
864d4b74d6 Ensure we have the correct hg version 2010-01-06 22:22:05 +00:00
Tuncer Ayaz
fb0cee2afb Implemented option to specify number of concurrent workers a command may use 2010-01-06 17:31:14 +01:00
Kevin Smith
c9d175a30d Merging 2010-01-05 10:41:15 -05:00
Kevin Smith
bfcb54cbc9 Added so_name entry to rebar.config so linked-in drivers can specify custom .so names 2010-01-05 10:39:08 -05:00
Dave Smith
93111bfcf7 Merging w/ bitbucket 2010-01-04 09:53:50 -07:00
iw
73d2073ed8 Preserve non-empty folders when performing clean 2010-01-04 16:39:52 +00:00
Bryan Fink
abd535d081 rework elrydtl_compiler to do dependency checking correctly in refactored rebar 2010-01-04 11:24:28 -05:00
Dave Smith
21f60bff74 Take 323 on cleaning package dirs from ebin 2010-01-04 06:17:35 -07:00
Dave Smith
51f6906da9 Make sure to create dir structure for output bams 2010-01-04 05:47:45 -07:00
Dave Smith
42647f4c22 Tweak regex to properly match extension and not just .erl anywhere in filename 2010-01-04 05:40:39 -07:00
Dave Smith
fa2a58261a Another round of refactoring to yield better flexiblity in the base_compiler system 2010-01-03 22:53:04 -07:00
Dave Smith
9c15d63191 Refactor of compilation logic to enable support for package modules and provide better modularity/reusability for other systems 2010-01-02 14:17:59 -07:00
Dave Smith
18e1b37e6f Break out command line argument parsing to a dedicated routine 2010-01-01 06:22:25 -07:00
Dave Smith
48c2c169ab Merging w/ bitbucket 2009-12-31 19:31:00 -07:00
Dave Smith
9f83329a3c Adding basic distclean functionality to deps 2009-12-31 19:29:48 -07:00
Dave Smith
02fa5f6f42 Make sure to reset CWD after processing subdirs; also filter out missing dirs when restoring code path 2009-12-31 19:29:33 -07:00
Dave Smith
a46be8cec1 Use new rebar_config API to avoid having to actually delete/change the config any 2009-12-31 19:28:53 -07:00
Dave Smith
bd090f0db2 Refactor of rebar_config to facilitate identification of "local" config settings 2009-12-31 19:28:20 -07:00
Tuncer Ayaz
0817dec7ca Rolled back getopt to restore custom variables 2010-01-01 00:08:00 +01:00
Tuncer Ayaz
9a8015f2d7 Added vi modeline/emacs local variables to file headers 2009-12-31 19:42:53 +01:00
Tuncer Ayaz
940f9c232b Enhanced option parsing with new getopt and made rebar more user friendly 2009-12-31 18:00:02 +01:00
Tuncer Ayaz
8c85021c1e Deleted trailing whitespace 2009-12-30 13:13:39 +01:00
Dave Smith
5cd5870f32 Got basic retrieval of deps from hg sorta working; minor refactoring of rebar_utils:sh interface 2009-12-30 20:03:27 -07:00
Dave Smith
1fe4d13e25 First basic pass at deps 2009-12-29 22:05:32 -07:00
Tuncer Ayaz
b1b29e0858 Implemented getopt option support 2009-12-29 20:09:28 +01:00
Dave Smith
fe03778678 Silence warnings, courtesy of Tuncer Ayaz 2009-12-28 07:24:15 -07:00
Dave Smith
c99e6da250 Adding placeholder for dep mgmt 2009-12-25 23:19:47 -07:00
Dave Smith
2f64f0e6b2 Refactoring core logic in preparation for dependency mgmt; breaking out sub_dir determination into dedicated module 2009-12-25 23:19:09 -07:00
Bryan Fink
299f45623f rebar can now compile ErlyDTL files (if erlydtl is installed)
defaults to compiling from templates/*.dtl to ebin/*_dtl.beam
see top of rebar_erlydtl_compiler for configuration options
2009-12-22 09:57:42 -05:00
Dave Smith
b14eaa0dc6 Adding rudimentary escript generator 2009-12-22 06:45:01 -07:00
Bryan Fink
badcc228bd add hrl-triggered recompiling to 'eunit' build as well 2009-12-21 12:48:36 -05:00
Bryan Fink
1fa659b5b3 recompile files if their "includes" have changed
added parameter to do_compile for passing a function that can extra the list of includes from a file
2009-12-21 12:15:21 -05:00
Dave Smith
a0b665360a Adding some addt'l logging to make it easier to diagnose probs 2009-12-20 20:43:45 -07:00
Dave Smith
d051534b97 Minor formatting fix 2009-12-20 06:20:05 -07:00
Tim Dysinger
5fe24a8c97 Added optional LFE compilation abilities to rebar 2009-12-18 19:00:15 -10:00
Dave Smith
2f1d415a70 Revert change to linking order arguments 2009-12-18 15:08:36 -07:00
Dave Smith
f02c48a909 Adding simple checks for necessary version of ERTS + Reltool 2009-12-17 07:26:54 -07:00
Dave Smith
ee0c6ad086 Reorder arguments to CC for linking and fix needs_link to function properly 2009-12-16 10:27:14 -05:00
Dave Smith
4d3c7e60d6 Make sure to append overlay files to end of spec; otherwise might be overwritten by canonical install 2009-12-16 10:26:50 -05:00
Dave Smith
c3f0f2565b Adding support for overlays 2009-12-14 19:30:51 -05:00
Dave Smith
be754bb6ef Make sure to fail if run_modules generates ANY error. Thanks, Rusty. :) 2009-12-14 17:11:25 -05:00
Dave Smith
537eaa3bba Run eunit in .eunit dir to ensure any created/temporary files are created there 2009-12-14 09:59:00 -05:00
Dave Smith
e86f82f10d Fixing warning 2009-12-14 09:29:24 -05:00
Dave Smith
417ff3ad76 Adding fail_on_warning support 2009-12-14 09:27:47 -05:00
Dave Smith
d6600ab506 Fixing number of warnings and buglets 2009-12-14 08:58:22 -05:00
Dave Smith
2b7971cc6b Merging from bitbucket 2009-12-12 07:45:24 -07:00
Dave Smith
5618198eeb Merging mainline 2009-12-12 07:43:12 -07:00
Dave Smith
3990f0a076 Refactor of core logic to provide better control over recursion and code path mgmt 2009-12-12 07:34:29 -07:00
Dave Smith
3685c4fd4e Adding rudimentary support for creating empty dirs in reltool target 2009-12-11 07:20:59 -07:00
Dave Smith
9e618f79c5 Merge 2009-12-10 12:16:47 -07:00
Dave Smith
849078026e Add ability to forcibly overwrite existing release 2009-12-10 12:16:15 -07:00
Dave Smith
588337e78b Add support for coverage generation 2009-12-09 22:00:28 -07:00
Dave Smith
d894dc5448 Make sure crypto is running as lots of things use it 2009-12-09 21:59:58 -07:00
Dave Smith
b088139ed0 Remove unnecessary debug in _core; adding EQC flag for eunit builds 2009-12-08 15:52:53 -07:00
Dave Smith
ffa0cda467 Updating bootstrap to embed the build time into a macro that we can pull via "version" command 2009-12-07 16:03:56 -07:00
Dave Smith
95d52f860d Refactoring eunit to support in-module tests 2009-12-07 15:17:24 -07:00
Dave Smith
cb1899b818 Adding convenience method for determing verbosity of run 2009-12-07 15:17:03 -07:00
Dave Smith
b5eded43d8 Merging 2009-12-07 10:08:20 -07:00
Dave Smith
af5096b6f0 Make sure to bail w/ return code of 1 when error has occurred 2009-12-07 10:07:01 -07:00
Jon Meredith
726f8e6946 Added support for eunit tests as test/*_tests.erl 2009-12-05 15:18:09 -07:00
Dave Smith
e7277e69f0 Adding rebar.erl -- not sure how that got missed, yet worked!? 2009-12-04 15:42:12 -07:00
Dave Smith
b491898690 Refactor rebar to build a self-contained script 2009-12-04 13:48:57 -07:00
Jon Meredith
63d4968e36 Added check for suite compilation failures to rebar_ct. 2009-12-04 07:58:21 -07:00
Jon Meredith
a0d48d89ae Added rebar_ct to support common_test targets test, int_test and perf_test. 2009-12-03 22:49:52 -07:00
jmeredith@jons-macbook.local
bed9ab10aa Added now_str to return the local time as a string. 2009-12-03 22:46:37 -07:00
Dave Smith
89dc8095b0 Ongoing reltool integration work; now better able to identify issues with missing apps in code path 2009-12-03 16:06:06 -07:00
Dave Smith
a979f4f575 If failure is controlled (i.e. via ?FAIL macro), don't print out that it failed (expectation is that the caller already did that) 2009-12-03 09:41:10 -07:00
Dave Smith
4f980767f8 Fix up installation problems that occurred when priv/include dirs don't exist (they are optional) 2009-12-02 12:12:53 -07:00
Dave Smith
a01e7dcd30 Adding first crack at reltool support 2009-12-02 05:15:35 -07:00
Dave Smith
a8fd5bc56f Add hooks for getting list of release modules 2009-12-02 04:54:55 -07:00
Dave Smith
eb84f4f443 Make sure reason for crash is available for debug logging 2009-12-02 04:54:23 -07:00
Dave Smith
a658e970db Adding support for parallel compilation; use 3 workers by default 2009-12-01 20:34:40 -07:00
Dave Smith
3765b86653 Adding support for subdirs 2009-12-01 20:34:18 -07:00
Dave Smith
d885b1c04c Basic implementation of port compiler is now complete 2009-12-01 10:38:30 -07:00
Dave Smith
dbd576fc33 Adding more flexible arch check; adding sh command 2009-12-01 10:38:20 -07:00
Dave Smith
cf6738928d Adding generic get/3; still need some cleanup 2009-12-01 10:37:46 -07:00
Dave Smith
b3909cc9dc Adding delete_each/1 2009-12-01 10:37:19 -07:00
Dave Smith
667dd16bf9 Merging 2009-11-30 16:07:51 -07:00
Dave Smith
c7c1001012 Slowly working out port driver implementation 2009-11-30 16:03:45 -07:00
Jon Meredith
8e91e1014e Connected up symlinking the list of progs in rebar.config/app_bin
to the OTP bin dir.
2009-11-30 12:02:09 -07:00
Jon Meredith
c5d877a934 Renamed app_installer to otp_app.
Added compile check for app name.
Added compile check for app modules

--HG--
rename : src/rebar_app_installer.erl => src/rebar_otp_app.erl
2009-11-30 11:12:25 -07:00
Dave Smith
961c95b419 Add protobuffs compiler module 2009-11-30 09:57:28 -07:00
Dave Smith
be2a9096f6 More work 2009-11-30 07:00:48 -07:00
Dave Smith
c828f59056 Fix some minor typos; create simple install/bootstrapping script 2009-11-29 16:53:53 -07:00
Dave Smith
28fe3bfd54 More gross structural work; now has log levels and broken out log level control 2009-11-29 16:44:30 -07:00
Dave Smith
0151f63239 Fix options to be more consistent 2009-11-25 22:27:07 -07:00
Dave Smith
e4a9310a97 Adding support for basic compilation ordering 2009-11-25 21:55:47 -07:00
Dave Smith
fd8794dae7 Renaming compiler module
--HG--
rename : src/rebar_doterl_compiler.erl => src/rebar_erlc_compiler.erl
2009-11-25 21:00:22 -07:00
Dave Smith
620867d5d5 More work on getting compilation and clean working properly 2009-11-25 20:24:51 -07:00
Dave Smith
e52bb6783c Getting basic erlang compilation working 2009-11-25 16:03:14 -07:00
Dave Smith
b7e2088c27 Initial commit 2009-11-25 15:23:42 -07:00