From 5edd12b5437fa87c3913225891a6da60cac85dbf Mon Sep 17 00:00:00 2001 From: Simon Sobisch Date: Fri, 4 May 2018 13:22:47 +0200 Subject: [PATCH 1/2] allow installation in nonstandard directories copied from https://raw.githubusercontent.com/lz4/lz4/dev/lib/Makefile, tested - works --- Makefile | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index b03d94f..23f9b5b 100644 --- a/Makefile +++ b/Makefile @@ -33,9 +33,17 @@ else # GNU/Linux, at least (Windows should probably use cmake) endif # installation directories (for 'make install') -prefix=/usr/local -libdir=$(prefix)/lib -includedir=$(prefix)/include +DESTDIR ?= +# directory variables : GNU conventions prefer lowercase +# see https://www.gnu.org/prep/standards/html_node/Makefile-Conventions.html +# support both lower and uppercase (BSD), use uppercase in script +prefix ?= /usr/local +PREFIX ?= $(prefix) +exec_prefix ?= $(PREFIX) +libdir ?= $(exec_prefix)/lib +LIBDIR ?= $(libdir) +includedir ?= $(PREFIX)/include +INCLUDEDIR ?= $(includedir) # meta targets From 20bb483009ea6e0635455244b2fe332f09efbb7c Mon Sep 17 00:00:00 2001 From: Simon Sobisch Date: Fri, 4 May 2018 13:33:09 +0200 Subject: [PATCH 2/2] Update README.md Renamed "Quick Start" to "Installation", added the `make install` part and a hint for redirection - nearly from https://raw.githubusercontent.com/lz4/lz4/dev/README.md --- README.md | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 247c7b1..219cef2 100644 --- a/README.md +++ b/README.md @@ -30,9 +30,21 @@ data governed by the similarly permissive [Unicode data license](http://www.unicode.org/copyright.html#Exhibit1)); please see the included `LICENSE.md` file for more detailed information. -## Quick Start +## Installation -For compilation of the C library run `make`. +``` +make # compilation of the C library +make install # this command may require root access +``` + +utf8proc's `Makefile` supports standard [Makefile conventions], +including [staged installs], [redirection], or [command redefinition]. +It is compatible with parallel builds (`-j#`). + +[Makefile conventions]: https://www.gnu.org/prep/standards/html_node/Makefile-Conventions.html +[staged installs]: https://www.gnu.org/prep/standards/html_node/DESTDIR.html +[redirection]: https://www.gnu.org/prep/standards/html_node/Directory-Variables.html +[command redefinition]: https://www.gnu.org/prep/standards/html_node/Utilities-in-Makefiles.html ## General Information