threads / patch / 6819

patchadd install-lib target to install libgit.a library plus headers.

Subject: [PATCH] add install-lib target to install libgit.a library plus headers.

## tl;dr

3 messages between Feb 14, 2007 and Feb 14, 2007. Diffs are folded; open one to read it.

replies: 2people: 3as markdown or json

Gerrit Pape· Feb 14, 2007, 14:57 UTC · lore

Patch from Luca Falavigna to install git static library and header files into $(prefix)/lib/, $(prefix)/include/git/, see

 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=407722
Signed-off-by: Gerrit Pape <pape@smarden.org>
---
 Makefile |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
Show changes to Makefile +9 −1
diff --git a/Makefile b/Makefile
index ebecbbd..19fe3d5 100644
--- a/Makefile
+++ b/Makefile
@@ -123,6 +123,8 @@ STRIP ?= strip
 prefix = $(HOME)
 bindir = $(prefix)/bin
 gitexecdir = $(bindir)
+headerdir = $(prefix)/include/git
+libdir = $(prefix)/lib
 template_dir = $(prefix)/share/git-core/templates/
 # DESTDIR=
 
@@ -588,6 +590,8 @@ SHA1_HEADER_SQ = $(subst ','\'',$(SHA1_HEADER))
 DESTDIR_SQ = $(subst ','\'',$(DESTDIR))
 bindir_SQ = $(subst ','\'',$(bindir))
 gitexecdir_SQ = $(subst ','\'',$(gitexecdir))
+headerdir_SQ = $(subst ','\'',$(headerdir))
+libdir_SQ = $(subst ','\'',$(libdir))
 template_dir_SQ = $(subst ','\'',$(template_dir))
 prefix_SQ = $(subst ','\'',$(prefix))
 
@@ -863,7 +867,11 @@ install-doc:
 quick-install-doc:
 	$(MAKE) -C Documentation quick-install
 
-
+install-lib: $(LIB_FILE)
+	$(INSTALL) -d -m0755 '$(DESTDIR_SQ)$(headerdir_SQ)'
+	$(INSTALL) -d -m0755 '$(DESTDIR_SQ)$(libdir_SQ)'
+	$(INSTALL) -m0644 $(LIB_H) '$(DESTDIR_SQ)$(headerdir_SQ)'
+	$(INSTALL) -m0644 $(LIB_FILE) '$(DESTDIR_SQ)$(libdir_SQ)'
 
 ### Maintainer's dist rules
 
-- 
1.5.0
Johannes Schindelin· Feb 14, 2007, 15:51 UTC · re: Gerrit Pape · lore

Re: [PATCH] add install-lib target to install libgit.a library plus headers.

Hi,
On Wed, 14 Feb 2007, Gerrit Pape wrote:
> Patch from Luca Falavigna to install git static library and header files
> into $(prefix)/lib/, $(prefix)/include/git/, see

This would make sense, _iff_ libgit.a was libified. As it is, too many functions assume that you can die() anytime something goes awry.

Ciao, Dscho

Junio C Hamano· Feb 14, 2007, 18:24 UTC · re: Gerrit Pape · lore

Re: [PATCH] add install-lib target to install libgit.a library plus headers.

Sorry, but libgit.a is not a publically usable/useful library at this moment, as its internal API is not cast in stone yet.

Installing it in /usr/lib and /usr/include would give the false impression to the users that linking with user's programs is supported and upgrading git won't break them. Please do not create libgit-dev package.

← back to recent threads