瀏覽代碼

hopefully finally fix usage of $(DESTDIR)

This closes #232
Steffen Jaeckel 8 年之前
父節點
當前提交
e68d846429
共有 3 個文件被更改,包括 18 次插入18 次删除
  1. 2 2
      makefile.shared
  2. 8 8
      makefile.unix
  3. 8 8
      makefile_include.mk

+ 2 - 2
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
 

+ 8 - 8
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)/

+ 8 - 8
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