From 98eae5d71ecf6986ff3080dd930036a6abd1ea1a Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 22 Jan 2016 14:28:31 +0000 Subject: [PATCH] configure.bat: --with-libdir * win32/configure.bat: add --with-libdir option for basename of libdir. on Windows it must be placed under exec_prefix always. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53619 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- win32/Makefile.sub | 7 +++++-- win32/configure.bat | 7 +++++++ win32/setup.mak | 3 +++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/win32/Makefile.sub b/win32/Makefile.sub index 38933ae9d0..47b55bcdb1 100644 --- a/win32/Makefile.sub +++ b/win32/Makefile.sub @@ -158,8 +158,11 @@ prefix = /usr !if !defined(exec_prefix) exec_prefix = $(prefix) !endif +!if !defined(libdir_basename) +libdir_basename = lib +!endif !if !defined(libdir) -libdir = $(exec_prefix)/lib +libdir = $(exec_prefix)/$(libdir_basename) !endif !if !defined(datadir) datadir = $(prefix)/share @@ -813,7 +816,7 @@ s,@datadir@,$${prefix}/share,;t t s,@sysconfdir@,$${prefix}/etc,;t t s,@sharedstatedir@,/etc,;t t s,@localstatedir@,/var,;t t -s,@libdir@,$${exec_prefix}/lib,;t t +s,@libdir@,$${exec_prefix}/$(libdir_basename),;t t s,@includedir@,$${prefix}/include,;t t s,@oldincludedir@,/usr/include,;t t s,@infodir@,$${datadir}/info,;t t diff --git a/win32/configure.bat b/win32/configure.bat index edf18b7411..a636da08ab 100755 --- a/win32/configure.bat +++ b/win32/configure.bat @@ -38,6 +38,7 @@ if "%1" == "--extout" goto :extout if "%1" == "--path" goto :path if "%1" == "--with-baseruby" goto :baseruby if "%1" == "--with-ntver" goto :ntver +if "%1" == "--with-libdir" goto :libdir if "%1" == "--without-ext" goto :witharg if "%1" == "--without-extensions" goto :witharg if "%opt:~0,10%" == "--without-" goto :withoutarg @@ -160,6 +161,12 @@ goto :loop shift shift goto :loop +:libdir + echo>> ~tmp~.mak "libdir_basename=%~2" \ + echo>>confargs.tmp %1=%2 \ + shift + shift +goto :loop :witharg echo>>confargs.tmp %1=%2\ set witharg=1 diff --git a/win32/setup.mak b/win32/setup.mak index 292dab7383..b023f8df91 100644 --- a/win32/setup.mak +++ b/win32/setup.mak @@ -44,6 +44,9 @@ ia64-mswin64: -prologue64- -ia64- -epilogue- MAKE = nmake srcdir = $(srcdir:\=/) prefix = $(prefix:\=/) +!if defined(libdir_basename) +libdir_basename = $(libdir_basename) +!endif EXTSTATIC = $(EXTSTATIC) !if defined(RDOCTARGET) RDOCTARGET = $(RDOCTARGET)