From 5ce602558f9478afcb24309016aaa910e45bb18d Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Thu, 22 Jun 2017 14:41:37 +0200 Subject: [PATCH] Revert "also use DESTDIR in makefile.m{ingw,svc}" This reverts commit 1655e63c49d023bb130741c00fb21694164b7980. As of @karel-m [1] "I am not sure whether DESTDIR concept make sense for MS Windows paths. For example: `make -f makefile.mingw DESTDIR=c:\builddir\ PREFIX=c:\installdir` means that `"$(DESTDIR)$(PREFIX)\bin"` will expand to `"c:\builddir\c:\installdir\bin"` which is obviously invalid. I propose reverting `also use DESTDIR in makefile.m{ingw,svc}`." [1] https://github.com/libtom/libtomcrypt/pull/234#issuecomment-310366602 --- makefile.mingw | 23 +++++++++++------------ makefile.msvc | 19 +++++++++---------- 2 files changed, 20 insertions(+), 22 deletions(-) diff --git a/makefile.mingw b/makefile.mingw index 3bfa571..04ad30b 100644 --- a/makefile.mingw +++ b/makefile.mingw @@ -15,7 +15,6 @@ # #The following can be overridden from command line e.g. make -f makefile.mingw CC=gcc ARFLAGS=rcs -DESTDIR = PREFIX = c:\mingw CC = gcc AR = ar @@ -264,20 +263,20 @@ clean: #Install the library + headers install: $(LIBMAIN_S) $(LIBMAIN_I) $(LIBMAIN_D) - cmd /c if not exist "$(DESTDIR)$(PREFIX)\bin" mkdir "$(DESTDIR)$(PREFIX)\bin" - cmd /c if not exist "$(DESTDIR)$(PREFIX)\lib" mkdir "$(DESTDIR)$(PREFIX)\lib" - cmd /c if not exist "$(DESTDIR)$(PREFIX)\include" mkdir "$(DESTDIR)$(PREFIX)\include" - copy /Y $(LIBMAIN_S) "$(DESTDIR)$(PREFIX)\lib" - copy /Y $(LIBMAIN_I) "$(DESTDIR)$(PREFIX)\lib" - copy /Y $(LIBMAIN_D) "$(DESTDIR)$(PREFIX)\bin" - copy /Y src\headers\tomcrypt*.h "$(DESTDIR)$(PREFIX)\include" + cmd /c if not exist "$(PREFIX)\bin" mkdir "$(PREFIX)\bin" + cmd /c if not exist "$(PREFIX)\lib" mkdir "$(PREFIX)\lib" + cmd /c if not exist "$(PREFIX)\include" mkdir "$(PREFIX)\include" + copy /Y $(LIBMAIN_S) "$(PREFIX)\lib" + copy /Y $(LIBMAIN_I) "$(PREFIX)\lib" + copy /Y $(LIBMAIN_D) "$(PREFIX)\bin" + copy /Y src\headers\tomcrypt*.h "$(PREFIX)\include" #Install useful tools install_bins: hashsum - cmd /c if not exist "$(DESTDIR)$(PREFIX)\bin" mkdir "$(DESTDIR)$(PREFIX)\bin" - copy /Y hashsum.exe "$(DESTDIR)$(PREFIX)\bin" + cmd /c if not exist "$(PREFIX)\bin" mkdir "$(PREFIX)\bin" + copy /Y hashsum.exe "$(PREFIX)\bin" #Install documentation install_docs: doc/crypt.pdf - cmd /c if not exist "$(DESTDIR)$(PREFIX)\doc" mkdir "$(DESTDIR)$(PREFIX)\doc" - copy /Y doc\crypt.pdf "$(DESTDIR)$(PREFIX)\doc" + cmd /c if not exist "$(PREFIX)\doc" mkdir "$(PREFIX)\doc" + copy /Y doc\crypt.pdf "$(PREFIX)\doc" diff --git a/makefile.msvc b/makefile.msvc index 4bed361..804c858 100644 --- a/makefile.msvc +++ b/makefile.msvc @@ -15,7 +15,6 @@ # #The following can be overridden from command line e.g. make -f makefile.msvc CC=gcc ARFLAGS=rcs -DESTDIR = PREFIX = c:\devel CFLAGS = /Ox /DUSE_LTM /DLTM_DESC /I../libtommath EXTRALIBS = ../libtommath/tommath.lib @@ -251,18 +250,18 @@ clean: #Install the library + headers install: $(LIBMAIN_S) - cmd /c if not exist "$(DESTDIR)$(PREFIX)\bin" mkdir "$(DESTDIR)$(PREFIX)\bin" - cmd /c if not exist "$(DESTDIR)$(PREFIX)\lib" mkdir "$(DESTDIR)$(PREFIX)\lib" - cmd /c if not exist "$(DESTDIR)$(PREFIX)\include" mkdir "$(DESTDIR)$(PREFIX)\include" - copy /Y $(LIBMAIN_S) "$(DESTDIR)$(PREFIX)\lib" - copy /Y src\headers\tomcrypt*.h "$(DESTDIR)$(PREFIX)\include" + cmd /c if not exist "$(PREFIX)\bin" mkdir "$(PREFIX)\bin" + cmd /c if not exist "$(PREFIX)\lib" mkdir "$(PREFIX)\lib" + cmd /c if not exist "$(PREFIX)\include" mkdir "$(PREFIX)\include" + copy /Y $(LIBMAIN_S) "$(PREFIX)\lib" + copy /Y src\headers\tomcrypt*.h "$(PREFIX)\include" #Install useful tools install_bins: hashsum - cmd /c if not exist "$(DESTDIR)$(PREFIX)\bin" mkdir "$(DESTDIR)$(PREFIX)\bin" - copy /Y hashsum.exe "$(DESTDIR)$(PREFIX)\bin" + cmd /c if not exist "$(PREFIX)\bin" mkdir "$(PREFIX)\bin" + copy /Y hashsum.exe "$(PREFIX)\bin" #Install documentation install_docs: doc/crypt.pdf - cmd /c if not exist "$(DESTDIR)$(PREFIX)\doc" mkdir "$(DESTDIR)$(PREFIX)\doc" - copy /Y doc\crypt.pdf "$(DESTDIR)$(PREFIX)\doc" + cmd /c if not exist "$(PREFIX)\doc" mkdir "$(PREFIX)\doc" + copy /Y doc\crypt.pdf "$(PREFIX)\doc"