[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] [Groff-commit] groff ChangeLog INSTALL.gen Makef

From: Keith Marshall
Subject: Re: [Groff] [Groff-commit] groff ChangeLog INSTALL.gen Makefil...
Date: Thu, 18 Apr 2013 13:56:20 +0100

On 18 April 2013 13:00, Werner LEMBERG wrote:

> >> If you break a line, please start the new line with the operator:
> >>
> >>   -test -d "$(DESTDIR)$(bindir)" \
> >>            || $(mkinstalldirs) "$(DESTDIR)$(bindir)";
> >
> > (Interesting.  I have binary operators at the end of the line as,
> > like a hyphen in text, they indicate there's more to follow.)

This is true in shell scripts, but *not* in makefiles, (where the entire
compound command must appear on one *logical* line).  Thus, it makes no
semantic difference, in makefiles, whether the logical operator appears
at the end of the continued line, or at the start of the continuation;
the continued line *must* end with a backslash in either case.

> Starting with the operator is GNU style, AFAIK, and it is used
> throughout the groff code.

This may be so; I don't know.  However, although I have occasionally
exploited the feature of operator implied continuation, when writing
shell scripts, I confess to a personal stylistic preference for
placement of the operator at the start of a continuation line; this is
the style I always prefer in makefiles.

Just my 2p.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]