Skip to content

Commit

Permalink
split getting the deps from the actual build
Browse files Browse the repository at this point in the history
This should allow the deps to be preinstalled if desired, it also
makes things much easier for packagers.

Signed-off-by: Jordan Wilberding <diginux@gmail.com>
  • Loading branch information
ericbmerritt authored and jwilberding committed May 17, 2012
1 parent 787d306 commit c2d5280
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 3 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ language: erlang
otp_release:
- R15B
- R14B04
before_script: "make get-deps"
script: "make test"
branches:
only:
Expand Down
65 changes: 65 additions & 0 deletions INSTALL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
Installing Joxa
===============

The easiest way by far to install joxa is to simply
[download it from the github site](https://github.com/erlware/joxa/downloads). This
will give you an executable file that will serve as your shell and
compiler (see the manual). However, if you would like to build from
the repository there are a few things you should do.

TLDR
----

$> make get-deps
$> make test
$> make escript
$> mv ./_build/joxa/escript/joxa <someplace-in-the-path>

Get The Dependencies
--------------------

Joxa has several compile time dependencies and one two time dependencies.

### Compile Time Dependencies

* [Cucumberl](https://github.com/membase/cucumberl) at least version 0.0.5
* [Proper](https://github.com/manopapad/proper) at least version 1.0

### Runtime Dependencies

* [Getopt](https://github.com/jcomellas/getopt) at least version 0.4.2
* [Erlware Commons](https://github.com/erlware/erlware_commons) at
least version 0.6.1

You can pull all of these down build them and put them somewhere in
your erlang path (ERL_LIBS). However, there is a rule in the make file
that will do this as well. Just run

$> make get-deps

Running The Tests
-----------------

Make sure you run the tests, otherwise how will you know if it works?

$> make test

Executable File (escript)
-------------------------

Finally build the escript. This will give you a binary executable that
you can use to run joxa.

$> make escript

Then you can just mv the executable to some place in your path.

$> mv ./_build/joxa/escript/joxa <someplace-in-the-path>


OTP Application
---------------

If you would like to have access to the OTP application to use as a
dependency you might want to move the built application to someplace
in your ERL_LIBS path. This is located in _build/joxa/lib/joxa-<vsn>
8 changes: 5 additions & 3 deletions build-support/core-build.mkf
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ TESTBEAMS = $(BEAMDIR)/jxat_anon_fun.beam \
$(BEAMDIR)/joxa/test-let-match.beam

.PHONY:all test_bootstrap pre_bootstrap bootstrap clean \
test build proper eunit cucumber shell bare-escript \
install-deb build-deb publish-ppa escript-deb
test build get-deps proper eunit \
cucumber shell bare-escript

FEATURES=./features/*.feature

Expand Down Expand Up @@ -123,7 +123,9 @@ $(BEAMDIR)/joxa.app: $(SRCDIR)/joxa.app.src
"$(VSN)" "joxa.app" "$(APPDIR)" "$(SRCDIR)/joxa.app.src" -s init stop


build: $(LOCAL_DEPS) $(SRCBEAMS) $(TESTBEAMS) $(BEAMDIR)/joxa.app
build: $(SRCBEAMS) $(TESTBEAMS) $(BEAMDIR)/joxa.app

get-deps: $(LOCALDEPS)

shell: build
$(ERL) $(ERLFLAGS) -s joxa main -s init stop
Expand Down

0 comments on commit c2d5280

Please sign in to comment.