bug-make
[Top][All Lists]
Advanced

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

Re: make 3.81rc1 / MSYS


From: David Ergo
Subject: Re: make 3.81rc1 / MSYS
Date: Mon, 06 Mar 2006 12:19:36 +0100

On Fri, 2006-03-03 at 18:38, Eli Zaretskii wrote:
> > From: David Ergo <address@hidden>
> > Date: Tue, 28 Feb 2006 13:08:10 +0100
> > Cc: Xavier Marichal <address@hidden>,
> >     =?ISO-8859-1?Q?S=E9bastien?= Frippiat <address@hidden>
> > I managed to compile a working version of make 3.81rc1 for MSYS but I
> > had do some modifications.
> > 
> > first config/config.guess and config/config.sub must be simply patched
> > to support MSYS build system (see config_msys.patch in attachment).
> > 
> > sources must be patched (bugs correction) like specified hereunder (also
> > in sources_msys.patch in attachment) :
> 
> Thank you for your report.  However:
> 
> > file job.c, at line 2525 :
> >   && strchr (sh_chars_sh, p[1]) == 0)
> > should be :
> >   && strchr (sh_chars, p[1]) == 0)
> > 
> > file implicit.c, at line 355 :
> >   if (!check_lastslash)
> > should be :
> >   if (check_lastslash)
> > 
> > file make.h, at line 350 : 
> >   #if defined(HAVE_DOS_PATHS)
> > should be :
> >   #if defined(HAVE_DOS_PATHS) && !defined(__MSYS__)
> 
> Sorry, it seems I don't understand enough about MSYS-specific issues
> to figure out these problems.  sh_chars[] does not exist in the
> WINDOWS32 build; are you saying that you are building the Unix parts

Sorry, but as a understand the code, sh_chars_sh is an intermediate
variable as sh_chars_dos is, and sh_chars is the real variable to use.
e.g. WINDOWS32 : sh_chars defined at line 2298 and takes its value at
line 2323 or 2325, either sh_chars_sh or sh_chars_dos.
I thinks the code is buggy, it should not assume that sh_chars is
sh_chars_sh.
This is generic not specific to MSYS.

> of the code?  I always thought that MSYS builds are actually MinGW
> builds, i.e. they use the Windows runtime DLL's, not Cygwin-style
> Posix runtime libraries.  Am I mistaken?  If so, what is the
> difference between a Cygwin build of Make and an MSYS build?

yes, for MSYS we use Unix code
cygwin build use cygwin dll which is a posix emulation layer
msys build use msys dll which is a posix native layer
MSYS accept unix AND msdos paths !
Since I'm not a MSYS developper I cannot provide you with more detailled
explanations.

> 
> In any case, the first two of the 3 changes you suggest above cannot
> be made as you asked for them, since that would break the other ports
> of Make for DOS/Windows.  If I understand more about the reasons (see

If didn't misunderstood the code, these changes are NOT specific to MSYS
!
First one : as explained above, sh_chars is sh_chars_sh or sh_chars_dos
Second one: the code is buggy even for other builds :
Line 352 : check_lastslash = strchr (target, '/') == 0;
So, check_lastslash is true if '/' is not found in target
Line 354 : /* Didn't find it yet : check for DOS-type directories. */
So we must check for DOS-type dirs if not found, so line 355 MUST be
  if (check_lastslash)
i.e. if ('/' not found)

> my questions above), I hope to be able to craft a patch that fixes the
> MSYS build without screwing others.
> 
> > And after executing 'configure', I had to modify config.h manually
> > before executing make (easier for me than correcting the configure
> > script) :
> > 
> > to support dos-style paths, changed :
> >   /* #undef HAVE_DOS_PATHS */
> > into
> >   #define HAVE_DOS_PATHS 1
> 
> Again, I don't understand this: if configure says that MSYS doesn't
> have DOS drive letters, why do you need to enable its support?

MSYS has DOS and UNIX paths :
c:\msys\bin, c:/msys/bin and /usr/local/bin are all valid paths under
MSYS.

> 
> > and to use the internal realpath function as a workaround to the buggy
> > msys realpath() function (otherwise the test 'functions/realpath' fails
> > at line 19 about realpath of ///), changed :
> >   #define HAVE_REALPATH 1
> > into
> >   /* #undef HAVE_REALPATH */
> 
> This should be handled by modifying the configure test for realpath.
> Can you explain what is buggy in the MSYS implementation, so the
> configure test could be augmented?

I'm not sure about what is buggy, all I can tell is that if make is
compiled with MSYS realpath then the test 'functions/realpath' in the
tests/ subdir fails at line 19 where the test is :
ifneq ($(realpath ///),/)
  $(error)
endif 
I assume this means that realpath("///") should return "/", but it does
not.

David

> 
> TIA
> 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]