From e2d676f36eefb396c06442b490dcf0aa259152f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Thu, 15 Aug 2013 15:48:55 +0200 Subject: Update README --- README.md | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 98fc96b..26e6ace 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,8 @@ erlang.mk Common Makefile rules for building and testing Erlang applications. +Also features support for dependencies and a package index. + Usage ----- @@ -31,7 +33,8 @@ dep_cowboy = https://github.com/extend/cowboy.git 0.8.4 dep_bullet = https://github.com/extend/bullet.git 0.4.1 ``` -They will always be compiled using the command `make`. +They will always be compiled using the command `make`. If the dependency +does not feature a Makefile, then erlang.mk will be used for building. You can also specify test-only dependencies. These dependencies will only be downloaded when running `make tests`. The format is the same as above, @@ -45,6 +48,31 @@ dep_ct_helper = https://github.com/extend/ct_helper.git master Please note that the test dependencies will only be compiled once when they are fetched, unlike the normal dependencies. +Package index +------------- + +A very basic package index is included with erlang.mk. You can list +all known packages with the `make pkg-list` command. You can search +a package with the `make pkg-search q=STRING` command, replacing +`STRING` with what you want to search. Use quotes around the string +if needed. + +In addition, it is possible to specify dependencies in a simplified +manner if they exist in the package index. The above example could +instead read as: + +``` Makefile +DEPS = cowboy bullet +dep_cowboy = pkg://cowboy 0.8.4 +dep_bullet = pkg://bullet 0.4.1 +``` + +erlang.mk will look inside the index for the proper URL and use it +for fetching the dependency. + +All packages featured in the index are compatible with erlang.mk +with no extra work required. + Compiled files -------------- @@ -79,6 +107,8 @@ The following targets are defined: | `tests` | Run the common_test suites | | `build-plt` | Generate the PLT needed by Dialyzer | | `dialyze` | Run Dialyzer on the application | +| `pkg-list` | List packages in the index | +| `pkg-search` | Search for packages in the index | Cleaning means removing all generated and temporary files. @@ -128,6 +158,12 @@ the project depends on will also be included. `DIALYZER_OPTS` allows you to change the `dialyzer` options. +`PKG_FILE` allows you to change the location of the package index file +on your system. + +`PKG_FILE_URL` allows you to change the URL from which the package index +file is fetched. + Extra targets ------------- -- cgit v1.2.3