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
RANLIB = ranlib
prefix=/usr/local
libdir=$(prefix)/lib
uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo no')
......@@ -65,14 +66,14 @@ install: $(GIT_LIB) $(PUBLIC_HEADERS) libgit2.pc
@for i in $(PUBLIC_HEADERS); do \
cat .HEADER $$i > $(DESTDIR)/$(prefix)/include/$${i##src/}; \
done
@mkdir -p $(DESTDIR)/$(prefix)/lib
@cp -f $(GIT_LIB) $(DESTDIR)/$(prefix)/lib/libgit2.a
@mkdir -p $(DESTDIR)/$(prefix)/lib/pkgconfig
@cp -f libgit2.pc $(DESTDIR)/$(prefix)/lib/pkgconfig/libgit2.pc
@mkdir -p $(DESTDIR)/$(libdir)
@cp -f $(GIT_LIB) $(DESTDIR)/$(libdir)/libgit2.a
@mkdir -p $(DESTDIR)/$(libdir)/pkgconfig
@cp -f libgit2.pc $(DESTDIR)/$(libdir)/pkgconfig/libgit2.pc
uninstall:
@rm -f $(DESTDIR)/$(prefix)/lib/libgit2.a
@rm -f $(DESTDIR)/$(prefix)/lib/pkgconfig/libgit2.pc
@rm -f $(DESTDIR)/$(libdir)/libgit2.a
@rm -f $(DESTDIR)/$(libdir)/pkgconfig/libgit2.pc
@for i in $(PUBLIC_HEADERS); do \
rm -f $(DESTDIR)/$(prefix)/include/$${i##src/}; \
done
......@@ -124,7 +125,7 @@ $(TEST_RUN): tests/%.run: tests/%.exe
fi
libgit2.pc: libgit2.pc.in
sed 's#@prefix@#$(prefix)#' $< > $@
sed -e 's#@prefix@#$(prefix)#' -e 's#@libdir@#$(libdir)#' $< > $@
.PHONY: all
.PHONY: clean
......
prefix=@prefix@
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
libdir=@libdir@
includedir=${prefix}/include
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