[gobject-introspection: 1/2] Revert "Windows port: Work arount MSYS weirdness where it changes --libtool= command line arguments.



commit 799a8117564adcd10565eae001bba171be72d34c
Author: Ray Donnelly <mingw android gmail com>
Date:   Wed Dec 30 17:28:58 2015 +0000

    Revert "Windows port: Work arount MSYS weirdness where it changes --libtool= command line arguments."
    
    A very old version of MSYS performed normalization during path conversion
    so "/bin/sh ../../libtool" became "c:/opt/msys/1.0/bin/libtool" ("sh .."
    was considered a single folder), it doesn't do this any more; nor does
    MSYS2.
    
    Also, the old comment was incorrect. It claimed:
    "This continues to reuse the LIBTOOL variable from automake if it's set,
    but works around some MSYS weirdness: When running g-ir-scanner, MSYS
    changes a command-line argument --libtool="/bin/sh ../../libtool" into
    --libtool=c:/opt/msys/1.0/bin/libtool. So just use sh.exe without path
    because we already "know" where the libtool configure produced is."
    
    .. yet the actual code was changed to:
    _gir_libtool = $(if $(findstring MINGW,$(shell uname -s)),--libtool="$(top_builddir)/libtool",$(if 
$(LIBTOOL),--libtool="$(LIBTOOL)"))
    
    .. so in fact, if $(uname -s) contained "MINGW", then --libtool ignored
    the LIBTOOL variable from automake and used $(top_builddir)/libtool
    instead, at the very least, removing all trace of $(SHELL) from it.
    
    Now that $(SHELL) has been re-introduced into libtool, it must not
    doubly appear in resolve_windows_libs in ccompiler.py, as otherwise
    sh.exe will try to execute sh.exe and that clearly will not work.
    
    I've left some MSYS-specific hacks in dumper.py, some of which could
    probaly be removed safely now (execution through a temporary shell
    script), but I've opted to leave it as is for now.
    
    This reverts commit 33bbdce144d275b693752f0bc2c2f292deda854e.

 Makefile.introspection | 8 ++------
 giscanner/ccompiler.py | 2 --
 2 files changed, 2 insertions(+), 8 deletions(-)
---
diff --git a/Makefile.introspection b/Makefile.introspection
index 5b38e355..7fabff60 100644
--- a/Makefile.introspection
+++ b/Makefile.introspection
@@ -64,12 +64,8 @@ _gir_includes = $(foreach include,$($(_gir_name)_INCLUDES),--include=$(include))
 _gir_export_packages = $(foreach pkg,$($(_gir_name)_EXPORT_PACKAGES),--pkg-export=$(pkg))
 _gir_c_includes = $(foreach include,$($(_gir_name)_C_INCLUDES),--c-include=$(include))
 
-# Reuse the LIBTOOL variable from automake if it's set, but
-# work around MSYS weirdness: When running g-ir-scanner, MSYS changes
-# a command-line argument --libtool="/bin/sh ../../libtool" into
-# --libtool=c:/opt/msys/1.0/bin/libtool. So just use sh.exe without path
-# because we already "know" where the libtool configure produced is.
-_gir_libtool = $(if $(findstring MINGW,$(shell uname -s)),--libtool="$(top_builddir)/libtool",$(if 
$(LIBTOOL),--libtool="$(LIBTOOL)"))
+# Reuse the LIBTOOL variable from automake if it's set
+_gir_libtool = $(if $(LIBTOOL),--libtool="$(LIBTOOL)")
 
 # Macros for AM_SILENT_RULES prettiness
 _gir_verbosity = $(if $(AM_DEFAULT_VERBOSITY),$(AM_DEFAULT_VERBOSITY),1)
diff --git a/giscanner/ccompiler.py b/giscanner/ccompiler.py
index d10327c8..bd739ffa 100644
--- a/giscanner/ccompiler.py
+++ b/giscanner/ccompiler.py
@@ -280,8 +280,6 @@ class CCompiler(object):
         else:
             libtool = utils.get_libtool_command(options)
             if libtool:
-                if os.name == 'nt':
-                    args.append(utils.which(os.environ.get('SHELL', 'sh.exe')))
                 args.extend(libtool)
                 args.append('--mode=execute')
             args.extend([os.environ.get('DLLTOOL', 'dlltool.exe'), '--identify'])


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]