[PATCH 2/3] Makefile: Add install-lib and install-include targets

Subsystems: kernel build + files below scripts/ (unless maintained elsewhere), the rest

DORMANTno replies

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

[PATCH 2/3] Makefile: Add install-lib and install-include targets

From: Dmitry V. Levin <hidden>
Date: 2016-06-15 22:43:33

Several external projects (e.g. parsecvs) need libgit library
and related header files.

Signed-off-by: Dmitry V. Levin <redacted>
---
 Makefile |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/Makefile b/Makefile
index 51af531..d50e30b 100644
--- a/Makefile
+++ b/Makefile
@@ -143,6 +143,8 @@ STRIP ?= strip
 
 prefix = $(HOME)
 bindir = $(prefix)/bin
+libdir = $(prefix)/lib
+includedir = $(prefix)/include
 gitexecdir = $(bindir)
 sharedir = $(prefix)/share
 template_dir = $(sharedir)/git-core/templates
@@ -702,6 +704,8 @@ ETC_GITCONFIG_SQ = $(subst ','\'',$(ETC_GITCONFIG))
 
 DESTDIR_SQ = $(subst ','\'',$(DESTDIR))
 bindir_SQ = $(subst ','\'',$(bindir))
+libdir_SQ = $(subst ','\'',$(libdir))
+includedir_SQ = $(subst ','\'',$(includedir))
 gitexecdir_SQ = $(subst ','\'',$(gitexecdir))
 template_dir_SQ = $(subst ','\'',$(template_dir))
 prefix_SQ = $(subst ','\'',$(prefix))
@@ -1017,6 +1021,13 @@ install-info:
 quick-install-doc:
 	$(MAKE) -C Documentation quick-install
 
+install-lib: $(LIB_FILE)
+	$(INSTALL) -d -m755 '$(DESTDIR_SQ)$(libdir_SQ)'
+	$(INSTALL) -p -m644 $(LIB_FILE) '$(DESTDIR_SQ)$(libdir_SQ)/'
+
+install-include: $(LIB_H)
+	$(INSTALL) -d -m755 '$(DESTDIR_SQ)$(includedir_SQ)/git'
+	$(INSTALL) -p -m644 $(LIB_H) '$(DESTDIR_SQ)$(includedir_SQ)/git/'
 
 
 ### Maintainer's dist rules
-- 
ldv

Re: [PATCH 2/3] Makefile: Add install-lib and install-include targets

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:43:33

Hi,

On Thu, 6 Sep 2007, Dmitry V. Levin wrote:
Several external projects (e.g. parsecvs) need libgit library
and related header files.
but does that not pretend that we have a stable API?  Which we have not at 
all, thank you very much.  However, Luiz created a thin libgit in his GSoC 
project, and IMHO this would be the way to continue.  If it is not 
complete enough, well, complete it.

Ciao,
Dscho
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help