Vim developers,

Many ming makefiles contain the following statement:

  ifneq (sh.exe,$(SHELL))

A review of each Makefile shows that the intention is that when the condition is true, the execution environment is unix-like and when false, it is dos-like.

Let's assume we're using the mingw toolset to build Vim which provides unix-like tools. Then one of the following must occur:

1.  SHELL is defined to be "sh.exe" or
2. SHELL includes a path such as C:/MinGW/msys/1.0/bin/sh.exe (my situation)

For case 1, the condition is false while for 2 it is true.  Ouch!

I assume that for most individuals, SHELL includes a path component and so the condition will typically be true, unix-like commands will be used and the error goes unnoticed. At the same time, since these Makefiles are intended to be used when unix-like tools are being used, the case where SHELL equals cmd.exe was never tested or was tested when unix-like commands were present.

Assuming the use of gnu make, this can be easily corrected by replacing the above ifneq() when the following:

  ifeq (sh.exe, $(notdir$(SHELL)))

"notdir" is a gnu-make builtin that removes any directory components from a filename. With this change, both cases above will result in a true value as intended.

The affected makefiles are the following:

    src/Make_cyg_ming.mak
    src/GvimExt\Make_cyg.mak
    src/GvimExt\Make_ming.mak
    src/testdir\Make_ming.mak
    src/xxd\Make_ming.mak
    src/xxd\Make_cyg.mak


After all that, now comes the real question: does it make any sense to reference DOS file utilities in a mingw or cygwin makefile? After all, if you have sh, what are the odds you don't also have rm and mkdir and echo and cat?

Regards,

Mike


--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui