Re: blank line following trailing backslash

2009-01-26 Thread Ralf Wildenhues
* Bob Friesenhahn wrote on Tue, Jan 27, 2009 at 02:47:26AM CET:
> On Mon, 26 Jan 2009, Ralf Wildenhues wrote:
>> Jan already provided a way around this.  Here's why automake warns about
>> it at all: it is not portable to have a backslash followed by a blank
>> line, as some make implementations are rather unpredictable with it:
>
> However, Automake could offer to re-write the list so that the result is 
> portable.

Yes, it could.  Automake however also promises to mostly copy its input
to its output literally, and any diversion of that causes friction, bugs
and unexpected behavior.  Not saying that it couldn't be done safely for
this issue.  But for the related issue of comment lines ending in
backslash it isn't even clear to me which would be the intended result,
and not rewriting both would also be inconsistent.

Oh well, I'm not strictly against fixing this instance, if somebody
provides a good patch (including doc, testsuite updating etc).

Cheers,
Ralf




Re: blank line following trailing backslash

2009-01-26 Thread Andreas
Am Montag, 26. Januar 2009 schrieb Ralf Wildenhues:
> Hello Andreas,
>
> * Andreas wrote on Sun, Jan 25, 2009 at 06:42:52PM CET:
> > fileA.c \
> > fileB.c \
> > fileC.c
>
> [...]
>
> > This is not nice so I thought well let's add a backslash after the
> > last file and add an empty line at the end. Then there's no need to
> > modify the fileC line and everybody just adds a line to the list. This
> > can be resolved. But automake doesn't like this at all. Even though it
> > is clearly visible that this is not wrong it complains. It doesn't
> > even warn about this it produces an error.
>
> Jan already provided a way around this.  Here's why automake warns about
> it at all: it is not portable to have a backslash followed by a blank
> line, as some make implementations are rather unpredictable with it:
> e_002dNewline.html>
> e-Comments.html>
>
> Hope that helps.
>
> Cheers,
> Ralf

Ok, ich verstehe. Ich muß zugeben meine Make und Automake Kenntnisse sind eher 
gering, aber könnte man nicht eine Warnung ausgeben und den letzten Backslash 
entfernen? Immerhin erkennt man ihn, es sollte also möglich sein ihn auch weg 
zu nehmen

Andreas




Re: blank line following trailing backslash

2009-01-26 Thread Bob Friesenhahn

On Mon, 26 Jan 2009, Ralf Wildenhues wrote:

Jan already provided a way around this.  Here's why automake warns about
it at all: it is not portable to have a backslash followed by a blank
line, as some make implementations are rather unpredictable with it:


However, Automake could offer to re-write the list so that 
the result is portable.


Bob
==
Bob Friesenhahn
bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,http://www.GraphicsMagick.org/





Re: blank line following trailing backslash

2009-01-26 Thread Harlan Stenn
* Andreas wrote on Sun, Jan 25, 2009 at 06:42:52PM CET:
> fileA.c \
> fileB.c \
> fileC.c
> [...]

I do it this way:

NULL=
...
FOO= \
 fileA.c\
 fileB.c\
 $(NULL)

BAR= \
 fileC.c\
 fileD.c\
 $(NULL)

Mostly I do this so it is easy for me to "sort" the filenames.

I hope I followed this thread correctly.

H




Re: blank line following trailing backslash

2009-01-26 Thread Ralf Wildenhues
Hello Andreas,

* Andreas wrote on Sun, Jan 25, 2009 at 06:42:52PM CET:
> fileA.c \
> fileB.c \
> fileC.c
[...]
> This is not nice so I thought well let's add a backslash after the
> last file and add an empty line at the end. Then there's no need to
> modify the fileC line and everybody just adds a line to the list. This
> can be resolved. But automake doesn't like this at all. Even though it
> is clearly visible that this is not wrong it complains. It doesn't
> even warn about this it produces an error.

Jan already provided a way around this.  Here's why automake warns about
it at all: it is not portable to have a backslash followed by a blank
line, as some make implementations are rather unpredictable with it:



Hope that helps.

Cheers,
Ralf




Re: blank line following trailing backslash

2009-01-26 Thread Raja R Harinath
Hi,

Andreas  writes:

> I just had an ingenious idea to limit conflicts in versioning systems.
>
> When you specify a list of files for a rule you put every file in a line like 
> this.
>
> fileA.c \
> fileB.c \
> fileC.c

One slightly ugly-looking approach I've seen is

  EMPTY =
  foo_SOURCES = \
 fileA.c \
 fileB.c \
 fileC.c \
 $(EMPTY)

- Hari





Re: blank line following trailing backslash

2009-01-25 Thread Jan Engelhardt

On Sunday 2009-01-25 18:42, Andreas wrote:
>
>When you specify a list of files for a rule you put every file in a line like 
>this.
>
>fileA.c \
>fileB.c \
>fileC.c
>
>now if 2 independent people add another file fileD and fileE to that list you 
>have a conflict because both of them modify the line with fileC.c to add the 
>necessary backslash.

>I think this is not nice. Is there a way around this problem? Can I do 
>something to make all file list entries identical? Or can I tell automake to 
>ignore this or only produce a warning?

foo_SOURCES =
foo_SOURCES += fileA.c
foo_SOURCES += fileB.c
foo_SOURCES += fileC.c
foo_SOURCES += fileD.c
foo_SOURCES += fileE.c
...




blank line following trailing backslash

2009-01-25 Thread Andreas
Hello everybody,

I just had an ingenious idea to limit conflicts in versioning systems.

When you specify a list of files for a rule you put every file in a line like 
this.

fileA.c \
fileB.c \
fileC.c

now if 2 independent people add another file fileD and fileE to that list you 
have a conflict because both of them modify the line with fileC.c to add the 
necessary backslash.

This is not nice so I thought well let's add a backslash after the last file 
and add an empty line at the end. Then there's no need to modify the fileC 
line and everybody just adds a line to the list. This can be resolved. But 
automake doesn't like this at all. Even though it is clearly visible that 
this is not wrong it complains. It doesn't even warn about this it produces 
an error.

I think this is not nice. Is there a way around this problem? Can I do 
something to make all file list entries identical? Or can I tell automake to 
ignore this or only produce a warning?

Thanks a lot

Andreas