Daniel Macks wrote:
> On Tue, Jul 24, 2007 at 02:26:13PM +0200, Martin Costabel wrote:
>> Dominique Dhumieres wrote:
>> []
>>> The origin of the problem seems obvious: missing space before \ in
>>>
>>> -DHAS_TMPL_RETENTION\
>>>
>>> but I did not find how to fix it. Any idea?
>> Try
>>
>>    fink remove make
> 
> So the common theme to these errors caused by fink's make-3.81-1 is
> the missing space before \ for multiline rules (looks like same case
> as in debconf). I wonder if it's related to this bug:
> 
>   http://savannah.gnu.org/bugs/?16670

Only insofar as this bug also concerns escaped newlines. This bug 
(multiple backslash-newlines illegally but sensibly treated as single 
space) seems to be present in both make versions 3.80 and 3.81 and does 
not look like it would pose a problem. They don't seem to take it 
seriously either.

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".

The POSIX make documentation and the GNU make documentation describe 
what Fink's make-3.81 is doing, namely
<http://www.gnu.org/software/make/manual/make.html#Splitting-Lines>

> backslash-newline pairs are not removed from the command. 
> Both the backslash and the newline characters are preserved and passed to the 
> shell. 
> How the backslash-newline is interpreted depends on your shell. If the
> first character of the next line after the backslash-newline is a tab,
> then that tab (and only that tab) is removed. Whitespace is never added
> to the command.

The caveat "How the backslash-newline is interpreted depends on your 
shell" means in short "you will never know", because this is highly 
context-dependent. Depending on the command that is involved and on the 
quotation level, it means that the backslash-newline is

-sometimes left alone (which gave us perl syntax errors in dpkg)
-sometimes removed (which gave us the argument parsing error in mozilla)

Long live the progress...

So it seems that Fink's newer make conforms with the POSIX rules that 
Apple has vowed to obey in the future. Whether they do it in 10.5, I 
don't know. But it seems the Makefiles that are annoying us, in dpkg, 
mozilla etc., are using an obsolete (but arguably more reasonable) syntax.


-- 
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