git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Gerrit Pape <pape@smarden.org>
Date
Feb 14, 2007, 14:57 UTC
Message-ID
<20070214145725.2827.qmail@0b3a4e2ad592dc.315fe32.mid.smarden.org>

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(-)
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
Next: Johannes Schindelin
Message 1 of 3 in “add install-lib target to install libgit.a library plus headers.”
  1. add install-lib target to install libgit.a library plus headers.Gerrit Pape, Feb 14, 2007
  2. Johannes SchindelinFeb 14, 2007
  3. Junio C HamanoFeb 14, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.