Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] uboot.pbl - make 'include' issue
Date: Thu, 1 May 2014 01:02:40 +0200	[thread overview]
Message-ID: <20140430230240.GH3336@free.fr> (raw)
In-Reply-To: <20140501004716.5a27705a@skate>

Thomas, Ryan, All,

On 2014-05-01 00:47 +0200, Thomas Petazzoni spake thusly:
> Dear Yann E. MORIN,
> 
> On Thu, 1 May 2014 00:39:10 +0200, Yann E. MORIN wrote:
> 
> > Yes, that's not so surprising:
> > 
> >   - the $(eval $(generic-package)) use the $(pkgname) macro, which uses
> >     the $(pkgdir) macro
> > 
> >   - the $(pkgdir) macro is defined as thus:
> >         pkgdir = $(dir $(lastword $(MAKEFILE_LIST)))
> > 
> >   - and $(MAKEFILE_LIST) contains the _last_ Makefile that was parsed
> > 
> >   - but the pkg-inra expects that the last Makefile parsed be the
> >     current Makefile
> > 
> > Since you include other Makefiles from uboot.mk:
> >     boot/uboot/ppc-freescale/uboot-ppc-freescale.mk
> > 
> > then $(MAKEFILE_LIST) will end up with that when you call the usual eval
> > above, from which the generic-package derives the $(pkgdir) to be
> > "boot/uboot/ppc-freescale", and thus the $(pkgname) to be
> > "ppc-freescale", and not the "uboot" you expect.
> 
> I haven't looked at the details, but linux/linux.mk seems to be doing
> the exact same thing with the "Linux extensions" for real-time, and
> doesn't appear to have any problem. It does:
> 
> include $(sort $(wildcard linux/linux-ext-*.mk))
> 
> $(eval $(generic-package))
> 
> So by the time generic-package is expanded, the last included makefile
> is not linux.mk. And still the thing works.

Indeed, but the includes are all in the same directory, so pkgdir still
return "linux" and thus the pkgname is correct.

In Ryan's case, the included Makefiles are in sub-dirs of uboot, so
pkgdir returns that last sub-dir, hence the wrong pkgname.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

  reply	other threads:[~2014-04-30 23:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-30 21:20 [Buildroot] uboot.pbl - make 'include' issue Ryan Barnett
2014-04-30 22:39 ` Yann E. MORIN
2014-04-30 22:42   ` Yann E. MORIN
2014-04-30 22:47   ` Thomas Petazzoni
2014-04-30 23:02     ` Yann E. MORIN [this message]
2014-05-01  0:26       ` Thomas Petazzoni
2014-05-01 16:58       ` rjbarnet at rockwellcollins.com

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=20140430230240.GH3336@free.fr \
    --to=yann.morin.1998@free.fr \
    --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