Subject: Re: change in behavior of make from 3.80 to 3.81
From: "William A. Hoffman" <[email-masked]>
To: "John W. Eaton" <[email-masked]>
Cc: [email-masked]
Date: Wed, 16 Aug 2006 21:41:23 -0400

At 04:51 PM 8/16/2006, John W. Eaton wrote:

>Have you tried this (uh, what file are you patching anyway)?  Does it
>work?  Does it cause problems for valid Makefiles that assume POSIX
>filenames?
>
>Suggesting changes to GNU Make on this list is not going to cause
>things to happen.  If you want to see changes, then I think the place
>to start is to
>
>  * get a copy of the current GNU Make sources
>
>  * apply your above "patch"
>
>  * build and test it
>
>  * if it works, submit the patch to the GNU Make maintainers in the
>    appropriate forum (not here) explaining why the patch is needed
>    and whether there are any potential hazards to watch out for if
>    the change is made

Here is the patch, and it seems to work. I have posted the patch to make-w32
minus the forcing of HAVE_DOS_PATHS for cygwin.  It would be nice
if this could be make-3.81-2 in cygwin, but my hopes are low for that.

But it can't be said I did not look at the code or provide a patch. :)
The original make-3.81 does not compile with HAVE_DOS_PATHS on cygwin,
and a patch on the make-w32 list crashed, I found the cause of the crash
and with my patch all tests for make check pass.  Also, windows paths
work in makefiles again.  

The reason I am posting this patch to this list is so that other cygwin
users can try the patch and make sure that things work in the ways they
expect.  The change in config.h.in is more of a hack, and the correct
place to fix that is in configure.in, and if it gets accepted I can
do the extra work to put the fix in that file instead.

*** make-3.81/config.h.in       Wed Aug 16 16:31:10 2006
--- make381orig/make-3.81/config.h.in   Sat Apr  1 01:40:00 2006
***************
*** 75,84 ****

  /* Use platform specific coding */
  #undef HAVE_DOS_PATHS
- #ifdef __CYGWIN__
- #define HAVE_DOS_PATHS 1
- #endif
-

  /* Define to 1 if you have the `dup2' function. */
  #undef HAVE_DUP2
--- 75,80 ----
Only in make-3.81: config.h.in~
diff -r -p make-3.81/job.c make381orig/make-3.81/job.c
*** make-3.81/job.c     Wed Aug 16 19:42:14 2006
--- make381orig/make-3.81/job.c Sun Mar 19 22:03:04 2006
*************** construct_command_argv_internal (char *l
*** 2297,2316 ****
                   0 };
    char*  sh_chars;
    char** sh_cmds;
- #elif defined(HAVE_DOS_PATHS)
-   /* This is required if the MSYS/Cygwin ports (which do not define
-      WINDOWS32) are compiled with HAVE_DOS_PATHS defined, which uses
-      sh_chars_sh[] directly (see below).  The value is identical to
-      the one above for WINDOWS32 platforms.  */
-   static char sh_chars_sh[] = "#;\"*?[]&|<>(){}$`^";
-   static char *sh_cmds_sh[] = { "cd", "eval", "exec", "exit", "login",
-                            "logout", "set", "umask", "wait", "while", "for",
-                            "case", "if", ":", ".", "break", "continue",
-                            "export", "read", "readonly", "shift", "times",
-                                 "trap", "switch", "test", "echo", 0};
-   char *sh_chars;
-   char **sh_cmds;
-
  #elif defined(__riscos__)
    static char sh_chars[] = "";
    static char *sh_cmds[] = { 0 };
--- 2297,2302 ----
*************** construct_command_argv_internal (char *l
*** 2340,2351 ****
      sh_chars = sh_chars_sh;
    }
  #endif /* WINDOWS32 */
- #if defined(HAVE_DOS_PATHS) && !defined(WINDOWS32)
-   int slow_flag = 0;
-
-   sh_cmds = sh_cmds_sh;
-   sh_chars = sh_chars_sh;
- #endif /* WINDOWS32 */

    if (restp != NULL)
      *restp = NULL;
--- 2326,2331 ---- 

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/