From e68d846429c36e6e1b33dfae3034e97c32564695 Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Fri, 23 Jun 2017 07:57:47 +0200 Subject: [PATCH] hopefully finally fix usage of $(DESTDIR) This closes #232 --- makefile.shared | 4 ++-- makefile.unix | 16 ++++++++-------- makefile_include.mk | 16 ++++++++-------- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/makefile.shared b/makefile.shared index e4fc103..3efde7b 100644 --- a/makefile.shared +++ b/makefile.shared @@ -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 diff --git a/makefile.unix b/makefile.unix index d3ccc72..b519cc6 100644 --- a/makefile.unix +++ b/makefile.unix @@ -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)/ diff --git a/makefile_include.mk b/makefile_include.mk index 6d13009..4fe3fd2 100644 --- a/makefile_include.mk +++ b/makefile_include.mk @@ -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