From abcc6e96d8f97e4b8d86da107608d5cdc6dfd851 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Mon, 30 Jun 2014 10:14:05 +0200 Subject: Update erlang.mk and update paths to start the release Fixes a couple invalid instructions at the same time. --- erlang.mk | 22 +++++++++++++--------- examples/chunked_hello_world/README.md | 2 +- examples/compress_response/README.md | 2 +- examples/cookie/README.md | 2 +- examples/echo_get/README.md | 2 +- examples/echo_post/README.md | 2 +- examples/error_hook/README.md | 2 +- examples/eventsource/README.md | 2 +- examples/hello_world/README.md | 2 +- examples/markdown_middleware/README.md | 2 +- examples/rest_basic_auth/README.md | 2 +- examples/rest_hello_world/README.md | 2 +- examples/rest_pastebin/README.md | 2 +- examples/rest_stream_response/README.md | 2 +- examples/ssl_hello_world/README.md | 2 +- examples/static_world/README.md | 2 +- examples/upload/README.md | 2 +- examples/web_server/README.md | 2 +- examples/websocket/README.md | 2 +- guide/getting_started.md | 2 +- 20 files changed, 32 insertions(+), 28 deletions(-) diff --git a/erlang.mk b/erlang.mk index 7da0151..d29632c 100644 --- a/erlang.mk +++ b/erlang.mk @@ -21,7 +21,7 @@ PROJECT ?= $(notdir $(CURDIR)) PKG_FILE ?= $(CURDIR)/.erlang.mk.packages.v1 export PKG_FILE -PKG_FILE_URL ?= https://raw.github.com/extend/erlang.mk/master/packages.v1.tsv +PKG_FILE_URL ?= https://raw.githubusercontent.com/extend/erlang.mk/master/packages.v1.tsv define get_pkg_file wget --no-check-certificate -O $(PKG_FILE) $(PKG_FILE_URL) || rm $(PKG_FILE) @@ -58,8 +58,13 @@ ifneq ($(wildcard $(RELX_CONFIG)),) RELX ?= $(CURDIR)/relx export RELX -RELX_URL ?= https://github.com/erlware/relx/releases/download/v0.6.0/relx +RELX_URL ?= https://github.com/erlware/relx/releases/download/v1.0.2/relx RELX_OPTS ?= +RELX_OUTPUT_DIR ?= _rel + +ifneq ($(firstword $(subst -o,,$(RELX_OPTS))),) + RELX_OUTPUT_DIR = $(firstword $(subst -o,,$(RELX_OPTS))) +endif define get_relx wget -O $(RELX) $(RELX_URL) || rm $(RELX) @@ -73,7 +78,7 @@ $(RELX): @$(call get_relx) clean-rel: - @rm -rf _rel + $(gen_verbose) rm -rf $(RELX_OUTPUT_DIR) endif @@ -111,9 +116,9 @@ clean-all: clean clean-deps clean-docs app: ebin/$(PROJECT).app $(eval MODULES := $(shell find ebin -type f -name \*.beam \ - | sed 's/ebin\///;s/\.beam/,/' | sed '$$s/.$$//')) + | sed "s/ebin\//'/;s/\.beam/',/" | sed '$$s/.$$//')) $(appsrc_verbose) cat src/$(PROJECT).app.src \ - | sed 's/{modules,[[:space:]]*\[\]}/{modules, \[$(MODULES)\]}/' \ + | sed "s/{modules,[[:space:]]*\[\]}/{modules, \[$(MODULES)\]}/" \ > ebin/$(PROJECT).app define compile_erl @@ -225,8 +230,7 @@ CT_RUN = ct_run \ -noshell \ -pa $(realpath ebin) $(DEPS_DIR)/*/ebin \ -dir test \ - -logdir logs \ - $(CT_OPTS) + -logdir logs CT_SUITES ?= @@ -236,7 +240,7 @@ test_$(1): clean deps app build-tests @if [ -d "test" ] ; \ then \ mkdir -p logs/ ; \ - $(CT_RUN) -suite $(addsuffix _SUITE,$(1)) ; \ + $(CT_RUN) -suite $(addsuffix _SUITE,$(1)) $(CT_OPTS) ; \ fi $(gen_verbose) rm -f test/*.beam endef @@ -248,7 +252,7 @@ tests: clean deps app build-tests @if [ -d "test" ] ; \ then \ mkdir -p logs/ ; \ - $(CT_RUN) -suite $(addsuffix _SUITE,$(CT_SUITES)) ; \ + $(CT_RUN) -suite $(addsuffix _SUITE,$(CT_SUITES)) $(CT_OPTS) ; \ fi $(gen_verbose) rm -f test/*.beam diff --git a/examples/chunked_hello_world/README.md b/examples/chunked_hello_world/README.md index cea56cd..c568e3b 100644 --- a/examples/chunked_hello_world/README.md +++ b/examples/chunked_hello_world/README.md @@ -12,7 +12,7 @@ $ make To start the release in the foreground: ``` bash -$ ./_rel/bin/chunked_hello_world_example console +$ ./_rel/chunked_hello_world_example/bin/chunked_hello_world_example console ``` Then point your browser at [http://localhost:8080](http://localhost:8080), diff --git a/examples/compress_response/README.md b/examples/compress_response/README.md index f46913b..ecffcad 100644 --- a/examples/compress_response/README.md +++ b/examples/compress_response/README.md @@ -12,7 +12,7 @@ $ make To start the release in the foreground: ``` bash -$ ./_rel/bin/compress_response_example console +$ ./_rel/compress_response_example/bin/compress_response_example console ``` Then point your browser at [http://localhost:8080](http://localhost:8080). diff --git a/examples/cookie/README.md b/examples/cookie/README.md index 9e07329..61ddaae 100644 --- a/examples/cookie/README.md +++ b/examples/cookie/README.md @@ -12,7 +12,7 @@ $ make To start the release in the foreground: ``` bash -$ ./_rel/bin/cookie_example console +$ ./_rel/cookie_example/bin/cookie_example console ``` Then point your browser at [http://localhost:8080](http://localhost:8080). diff --git a/examples/echo_get/README.md b/examples/echo_get/README.md index 07bf833..737d04d 100644 --- a/examples/echo_get/README.md +++ b/examples/echo_get/README.md @@ -12,7 +12,7 @@ $ make To start the release in the foreground: ``` bash -$ ./_rel/bin/echo_get_example console +$ ./_rel/echo_get_example/bin/echo_get_example console ``` Then point your browser at diff --git a/examples/echo_post/README.md b/examples/echo_post/README.md index 46c4b09..cc89fd6 100644 --- a/examples/echo_post/README.md +++ b/examples/echo_post/README.md @@ -12,7 +12,7 @@ $ make To start the release in the foreground: ``` bash -$ ./_rel/bin/echo_post_example console +$ ./_rel/echo_post_example/bin/echo_post_example console ``` As this example echoes a POST parameter, it is a little more diff --git a/examples/error_hook/README.md b/examples/error_hook/README.md index 3a315f9..cd0da97 100644 --- a/examples/error_hook/README.md +++ b/examples/error_hook/README.md @@ -12,7 +12,7 @@ $ make To start the release in the foreground: ``` bash -$ ./_rel/bin/error_hook_example console +$ ./_rel/error_hook_example/bin/error_hook_example console ``` Then point your browser at [http://localhost:8080](http://localhost:8080). diff --git a/examples/eventsource/README.md b/examples/eventsource/README.md index 81e6ab0..b6b611c 100644 --- a/examples/eventsource/README.md +++ b/examples/eventsource/README.md @@ -12,7 +12,7 @@ $ make To start the release in the foreground: ``` bash -$ ./_rel/bin/eventsource_example console +$ ./_rel/eventsource_example/bin/eventsource_example console ``` Then point your EventSource capable browser at diff --git a/examples/hello_world/README.md b/examples/hello_world/README.md index 7fbd891..1e5be0e 100644 --- a/examples/hello_world/README.md +++ b/examples/hello_world/README.md @@ -12,7 +12,7 @@ $ make To start the release in the foreground: ``` bash -$ ./_rel/bin/hello_world_example console +$ ./_rel/hello_world_example/bin/hello_world_example console ``` Then point your browser at [http://localhost:8080](http://localhost:8080). diff --git a/examples/markdown_middleware/README.md b/examples/markdown_middleware/README.md index 884ccd4..cc890fc 100644 --- a/examples/markdown_middleware/README.md +++ b/examples/markdown_middleware/README.md @@ -12,7 +12,7 @@ $ make To start the release in the foreground: ``` bash -$ ./_rel/bin/hello_world_example console +$ ./_rel/markdown_middleware_example/bin/markdown_middleware_example console ``` Then point your browser at diff --git a/examples/rest_basic_auth/README.md b/examples/rest_basic_auth/README.md index 54ace16..236ce2f 100644 --- a/examples/rest_basic_auth/README.md +++ b/examples/rest_basic_auth/README.md @@ -12,7 +12,7 @@ $ make To start the release in the foreground: ``` bash -$ ./_rel/bin/rest_basic_auth_example console +$ ./_rel/rest_basic_auth_example/bin/rest_basic_auth_example console ``` Then point your browser at [http://localhost:8080](http://localhost:8080). diff --git a/examples/rest_hello_world/README.md b/examples/rest_hello_world/README.md index 53f69cd..c7e124c 100644 --- a/examples/rest_hello_world/README.md +++ b/examples/rest_hello_world/README.md @@ -12,7 +12,7 @@ $ make To start the release in the foreground: ``` bash -$ ./_rel/bin/hello_world_example console +$ ./_rel/rest_hello_world_example/bin/rest_hello_world_example console ``` Then point your browser at [http://localhost:8080](http://localhost:8080). diff --git a/examples/rest_pastebin/README.md b/examples/rest_pastebin/README.md index e3297b3..a3941f1 100644 --- a/examples/rest_pastebin/README.md +++ b/examples/rest_pastebin/README.md @@ -12,7 +12,7 @@ $ make To start the release in the foreground: ``` bash -$ ./_rel/bin/rest_pastebin_example console +$ ./_rel/rest_pastebin_example/bin/rest_pastebin_example console ``` Then point your browser at [http://localhost:8080](http://localhost:8080). diff --git a/examples/rest_stream_response/README.md b/examples/rest_stream_response/README.md index a602a79..3b49451 100644 --- a/examples/rest_stream_response/README.md +++ b/examples/rest_stream_response/README.md @@ -12,7 +12,7 @@ $ make To start the release in the foreground: ``` bash -$ ./_rel/bin/rest_stream_response_example console +$ ./_rel/rest_stream_response_example/bin/rest_stream_response_example console ``` Then point your browser at [http://localhost:8080](http://localhost:8080). diff --git a/examples/ssl_hello_world/README.md b/examples/ssl_hello_world/README.md index faffb54..1dabbd6 100644 --- a/examples/ssl_hello_world/README.md +++ b/examples/ssl_hello_world/README.md @@ -12,7 +12,7 @@ $ make To start the release in the foreground: ``` bash -$ ./_rel/bin/ssl_hello_world_example console +$ ./_rel/ssl_hello_world_example/bin/ssl_hello_world_example console ``` Then point your browser at [https://localhost:8443](https://localhost:8443). diff --git a/examples/static_world/README.md b/examples/static_world/README.md index 7531b88..aa72e89 100644 --- a/examples/static_world/README.md +++ b/examples/static_world/README.md @@ -12,7 +12,7 @@ $ make To start the release in the foreground: ``` bash -$ ./_rel/bin/static_world_example console +$ ./_rel/static_world_example/bin/static_world_example console ``` The example will serve all the files found in the `priv` diff --git a/examples/upload/README.md b/examples/upload/README.md index db5a49a..0a0d8b4 100644 --- a/examples/upload/README.md +++ b/examples/upload/README.md @@ -12,7 +12,7 @@ $ make To start the release in the foreground: ``` bash -$ ./_rel/bin/upload_example console +$ ./_rel/upload_example/bin/upload_example console ``` Then point your browser at [http://localhost:8080](http://localhost:8080). diff --git a/examples/web_server/README.md b/examples/web_server/README.md index bcc2edd..b8938dd 100644 --- a/examples/web_server/README.md +++ b/examples/web_server/README.md @@ -12,7 +12,7 @@ $ make To start the release in the foreground: ``` bash -$ ./_rel/bin/web_server_example console +$ ./_rel/web_server_example/bin/web_server_example console ``` Then point your browser at [http://localhost:8080](http://localhost:8080) diff --git a/examples/websocket/README.md b/examples/websocket/README.md index 7509770..bb55c1c 100644 --- a/examples/websocket/README.md +++ b/examples/websocket/README.md @@ -12,7 +12,7 @@ $ make To start the release in the foreground: ``` bash -$ ./_rel/bin/websocket_example console +$ ./_rel/websocket_example/bin/websocket_example console ``` Then point your browser at [http://localhost:8080](http://localhost:8080). diff --git a/guide/getting_started.md b/guide/getting_started.md index d366b17..a5f811d 100644 --- a/guide/getting_started.md +++ b/guide/getting_started.md @@ -305,7 +305,7 @@ We can now build and start the release. ``` bash $ make -$ ./_rel/bin/hello_erlang console +$ ./_rel/hello_erlang/bin/hello_erlang console ``` If you then access `http://localhost:8080` using your browser, -- cgit v1.2.3