hopefully finally fix usage of $(DESTDIR)

This closes #232
This commit is contained in:
Steffen Jaeckel 2017-06-23 07:57:47 +02:00
parent cd6e602b48
commit e68d846429
3 changed files with 18 additions and 18 deletions

View File

@ -47,8 +47,8 @@ $(LIBNAME): $(OBJECTS)
install: .common_install
sed -e 's,^prefix=.*,prefix=$(PREFIX),' -e 's,^Version:.*,Version: $(VERSION),' libtomcrypt.pc.in > libtomcrypt.pc
install -d $(DESTDIR)/$(LIBPATH)/pkgconfig
install -m 644 libtomcrypt.pc $(DESTDIR)/$(LIBPATH)/pkgconfig/
install -d $(DESTDIR)$(LIBPATH)/pkgconfig
install -m 644 libtomcrypt.pc $(DESTDIR)$(LIBPATH)/pkgconfig/
install_bins: .common_install_bins

View File

@ -272,17 +272,17 @@ clean:
#Install the library + headers
install: $(LIBMAIN_S) $(HEADERS)
@mkdir -p $(DESTDIR)/$(INCPATH) $(DESTDIR)/$(LIBPATH)/pkgconfig
@cp $(LIBMAIN_S) $(DESTDIR)/$(LIBPATH)/
@cp $(HEADERS) $(DESTDIR)/$(INCPATH)/
@sed -e 's,^prefix=.*,prefix=$(PREFIX),' -e 's,^Version:.*,Version: $(VERSION),' libtomcrypt.pc.in > $(DESTDIR)/$(LIBPATH)/pkgconfig/libtomcrypt.pc
@mkdir -p $(DESTDIR)$(INCPATH) $(DESTDIR)$(LIBPATH)/pkgconfig
@cp $(LIBMAIN_S) $(DESTDIR)$(LIBPATH)/
@cp $(HEADERS) $(DESTDIR)$(INCPATH)/
@sed -e 's,^prefix=.*,prefix=$(PREFIX),' -e 's,^Version:.*,Version: $(VERSION),' libtomcrypt.pc.in > $(DESTDIR)$(LIBPATH)/pkgconfig/libtomcrypt.pc
#Install useful tools
install_bins: hashsum
@mkdir -p $(DESTDIR)/$(BINPATH)
@cp hashsum $(DESTDIR)/$(BINPATH)/
@mkdir -p $(DESTDIR)$(BINPATH)
@cp hashsum $(DESTDIR)$(BINPATH)/
#Install documentation
install_docs: doc/crypt.pdf
@mkdir -p $(DESTDIR)/$(DATAPATH)
@cp doc/crypt.pdf $(DESTDIR)/$(DATAPATH)/
@mkdir -p $(DESTDIR)$(DATAPATH)
@cp doc/crypt.pdf $(DESTDIR)$(DATAPATH)/

View File

@ -362,18 +362,18 @@ install_all: install install_bins install_docs install_test
INSTALL_OPTS ?= -m 644
.common_install: $(LIBNAME)
install -d $(DESTDIR)/$(INCPATH)
install -d $(DESTDIR)/$(LIBPATH)
$(INSTALL_CMD) $(INSTALL_OPTS) $(LIBNAME) $(DESTDIR)/$(LIBPATH)/$(LIBNAME)
install -m 644 $(HEADERS) $(DESTDIR)/$(INCPATH)
install -d $(DESTDIR)$(INCPATH)
install -d $(DESTDIR)$(LIBPATH)
$(INSTALL_CMD) $(INSTALL_OPTS) $(LIBNAME) $(DESTDIR)$(LIBPATH)/$(LIBNAME)
install -m 644 $(HEADERS) $(DESTDIR)$(INCPATH)
.common_install_bins: $(USEFUL_DEMOS)
install -d $(BINPATH)
$(INSTALL_CMD) -m 775 $(USEFUL_DEMOS) $(DESTDIR)/$(BINPATH)
install -d $(DESTDIR)$(BINPATH)
$(INSTALL_CMD) -m 775 $(USEFUL_DEMOS) $(DESTDIR)$(BINPATH)
install_docs: doc/crypt.pdf
install -d $(DATAPATH)
install -m 644 doc/crypt.pdf $(DESTDIR)/$(DATAPATH)
install -d $(DESTDIR)$(DATAPATH)
install -m 644 doc/crypt.pdf $(DESTDIR)$(DATAPATH)
install_hooks:
for s in `ls hooks/`; do ln -s ../../hooks/$$s .git/hooks/$$s; done