Commit 19af3949 by Ingmar Vanhassel Committed by Shawn O. Pearce

Add support for installing to a libdir other than 'lib'.

Signed-off-by: Ingmar Vanhassel <ingmar@exherbo.org>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
parent 521b4e69
...@@ -7,6 +7,7 @@ DOXYGEN = doxygen ...@@ -7,6 +7,7 @@ DOXYGEN = doxygen
RANLIB = ranlib RANLIB = ranlib
prefix=/usr/local prefix=/usr/local
libdir=$(prefix)/lib
uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo no') uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo no')
...@@ -65,14 +66,14 @@ install: $(GIT_LIB) $(PUBLIC_HEADERS) libgit2.pc ...@@ -65,14 +66,14 @@ install: $(GIT_LIB) $(PUBLIC_HEADERS) libgit2.pc
@for i in $(PUBLIC_HEADERS); do \ @for i in $(PUBLIC_HEADERS); do \
cat .HEADER $$i > $(DESTDIR)/$(prefix)/include/$${i##src/}; \ cat .HEADER $$i > $(DESTDIR)/$(prefix)/include/$${i##src/}; \
done done
@mkdir -p $(DESTDIR)/$(prefix)/lib @mkdir -p $(DESTDIR)/$(libdir)
@cp -f $(GIT_LIB) $(DESTDIR)/$(prefix)/lib/libgit2.a @cp -f $(GIT_LIB) $(DESTDIR)/$(libdir)/libgit2.a
@mkdir -p $(DESTDIR)/$(prefix)/lib/pkgconfig @mkdir -p $(DESTDIR)/$(libdir)/pkgconfig
@cp -f libgit2.pc $(DESTDIR)/$(prefix)/lib/pkgconfig/libgit2.pc @cp -f libgit2.pc $(DESTDIR)/$(libdir)/pkgconfig/libgit2.pc
uninstall: uninstall:
@rm -f $(DESTDIR)/$(prefix)/lib/libgit2.a @rm -f $(DESTDIR)/$(libdir)/libgit2.a
@rm -f $(DESTDIR)/$(prefix)/lib/pkgconfig/libgit2.pc @rm -f $(DESTDIR)/$(libdir)/pkgconfig/libgit2.pc
@for i in $(PUBLIC_HEADERS); do \ @for i in $(PUBLIC_HEADERS); do \
rm -f $(DESTDIR)/$(prefix)/include/$${i##src/}; \ rm -f $(DESTDIR)/$(prefix)/include/$${i##src/}; \
done done
...@@ -124,7 +125,7 @@ $(TEST_RUN): tests/%.run: tests/%.exe ...@@ -124,7 +125,7 @@ $(TEST_RUN): tests/%.run: tests/%.exe
fi fi
libgit2.pc: libgit2.pc.in libgit2.pc: libgit2.pc.in
sed 's#@prefix@#$(prefix)#' $< > $@ sed -e 's#@prefix@#$(prefix)#' -e 's#@libdir@#$(libdir)#' $< > $@
.PHONY: all .PHONY: all
.PHONY: clean .PHONY: clean
......
prefix=@prefix@ prefix=@prefix@
exec_prefix=${prefix} exec_prefix=${prefix}
libdir=${exec_prefix}/lib libdir=@libdir@
includedir=${prefix}/include includedir=${prefix}/include
Name: libgit2 Name: libgit2
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment