diff --git a/Makefile b/Makefile index 1a8f4c7e..5a07603f 100644 --- a/Makefile +++ b/Makefile @@ -39,6 +39,8 @@ PKG_VERSION ?= $(shell git describe --tags --always --abbrev=7 | tr - .) GIT_COMMIT ?= $(shell git rev-parse HEAD) GIT_BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD) +DESTDIR ?= + .PHONY: clean clean: rm -rf debug release debug_tidy @@ -88,6 +90,9 @@ test: debug test_release: release CTEST_OUTPUT_ON_FAILURE=1 make -C release test +install: release + make -C release install DESTDIR=${DESTDIR} + test_plantuml: test plantuml -tsvg debug/tests/puml/*.puml diff --git a/docs/installation.md b/docs/installation.md index 20b05aa1..c39b4eb9 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -77,9 +77,11 @@ release/src/clang-uml --help # To build using a specific installed version of LLVM use: LLVM_VERSION=14 make release -# Optionally +# Optionally, to install in default prefix make install -# or +# or to install in custom prefix +make install DESTDIR=/opt/clang-uml +# or simply export PATH=$PATH:$PWD/release ```