[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Shell comments in make rules (was: backcompat5.test: avoid '##'-style co
From: |
Stefano Lattarini |
Subject: |
Shell comments in make rules (was: backcompat5.test: avoid '##'-style comments inside recipe commands) |
Date: |
Tue, 16 Nov 2010 20:11:11 +0100 |
User-agent: |
KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; ) |
On Tuesday 16 November 2010, Ralf Wildenhues wrote:
> * Stefano Lattarini wrote on Mon, Nov 15, 2010 at 11:57:14PM CET:
> > On Monday 15 November 2010, Ralf Wildenhues wrote:
> > > * Stefano Lattarini wrote on Sun, Nov 14, 2010 at 11:00:16PM CET:
> > > > <http://autobuild.josefsson.org/automake/log-201011141902490189000.txt>
> > >
> > > > > FAIL: backcompat5.test (exit: 1)
> > > > > ================================
> > > > >
> > > > [CUT]
> > > > > find ../foo-1.0 -print ## useful for debugging
> > > > > find: missing conjunction
> > > > > *** Exit 1
> > > > > Stop.
> > > > Seems like a limitation (bug) of the find utility; what I'd do is
> > > > replacing the above find command simply with:
> > > > find ../foo-1.0
> > > > WDYT?
> > >
> > > I think the comment is taken as part of the command.
> > Hmm... that's an automake comment: shouldn't automake strip it?
>
> Quoting automake.info:
>
> Automake also allows a form of comment that is _not_ copied into the
> output; all lines beginning with `##' (leading spaces allowed) are
> completely ignored by Automake.
>
> Letting automake strip '##.*' within recipe commands is not safe, if we
> acknowledge that some makes obey decent quoting semantics (keeping '#'
> inside single- or double-quoted strings) and the user may rely on that.
That makes definitely sense; sorry for my stupid misunderstanding.
Oh well, at least I've learnt something new today.
> > But even if it doesn't, shouldn't the comment in question be consired
> > a shell comment anyway? If that's not the case, well, I'd regard this
> > behaviour as a severe bug in the OSF make implementation.
>
> Yes, and it is quite well documented in
> info Autoconf 'Comments in Make Rules'
But that only says:
"Some make treat anything starting with a tab as a command for the
current rule, even if the tab is immediately followed by a #."
which is not relvant for the current situation. And BTW, if I'm not
mistaken, Automake warns about that unportability (which is why I
managed to avoid it in many if not all my previous patches).
Regards,
Stefano
- Re: Testsuite failures on Tru64 OSF 5.1, (continued)
- Re: Testsuite failures on Tru64 OSF 5.1, Stefano Lattarini, 2010/11/15
- Re: Testsuite failures on Tru64 OSF 5.1, Ralf Wildenhues, 2010/11/15
- Re: Testsuite failures on Tru64 OSF 5.1, Peter Rosin, 2010/11/16
- Re: Testsuite failures on Tru64 OSF 5.1, Stefano Lattarini, 2010/11/16
- Re: Testsuite failures on Tru64 OSF 5.1, Peter Rosin, 2010/11/16
- Re: Testsuite failures on Tru64 OSF 5.1, Stefano Lattarini, 2010/11/16
- Re: Testsuite failures on Tru64 OSF 5.1, Stefano Lattarini, 2010/11/16
Re: Testsuite failures on Tru64 OSF 5.1, Ralf Wildenhues, 2010/11/15
- Re: Testsuite failures on Tru64 OSF 5.1, Stefano Lattarini, 2010/11/15
- backcompat5.test: avoid '##'-style comments inside recipe commands. (was: Testsuite failures on Tru64 OSF 5.1), Ralf Wildenhues, 2010/11/16
- Shell comments in make rules (was: backcompat5.test: avoid '##'-style comments inside recipe commands),
Stefano Lattarini <=
- Re: Shell comments in make rules (was: backcompat5.test: avoid '##'-style comments inside recipe commands), Ralf Wildenhues, 2010/11/16
- Re: Shell comments in make rules, Stefano Lattarini, 2010/11/16
- Re: Shell comments in make rules, Ralf Wildenhues, 2010/11/16
- Re: Shell comments in make rules, Stefano Lattarini, 2010/11/16
Spurious failures of some silent*.test tests when cc != gcc (was: Testsuite failures on Tru64 OSF 5.1), Stefano Lattarini, 2010/11/17
Testsuite failures on Solaris 2.10 on SPARC (was: testsuite results from master), Stefano Lattarini, 2010/11/14