make-w32
[Top][All Lists]
Advanced

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

Re: Bug in the expansion of $(MAKE) in GNU make 3.81


From: Eli Zaretskii
Subject: Re: Bug in the expansion of $(MAKE) in GNU make 3.81
Date: Fri, 17 Nov 2006 18:20:07 +0200

> Date: Fri, 17 Nov 2006 15:23:10 +0100
> From: Benoit Sigoure <address@hidden>
> >
> > Did you patch the stock Cygwin sources of Make 3.81 or the ones that
> > have the HAVE_DOS_PATHS patch applied?  The patch I sent will only
> > work with the latter, not with the former.
> 
> OK I got it wrong then since I patched the stock make sources.
> 
> # starting with a stock make-3.81
> $ patch -p0 < ../make_patch2 # The patch snipped above
> patching file main.c
> $ patch -p1 < ~/svn/buildfarm/windows/make-3.81-cygwin.patch
> # The patch @
> http://thread.gmane.org/gmane.comp.gnu.make.windows/2058/focus=2147
> patching file configure.in
> patching file make.h
> patching file config/dospaths.m4
> patching file job.c
> $ ./configure && make && cd /tmp/mk/3 && C:/cygwin/tmp/make-3.81/make
> echo C:/cygwin/tmp/make-3.81/make
> C:/cygwin/tmp/make-3.81/make
> C:/cygwin/tmp/make-3.81/make foo
> make[1]: Entering directory `/tmp/mk/3'
> echo foo
> foo
> make[1]: Leaving directory `/tmp/mk/3'
> 
> Hooray \o/
> Thank you!

And thank you for reporting the problem and testing the patch.

Paul, I recommend to apply the patch (reproduced below) to the CVS.

2006-11-16  Eli Zaretskii  <address@hidden>

        * main.c (main) [HAVE_DOS_PATHS]: Treat DOS style argv[0] with
        backslashes and drive letters as absolute.

--- main.c~0    2006-03-20 06:36:37.000000000 +0200
+++ main.c      2006-11-16 23:04:00.642263000 +0200
@@ -1296,7 +1296,12 @@ main (int argc, char **argv, char **envp
     argv[0] = concat (current_directory, "/", argv[0]);
 #else  /* !__MSDOS__ */
   if (current_directory[0] != '\0'
-      && argv[0] != 0 && argv[0][0] != '/' && strchr (argv[0], '/') != 0)
+      && argv[0] != 0 && argv[0][0] != '/' && strchr (argv[0], '/') != 0
+#ifdef HAVE_DOS_PATHS
+      && (argv[0][0] != '\\' && (!argv[0][0] || argv[0][1] != ':'))
+      && strchr (argv[0], '\\') != 0
+#endif
+      )
     argv[0] = concat (current_directory, "/", argv[0]);
 #endif /* !__MSDOS__ */
 #endif /* WINDOWS32 */





reply via email to

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