Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] pkg-infra: use ?= instead of ifdef
Date: Mon, 19 Mar 2012 09:57:47 +0100	[thread overview]
Message-ID: <20120319095747.4b571e8f@skate> (raw)
In-Reply-To: <1332113334-20119-1-git-send-email-arnout@mind.be>

Hello,

Le Mon, 19 Mar 2012 00:28:54 +0100,
"Arnout Vandecappelle (Essensium/Mind)" <arnout@mind.be> a ?crit :

> ifdef considers a variable undefined if it is defined as empty.  In the
> GENTARGETS/AUTOTARGETS/CMAKETARGETS infrastructure, the ifdef construct
> is often used to default to the value from the target-variable if the
> host-variable is not defined.  However, this makes it impossible to
> override the host-variable as empty.  Therefore, use ?= instead to assign
> the defaults.

Could you share a specific example on why this would be useful? I'm
sure there are uses cases, but I'm curious about the one you're having.

> I didn't touch the _VERSION infrastructure because I'm afraid to break it.
> In fact, I think it already is broken (I don't see how that /-to-_
> substitution can work for host-packages).

Not sure I understand what is broken here. What does "/-to-_" means?

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

  reply	other threads:[~2012-03-19  8:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-18 23:28 [Buildroot] [PATCH] pkg-infra: use ?= instead of ifdef Arnout Vandecappelle
2012-03-19  8:57 ` Thomas Petazzoni [this message]
2012-03-19 21:51   ` Arnout Vandecappelle

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=20120319095747.4b571e8f@skate \
    --to=thomas.petazzoni@free-electrons.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