Skip to content

Commit e68d846

Browse files
committed
hopefully finally fix usage of $(DESTDIR)
This closes #232
1 parent cd6e602 commit e68d846

3 files changed

Lines changed: 18 additions & 18 deletions

File tree

makefile.shared

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ $(LIBNAME): $(OBJECTS)
4747

4848
install: .common_install
4949
sed -e 's,^prefix=.*,prefix=$(PREFIX),' -e 's,^Version:.*,Version: $(VERSION),' libtomcrypt.pc.in > libtomcrypt.pc
50-
install -d $(DESTDIR)/$(LIBPATH)/pkgconfig
51-
install -m 644 libtomcrypt.pc $(DESTDIR)/$(LIBPATH)/pkgconfig/
50+
install -d $(DESTDIR)$(LIBPATH)/pkgconfig
51+
install -m 644 libtomcrypt.pc $(DESTDIR)$(LIBPATH)/pkgconfig/
5252

5353
install_bins: .common_install_bins
5454

makefile.unix

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -272,17 +272,17 @@ clean:
272272

273273
#Install the library + headers
274274
install: $(LIBMAIN_S) $(HEADERS)
275-
@mkdir -p $(DESTDIR)/$(INCPATH) $(DESTDIR)/$(LIBPATH)/pkgconfig
276-
@cp $(LIBMAIN_S) $(DESTDIR)/$(LIBPATH)/
277-
@cp $(HEADERS) $(DESTDIR)/$(INCPATH)/
278-
@sed -e 's,^prefix=.*,prefix=$(PREFIX),' -e 's,^Version:.*,Version: $(VERSION),' libtomcrypt.pc.in > $(DESTDIR)/$(LIBPATH)/pkgconfig/libtomcrypt.pc
275+
@mkdir -p $(DESTDIR)$(INCPATH) $(DESTDIR)$(LIBPATH)/pkgconfig
276+
@cp $(LIBMAIN_S) $(DESTDIR)$(LIBPATH)/
277+
@cp $(HEADERS) $(DESTDIR)$(INCPATH)/
278+
@sed -e 's,^prefix=.*,prefix=$(PREFIX),' -e 's,^Version:.*,Version: $(VERSION),' libtomcrypt.pc.in > $(DESTDIR)$(LIBPATH)/pkgconfig/libtomcrypt.pc
279279

280280
#Install useful tools
281281
install_bins: hashsum
282-
@mkdir -p $(DESTDIR)/$(BINPATH)
283-
@cp hashsum $(DESTDIR)/$(BINPATH)/
282+
@mkdir -p $(DESTDIR)$(BINPATH)
283+
@cp hashsum $(DESTDIR)$(BINPATH)/
284284

285285
#Install documentation
286286
install_docs: doc/crypt.pdf
287-
@mkdir -p $(DESTDIR)/$(DATAPATH)
288-
@cp doc/crypt.pdf $(DESTDIR)/$(DATAPATH)/
287+
@mkdir -p $(DESTDIR)$(DATAPATH)
288+
@cp doc/crypt.pdf $(DESTDIR)$(DATAPATH)/

makefile_include.mk

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -362,18 +362,18 @@ install_all: install install_bins install_docs install_test
362362
INSTALL_OPTS ?= -m 644
363363

364364
.common_install: $(LIBNAME)
365-
install -d $(DESTDIR)/$(INCPATH)
366-
install -d $(DESTDIR)/$(LIBPATH)
367-
$(INSTALL_CMD) $(INSTALL_OPTS) $(LIBNAME) $(DESTDIR)/$(LIBPATH)/$(LIBNAME)
368-
install -m 644 $(HEADERS) $(DESTDIR)/$(INCPATH)
365+
install -d $(DESTDIR)$(INCPATH)
366+
install -d $(DESTDIR)$(LIBPATH)
367+
$(INSTALL_CMD) $(INSTALL_OPTS) $(LIBNAME) $(DESTDIR)$(LIBPATH)/$(LIBNAME)
368+
install -m 644 $(HEADERS) $(DESTDIR)$(INCPATH)
369369

370370
.common_install_bins: $(USEFUL_DEMOS)
371-
install -d $(BINPATH)
372-
$(INSTALL_CMD) -m 775 $(USEFUL_DEMOS) $(DESTDIR)/$(BINPATH)
371+
install -d $(DESTDIR)$(BINPATH)
372+
$(INSTALL_CMD) -m 775 $(USEFUL_DEMOS) $(DESTDIR)$(BINPATH)
373373

374374
install_docs: doc/crypt.pdf
375-
install -d $(DATAPATH)
376-
install -m 644 doc/crypt.pdf $(DESTDIR)/$(DATAPATH)
375+
install -d $(DESTDIR)$(DATAPATH)
376+
install -m 644 doc/crypt.pdf $(DESTDIR)$(DATAPATH)
377377

378378
install_hooks:
379379
for s in `ls hooks/`; do ln -s ../../hooks/$$s .git/hooks/$$s; done

0 commit comments

Comments
 (0)