public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] autoconf.mk: include before config.mk for top level files
Date: Wed, 22 Jul 2009 03:25:57 -0400	[thread overview]
Message-ID: <200907220325.58764.vapier@gentoo.org> (raw)
In-Reply-To: <20090722071207.A3B8C832E416@gemini.denx.de>

On Wednesday 22 July 2009 03:12:07 Wolfgang Denk wrote:
> Mike Frysinger wrote:
> > By including autoconf.mk before config.mk, all top level files can use
> > any config options it sets up (like <arch>_config.mk) or the Makefile
> > itself without being forced to use lazy evaluation.
> > ---
> >  Makefile |   10 +++++++---
> >  1 files changed, 7 insertions(+), 3 deletions(-)
>
> Can you please explain how this interacts with / impacts / undoes
> commit 3db75d9c "fix: missing autoconfig.mk from general Makefile"?

it complements that patch

> I have to admit that I did not really understood the need for commit
> 3db75d9c, and neither do I in this case, so I think I better ask now
> before I completely lose track of what you are doing here, or why.
>
> [None of the systems I work with seems to need ayhting like that.]

the idea is simple: use $(CONFIG_...) in top level files.  before Jean's fix, 
it wasnt possible to do this because the autoconf.mk file was included with 
"sinclude", and it was included before autoconf.mk.dep.  that means make would 
look for the file to include, not find it, and then silently skip it.  with 
Jean's fix, it would generate the file and then include it.

however, this occurs after config.mk and related files are included.  if you 
use lazy make evaluation, this really doesnt matter.  but in the Blackfin 
config.mk, i use := so that i can sanitize variables:
CONFIG_BFIN_CPU := $(strip $(subst ",,$(CONFIG_BFIN_CPU)))
that means CONFIG_BFIN_CPU has to be defined before my .mk file.  i could 
workaround this issue by creating a new variable like:
BFIN_CPU = $(strip $(subst ",,$(CONFIG_BFIN_CPU)))
but then i'd have to go around and fix all the references to the variables i 
modify to use the new one, and i have to remember in the future to use the 
indirect variable rather than the CONFIG_ ones coming from the build system.  
i.e. it makes a lot more sense to keep thing sane and set it up early so as to 
avoid an ugly nest of implicit fragile rules.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20090722/64e27c45/attachment.pgp 

  reply	other threads:[~2009-07-22  7:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-22  2:59 [U-Boot] [PATCH] autoconf.mk: include before config.mk for top level files Mike Frysinger
2009-07-22  7:12 ` Wolfgang Denk
2009-07-22  7:25   ` Mike Frysinger [this message]
2009-07-23 19:44 ` Wolfgang Denk

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=200907220325.58764.vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=u-boot@lists.denx.de \
    /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