[Buildroot] [git commit] pkg-*targets.mk: factorize and fix $(PKG)_SRCDIR and $(PKG)_BUILDDIR declaration
Arnout Vandecappelle
arnout at mind.be
Tue Jul 24 23:15:11 UTC 2012
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
More information about the buildroot
mailing list