Skip to content

Commit

Permalink
Allow installing into custom directory (erlang-ls#1188)
Browse files Browse the repository at this point in the history
  • Loading branch information
HiPhish committed Feb 1, 2022
1 parent 4d6b1db commit 3e7ef67
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
.PHONY: all

PREFIX = '/usr/local'

all:
@ echo "Building escript..."
@ rebar3 escriptize
@ rebar3 as dap escriptize

.PHONY: install
install: all
@ echo "Installing escript..."
@ cp _build/default/bin/erlang_ls /usr/local/bin
@ cp _build/dap/bin/els_dap /usr/local/bin
@ mkdir -p '${PREFIX}/bin'
@ cp _build/default/bin/erlang_ls ${PREFIX}/bin
@ cp _build/dap/bin/els_dap ${PREFIX}/bin

.PHONY: clean
clean:
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ To install the produced `erlang_ls` escript in `/usr/local/bin`:

make install

To install to a different directory set the `PREFIX` environment variable:

PREFIX=/path/to/directory make -e install

## Command-line Arguments

These are the command-line arguments that can be provided to the
Expand Down

0 comments on commit 3e7ef67

Please sign in to comment.