Martin Costabel wrote:
[]
> OTOH, the problem we are seeing comes from the backslash-newline 
> combination *in shell commands* in the Makefile where they are treated 
> differently.
> 
> In this case, Apple's make, in agreement with its documentation in
> <file:///Developer/ADC%20Reference%20Library/documentation/DeveloperTools/gnumake/make_5.html#IDX152>
> is doing the following:
> 
>> Such a sequence of lines is combined into a single line, by deleting 
>> the backslash-newline sequences, before passing it to the shell.
> 
> By "deleting", they actually mean "replacing them if necessary with spaces".

I performed some more tests: The result with Apple's /usr/bin/make from 
10.4 is this: Any backslash-newline, together with preceding spaces and 
following tabs and spaces and perhaps additional backslash-newlines, 
results in exactly one space being transmitted to the shell.

In the new revision 3.81-2, the backslash-newline sequences plus 
following tabs are completely eliminated in all cases. If there are 
preceding or following spaces, then one space is transmitted to the 
shell. If there are no such spaces, no space is transmitted to the shell.

This fixes the problem with dpkg and friends, but it still crashes the 
mozilla build exactly as did revision 3.81-1.

IIUIC the new patch for 3.81-2 comes from Apple, and it shows that they 
now take their own documentation seriously instead of trying to be POSIX 
conforming. This still does not make it backward compatible.

Is the 10.5 /usr/bin/make acting like the new 3.81-2? A test would be 
the following Makefile (indented lines have a TAB in front, not spaces, 
and there is no space after the backslashes):

all:
     @echo 'line1\
     line2'\
     line3 \
     | od -c

The results of "make" are

/usr/bin/make: line1 line2 line3
make-3.81-1  : line1\\nline2line3
make-3.81-2  : line1line2line3

Only the second one is POSIXly correct, and only the third one 
corresponds to Apple's documentation, but the crashing legacy Makefiles 
are relying on the first one.

-- 
Martin


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Fink-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fink-devel

Reply via email to