[Buildroot] pkg-generic.mk question

ANDY KENNEDY ANDY.KENNEDY at adtran.com
Thu Jan 10 18:58:00 UTC 2013


All,

Consider the following (from pkg-generic.mk):

define inner-generic-package

<snip>

$(2)_TYPE                       =  $(5)

<snip>

$(2)_DIR        =  $$(BUILD_DIR)/$$($(2)_BASE_NAME)


The <PKG>_TYPE is set to "$" (5), however, the <PKG>_DIR is set to
"$$" (BUILD_DIR)/$$<the rest>.  My question is why the need for the $$
for BUILD_DIR?  I THINK I understand the reason for the
$$($(2)_BASE_NAME):  The eval will boil this down to $(<PKG>_BASE_NAME),
which will the get POST interrupted AFTER <PKG>_BASE_NAME is assigned
LATER, right?

But, I'm confused as to the reason for the $$(BUILD_DIR).  It is
assigned well before the reading of this file and is essentially a
static variable.

NOTE:  This question is for my own edification and learning.  I'm not
questioning the ability/logic of this Makefile as I know it works
perfectly.  I'm attempting to do something similar in a Makefile of my
own.

Thanks in advance for the information!

Andy


More information about the buildroot mailing list