From: tibor AT iname DOT com (Tibor Polgar) Subject: B18 Make fix for rules containing drive:/path 5 Sep 1997 15:45:23 -0700 Approved: cygnus DOT gnu-win32 AT cygnus DOT com Distribution: cygnus Message-ID: <340CF907.C1DB9AA6.cygnus.gnu-win32@iname.com> Reply-To: tibor AT iname DOT com Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Mailer: Mozilla 4.02 [en] (WinNT; I) Original-To: gnu-win32 AT cygnus DOT com X-MIME-Autoconverted: from quoted-printable to 8bit by cygnus.com id WAA29457 Original-Sender: owner-gnu-win32 AT cygnus DOT com Currently when make is compiled for cygwin it can't handle rules such as c:/usr/src/obj/foo.o : c:/usr/src/foo.c The following patch to the distribution b18 appears to work of all the cases i need. Note that i feel the __MS-DOS__ ifdefs in many read.c and misc.c should be able to be folded into the ones i did for WIN32 and __CYGWIN32__. -- Tibor Polgar Alteon Networks tibor AT alteon DOT com 6351 San Ignacio Ave. (408)360-5522 San Jose, CA 95119 ----------------------------------cut--------------------------------- *** make.h.orig Tue Apr 15 10:21:23 1997 --- make.h Mon Sep 01 01:01:23 1997 *************** *** 292,299 **** extern void sync_Path_environment(void); extern int kill(int pid, int sig); extern int safe_stat(char *file, struct stat *sb); - extern char *end_of_token_w32(); #endif extern void die (); extern void message (); --- 292,301 ---- extern void sync_Path_environment(void); extern int kill(int pid, int sig); extern int safe_stat(char *file, struct stat *sb); #endif + #if defined( WIN32 ) || defined (__CYGWIN32__) + extern char *end_of_token_w32(); + #endif /* defined( WIN32 ) || defined (__CYGWIN32__) */ extern void die (); extern void message (); *** read.c.orig Tue Apr 15 09:33:55 1997 --- read.c Mon Sep 01 01:54:35 1997 *************** *** 288,294 **** char *pattern = 0, *pattern_percent; int makefile_errno; ! #ifdef WIN32 int check_again; #endif --- 288,295 ---- char *pattern = 0, *pattern_percent; int makefile_errno; ! /* CYGNUS LOCAL: or __CYGWIN32__ */ ! #if defined( WIN32) || defined (__CYGWIN32__) int check_again; #endif *************** *** 769,778 **** else break; } ! /* CYGNUS LOCAL: or __CYGWIN32__ */ ! #if defined (__MSDOS__) || defined (__CYGWIN32__) /* For MS-DOS, skip a "C:\...". */ ! if (p != 0 && p[1] == '\\' && isalpha (p[-1])) p = 0; #endif #ifdef _AMIGA --- 770,778 ---- else break; } ! #if defined (__MSDOS__) /* For MS-DOS, skip a "C:\...". */ ! if (p != 0 && (p[1] == '\\' || p[1] == '/') && isalpha (p[-1])) p = 0; #endif #ifdef _AMIGA *************** *** 791,797 **** if (p && !(isspace(p[1]) || !p[1] || isspace(p[-1]))) p = 0; #endif ! #ifdef WIN32 do { check_again = 0; /* For WIN32, skip a "C:\..." or a "C:/..." */ --- 791,798 ---- if (p && !(isspace(p[1]) || !p[1] || isspace(p[-1]))) p = 0; #endif ! /* CYGNUS LOCAL: or __CYGWIN32__ */ ! #if defined(WIN32) || defined (__CYGWIN32__) do { check_again = 0; /* For WIN32, skip a "C:\..." or a "C:/..." */ *************** *** 1627,1634 **** if (p && *p == ',') *p =' '; #endif ! /* CYGNUS LOCAL: or __CYGWIN32__ */ ! #if defined (__MSDOS__) || defined (__CYGWIN32__) /* For MS-DOS, skip a "C:\...". */ if (stopchar == ':' && p != 0 && p[1] == '\\' && isalpha (p[-1])) p = 0; --- 1628,1634 ---- if (p && *p == ',') *p =' '; #endif ! #if defined (__MSDOS__) /* For MS-DOS, skip a "C:\...". */ if (stopchar == ':' && p != 0 && p[1] == '\\' && isalpha (p[-1])) p = 0; *************** *** 1640,1648 **** p = find_char_unquote (p+1, stopchars, 1); } #endif ! #ifdef WIN32 /* For WIN32, skip a "C:\..." or "C:/...". */ ! if (stopchar == ':' && p != 0 && (p[1] == '\\' || p[1] == '/') && isalpha (p[-1])) { --- 1640,1649 ---- p = find_char_unquote (p+1, stopchars, 1); } #endif ! /* CYGNUS LOCAL: or __CYGWIN32__ */ ! #if defined( WIN32 ) || defined (__CYGWIN32__) /* For WIN32, skip a "C:\..." or "C:/...". */ ! if (stopchar == ':' && p != 0 && (p[1] == '\\' || p[1] == '/') && isalpha (p[-1])) { *************** *** 1650,1656 **** if (*p == '\0' && p[-1] == ':') p--; } ! #endif if (p == 0) p = q + strlen (q); --- 1651,1657 ---- if (*p == '\0' && p[-1] == ':') p--; } ! #endif /* defined( WIN32 ) || defined (__CYGWIN32__) */ if (p == 0) p = q + strlen (q); *************** *** 1710,1716 **** #else name = savestring (q, p - q); #endif - /* Add it to the front of the chain. */ new1 = (struct nameseq *) xmalloc (size); new1->name = name; --- 1711,1716 ---- *** misc.c.orig Tue Apr 15 09:33:53 1997 --- misc.c Mon Sep 01 01:01:23 1997 *************** *** 397,403 **** return s; } ! #ifdef WIN32 /* * Same as end_of_token, but take into account a stop character */ --- 397,403 ---- return s; } ! #if defined( WIN32 ) || defined (__CYGWIN32__) /* * Same as end_of_token, but take into account a stop character */ *************** *** 426,432 **** return p; } ! #endif /* Return the address of the first nonwhitespace or null in the string S. */ --- 426,432 ---- return p; } ! #endif /* #if defined( WIN32 ) || defined (__CYGWIN32__) */ /* Return the address of the first nonwhitespace or null in the string S. */ - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".