bugmake - Bugs: bug #11183, DOS path / Windows path in...

 
 

bug #11183: DOS path / Windows path in implicit rule

Submitted by:  None
Submitted on:  Wed 01 Dec 2004 01:38:53 PM UTC  
 
Severity: 3 - NormalItem Group: Bug
Status: FixedPrivacy: Public
Assigned to: Paul D. Smith <psmith>Open/Closed: Closed
Component Version: 3.80Operating System: MS Windows
Fixed Release: 3.81Triage Status: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 13 Feb 2006 11:39:40 PM UTC, comment #2:

Based on Eli's recommendation I tried to fix this. Hopefully I succeeded!

Paul D. Smith <psmith>
Project AdministratorIn charge of this item.
Sun 27 Feb 2005 06:29:08 PM UTC, comment #1:

All users of GNU make, even those on DOS/Windows systems, are strongly urged to use "/" pathname separators and not "\", everywhere in their makefiles. Make's quoting rules are somewhat haphazard and it's not always clear when "\" is treated as a normal character and when it's treated as an escape character.

Paul D. Smith <psmith>
Project AdministratorIn charge of this item.
Wed 01 Dec 2004 01:38:53 PM UTC, original submission:

Having a DOS style path in an implicit rule doesn't work. It's fixed with this modification in implicit.c, function pattern_search (the new code is in the "HAVE_DOS_PATHS" conditional which is used throughout the code:

=================
/* Set CHECK_LASTSLASH if FILENAME contains a directory
prefix and the target pattern does not contain a slash.*/

#ifdef VMS
check_lastslash = lastslash != 0
&& ((strchr (target, ']') == 0)
&& (strchr (target, ':') == 0));
#else
check_lastslash = lastslash != 0
&& ( strchr (target, '/') == 0
#ifdef HAVE_DOS_PATHS
&& strrchr( target, '\\' ) == 0
#endif
);
#endif
=================

This fix then shows an anomaly in the parser, as a double backslash is required for the destination in the rule, eg:

..\obj\linklist\\%.o:..\linklist\src\%.c

If you don't have it exactly as shown above, ie "DIR\\%.o" and "DIR\%.c", make won't be able to match the rule.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 5 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Sat 01 Apr 2006 07:12:48 AM UTCpsmithFixed Release4.0=>3.81
Mon 13 Feb 2006 11:39:40 PM UTCpsmithStatusNone=>Fixed
  Assigned toNone=>psmith
  Open/ClosedOpen=>Closed
  Fixed ReleaseNone=>4.0

Back to the top


Powered by Savane 3.1-cleanup1