[2/2] build: Add INSTALL.md and update "make help"

Submitted by Cyrill Gorcunov on April 22, 2016, 3:45 p.m.

Details

Message ID 1461339952-23647-3-git-send-email-gorcunov@openvz.org
State Rejected
Series "build: Add some improvements"
Headers show

Commit Message

Cyrill Gorcunov April 22, 2016, 3:45 p.m.
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
---
 INSTALL.md | 33 +++++++++++++++++++++++++++++++++
 Makefile   |  3 ++-
 2 files changed, 35 insertions(+), 1 deletion(-)
 create mode 100644 INSTALL.md

Patch hide | download patch | download mbox

diff --git a/INSTALL.md b/INSTALL.md
new file mode 100644
index 000000000000..29a2fea006c8
--- /dev/null
+++ b/INSTALL.md
@@ -0,0 +1,33 @@ 
+## Installing CRIU from source code
+
+Once CRIU is built one can easily setup the complete CRIU package
+(which includes executable itself, CRIT tool, libraries, manual
+and etc) simply typing
+
+    make install
+
+this command accepts the following variables:
+
+ * **DESTDIR**, to specify global root where all componenst will be placed under (`/` by default);
+ * **PREFIX**, to specify additional prefix for path of every component installed (`/usr/local` by default);
+ * **BINDIR**, to specify where to put CRIT tool (`$(PREFIX)/bin` by default);
+ * **SBINDIR**, to specify where to put CRIU executable (`$(PREFIX)/sbin` by default);
+ * **MANDIR**, to specify directory for manual pages (`$(PREFIX)/share/man` by default);
+ * **SYSTEMDUNITDIR**, to specify place where systemd units are living (`$(PREFIX)/lib/systemd/system` by default);
+ * **LIBDIR**, to specify directory where to put libraries (`$(PREFIX)/lib` by default).
+
+Thus one can type
+
+    make DESTDIR=/some/new/place install
+
+and get everything installed under `/some/new/place`.
+
+## Uninstalling CRIU
+
+To clean up previously installed CRIU instance one can type
+
+    make uninstall
+
+and everything should be removed. Note though that if some variable (**DESTDIR**, **BINDIR**
+and such) has been used during installation procedure, the same *must* be passed with
+uninstall action.
diff --git a/Makefile b/Makefile
index f470766c09f7..032656356be7 100644
--- a/Makefile
+++ b/Makefile
@@ -299,7 +299,8 @@  help:
 	@echo '    * criu            - Build criu'
 	@echo '      zdtm            - Build zdtm test-suite'
 	@echo '      docs            - Build documentation'
-	@echo '      install         - Install binary and man page'
+	@echo '      install         - Install CRIU (see INSTALL.md)'
+	@echo '      uninstall       - Uninstall CRIU'
 	@echo '      dist            - Create a source tarball'
 	@echo '      clean           - Clean most, but leave enough to navigate'
 	@echo '      mrproper        - Delete all compiled/generated files'

Comments

Dmitry Safonov April 22, 2016, 3:52 p.m.
On 04/22/2016 06:45 PM, Cyrill Gorcunov wrote:
> Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Thanks! More user-friendliness is better.
Reviewed-by: Dmitry Safonov <dsafonov@virtuozzo.com>

Pavel, could you please apply it with:
s/componenst/components/g
> ---
>   INSTALL.md | 33 +++++++++++++++++++++++++++++++++
>   Makefile   |  3 ++-
>   2 files changed, 35 insertions(+), 1 deletion(-)
>   create mode 100644 INSTALL.md
>
> diff --git a/INSTALL.md b/INSTALL.md
> new file mode 100644
> index 000000000000..29a2fea006c8
> --- /dev/null
> +++ b/INSTALL.md
> @@ -0,0 +1,33 @@
> +## Installing CRIU from source code
> +
> +Once CRIU is built one can easily setup the complete CRIU package
> +(which includes executable itself, CRIT tool, libraries, manual
> +and etc) simply typing
> +
> +    make install
> +
> +this command accepts the following variables:
> +
> + * **DESTDIR**, to specify global root where all componenst will be placed under (`/` by default);
> + * **PREFIX**, to specify additional prefix for path of every component installed (`/usr/local` by default);
> + * **BINDIR**, to specify where to put CRIT tool (`$(PREFIX)/bin` by default);
> + * **SBINDIR**, to specify where to put CRIU executable (`$(PREFIX)/sbin` by default);
> + * **MANDIR**, to specify directory for manual pages (`$(PREFIX)/share/man` by default);
> + * **SYSTEMDUNITDIR**, to specify place where systemd units are living (`$(PREFIX)/lib/systemd/system` by default);
> + * **LIBDIR**, to specify directory where to put libraries (`$(PREFIX)/lib` by default).
> +
> +Thus one can type
> +
> +    make DESTDIR=/some/new/place install
> +
> +and get everything installed under `/some/new/place`.
> +
> +## Uninstalling CRIU
> +
> +To clean up previously installed CRIU instance one can type
> +
> +    make uninstall
> +
> +and everything should be removed. Note though that if some variable (**DESTDIR**, **BINDIR**
> +and such) has been used during installation procedure, the same *must* be passed with
> +uninstall action.
> diff --git a/Makefile b/Makefile
> index f470766c09f7..032656356be7 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -299,7 +299,8 @@ help:
>   	@echo '    * criu            - Build criu'
>   	@echo '      zdtm            - Build zdtm test-suite'
>   	@echo '      docs            - Build documentation'
> -	@echo '      install         - Install binary and man page'
> +	@echo '      install         - Install CRIU (see INSTALL.md)'
> +	@echo '      uninstall       - Uninstall CRIU'
>   	@echo '      dist            - Create a source tarball'
>   	@echo '      clean           - Clean most, but leave enough to navigate'
>   	@echo '      mrproper        - Delete all compiled/generated files'