Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [git commit] pkg-*targets.mk: factorize and fix $(PKG)_SRCDIR and $(PKG)_BUILDDIR declaration
Date: Wed, 25 Jul 2012 01:15:11 +0200	[thread overview]
Message-ID: <500F2C7F.4080103@mind.be> (raw)
In-Reply-To: <20120722182025.E29919692E@busybox.osuosl.org>

On 07/22/12 19:28, Thomas Petazzoni wrote:
> +ifndef $(3)_SUBDIR
> + ifdef $(2)_SUBDIR
> +  $(3)_SUBDIR = $$($(2)_SUBDIR)
> + else
> +  $(3)_SUBDIR ?=
> + endif
> +endif

  Actually, I think this should be

$(2)_SUBDIR ?= $$($(3)_SUBDIR))

  There definitely shouldn't be an assignment to $(3)_SUBDIR here,
and also the whole ifdef construct is unnecessary.

> +
> +$(2)_SRCDIR		       = $$($(2)_DIR)/$$($(2)_SUBDIR)
> +$(2)_BUILDDIR		       ?= $$($(2)_SRCDIR)

  This looks like a missed refactoring opportunity:

_SRCDIR is still assigned to in pkg-cmake.mk

I don't see why anybody would want to override _BUILDDIR, so the ?= is
redundant.  And since it's always equal to _SRCDIR, why not just use
_SRCDIR?

  Regards,
  Arnout
-- 
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

  reply	other threads:[~2012-07-24 23:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-22 17:28 [Buildroot] [git commit] pkg-*targets.mk: factorize and fix $(PKG)_SRCDIR and $(PKG)_BUILDDIR declaration Thomas Petazzoni
2012-07-24 23:15 ` Arnout Vandecappelle [this message]
2012-07-25  9:04   ` Samuel Martin

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=500F2C7F.4080103@mind.be \
    --to=arnout@mind.be \
    --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