Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Korsgaard <peter@korsgaard.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] utils/checkpackagelib/lib_mk.py: handle 'else' and 'elif' statements
Date: Tue, 05 Jan 2021 22:50:19 +0100	[thread overview]
Message-ID: <87v9cb5a04.fsf@dell.be.48ers.dk> (raw)
In-Reply-To: <20201209153219.17253-1-patrickdepinguin@gmail.com> (Thomas De Schampheleire's message of "Wed, 9 Dec 2020 16:32:18 +0100")

>>>>> "Thomas" == Thomas De Schampheleire <patrickdepinguin@gmail.com> writes:

 > From: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
 > An 'else' or 'elif' clause inside a make conditional should not be indented
 > in the same way as the if/endif clause. check-package did not recognize the
 > else statement and expected an indentation.

 > For example:

 > ifdef FOOBAR
 > 	interesting
 > else
 > 	more interesting
 > endif

 > would, according to check-package, need to become:

 > ifdef FOOBAR
 > 	interesting
 > 	else
 > 	more interesting
 > endif

 > Treat 'else' and 'elif' the same as if-like keywords in the Indent test, but
 > take into account that 'else' is also valid shell, so we need to correctly
 > handle line continuation to prevent complaining about the 'else' in:

 > ifdef FOOBAR
 > 	if true; \
 > 	    ... \
 > 	else \
 > 	    ... \
 > 	fi
 > endif

 > We don't add the 'else' and 'elif' statements to start_conditional, because
 > it would cause incorrect nesting counting in class OverriddenVariable.

 > Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>

Committed to 2020.02.x and 2020.11.x, thanks.

-- 
Bye, Peter Korsgaard

      parent reply	other threads:[~2021-01-05 21:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-09 15:32 [Buildroot] [PATCH] utils/checkpackagelib/lib_mk.py: handle 'else' and 'elif' statements Thomas De Schampheleire
2021-01-02 12:55 ` Thomas Petazzoni
2021-01-05 21:50 ` Peter Korsgaard [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87v9cb5a04.fsf@dell.be.48ers.dk \
    --to=peter@korsgaard.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox