Commit 521b4e69 by Ingmar Vanhassel Committed by Shawn O. Pearce

Add DESTDIR support.

Signed-off-by: Ingmar Vanhassel <ingmar@exherbo.org>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
parent 4730b722
...@@ -61,22 +61,22 @@ install-headers: $(PUBLIC_HEADERS) ...@@ -61,22 +61,22 @@ install-headers: $(PUBLIC_HEADERS)
@for i in $^; do cat .HEADER $$i > /tmp/gitinc/$${i##src/}; done @for i in $^; do cat .HEADER $$i > /tmp/gitinc/$${i##src/}; done
install: $(GIT_LIB) $(PUBLIC_HEADERS) libgit2.pc install: $(GIT_LIB) $(PUBLIC_HEADERS) libgit2.pc
@mkdir -p $(prefix)/include/git @mkdir -p $(DESTDIR)/$(prefix)/include/git
@for i in $(PUBLIC_HEADERS); do \ @for i in $(PUBLIC_HEADERS); do \
cat .HEADER $$i > $(prefix)/include/$${i##src/}; \ cat .HEADER $$i > $(DESTDIR)/$(prefix)/include/$${i##src/}; \
done done
@mkdir -p $(prefix)/lib @mkdir -p $(DESTDIR)/$(prefix)/lib
@cp -f $(GIT_LIB) $(prefix)/lib/libgit2.a @cp -f $(GIT_LIB) $(DESTDIR)/$(prefix)/lib/libgit2.a
@mkdir -p $(prefix)/lib/pkgconfig @mkdir -p $(DESTDIR)/$(prefix)/lib/pkgconfig
@cp -f libgit2.pc $(prefix)/lib/pkgconfig/libgit2.pc @cp -f libgit2.pc $(DESTDIR)/$(prefix)/lib/pkgconfig/libgit2.pc
uninstall: uninstall:
@rm -f $(prefix)/lib/libgit2.a @rm -f $(DESTDIR)/$(prefix)/lib/libgit2.a
@rm -f $(prefix)/lib/pkgconfig/libgit2.pc @rm -f $(DESTDIR)/$(prefix)/lib/pkgconfig/libgit2.pc
@for i in $(PUBLIC_HEADERS); do \ @for i in $(PUBLIC_HEADERS); do \
rm -f $(prefix)/include/$${i##src/}; \ rm -f $(DESTDIR)/$(prefix)/include/$${i##src/}; \
done done
@rmdir $(prefix)/include/git @rmdir $(DESTDIR)/$(prefix)/include/git
.c.o: .c.o:
$(CC) $(ALL_CFLAGS) -c $< -o $@ $(CC) $(ALL_CFLAGS) -c $< -o $@
......
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