From: Luca Ceresoli <luca@lucaceresoli.net>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] netsnmp: add option to enable debugging code
Date: Mon, 19 Mar 2012 10:19:02 +0100 [thread overview]
Message-ID: <4F66FA06.1070205@lucaceresoli.net> (raw)
In-Reply-To: <87pqc9mym5.fsf@macbook.be.48ers.dk>
Peter Korsgaard wrote:
>>>>>> "Arnout" == Arnout Vandecappelle<arnout@mind.be> writes:
> Arnout> On Thursday 15 March 2012 22:04:27 Luca Ceresoli wrote:
> >> +ifneq ($(BR2_PACKAGE_NETSNMP_ENABLE_DEBUGGING),y)
> >> + NETSNMP_CONF_OPT += --disable-debugging
> >> +endif
>
> Arnout> Peter, is it correct that you prefer to have both the positive
> Arnout> and the negative option in such a situation? I.e.
>
> Arnout> ifeq ($(BR2_PACKAGE_NETSNMP_ENABLE_DEBUGGING),y)
> Arnout> NETSNMP_CONF_OPT += --enable-debugging
> Arnout> else
> Arnout> NETSNMP_CONF_OPT += --disable-debugging
> Arnout> endif
>
> I don't feel strongly about it, but the 2nd approach means you don't
> need to look at configure.ac to check if it defaults to --enable (and it
> won't break if the default is ever changed).
>
Arnout's version is definitely more robust, although less concise and more
boring to write.
But there are many other examples in the current Buildroot code without the
else part. So I think we should have a guideline to follow coherently.
It would be great to have a macro to generate all of this boilerplate code,
both robust and concise. I would love to be able to write something like:
$(call ac-arg-endisable,BR2_PACKAGE_NETSNMP_ENABLE_DEBUGGING,debugging)
It's even on my TODO list, which is the first step to many great things!
Luca
next prev parent reply other threads:[~2012-03-19 9:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-15 21:04 [Buildroot] [PATCH] netsnmp: add option to enable debugging code Luca Ceresoli
2012-03-18 17:37 ` Arnout Vandecappelle
2012-03-18 20:40 ` Peter Korsgaard
2012-03-19 9:19 ` Luca Ceresoli [this message]
2012-03-18 20:41 ` Peter Korsgaard
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=4F66FA06.1070205@lucaceresoli.net \
--to=luca@lucaceresoli.net \
--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