From 6f2be30cf1e8d7ff03087be7c18aac6da0cf87b3 Mon Sep 17 00:00:00 2001
From: Patrick Baudin <patrick.baudin@cea.fr>
Date: Fri, 25 Sep 2020 09:00:04 +0200
Subject: [PATCH] adds install/uninstall targets to the Makefile

---
 Makefile | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/Makefile b/Makefile
index 310df6be813..93a48b3a3ab 100644
--- a/Makefile
+++ b/Makefile
@@ -165,6 +165,25 @@ force-reconfigure:
 	expr `$(CAT) .force-reconfigure` + 1 > .force-reconfigure
 
 
+##############################################################################
+.phony: install uninstall
+
+FRAMAC_INSTALLDIR?=""
+
+install:
+ifeq ($(FRAMAC_INSTALLDIR),"")
+	dune install
+else
+	dune install --prefix ${FRAMAC_INSTALLDIR}
+endif
+
+uninstall:
+ifeq ($(FRAMAC_INSTALLDIR),"")
+	dune uninstall
+else
+	dune uninstall --prefix ${FRAMAC_INSTALLDIR}
+endif
+
 ###############################################################################
 # Local Variables:
 # compile-command: "make"
-- 
GitLab