public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC PATCH] Provide a mechanism to avoid using #ifdef everywhere
Date: Tue, 19 Feb 2013 20:14:12 +0100	[thread overview]
Message-ID: <20130219191412.6C561200530@gemini.denx.de> (raw)
In-Reply-To: <CAPnjgZ2NvwAB0t4v=41BaVxqMaCgAU7XBTTbM1ZRT0fTA_40tA@mail.gmail.com>

Dear Simon Glass,

In message <CAPnjgZ2NvwAB0t4v=41BaVxqMaCgAU7XBTTbM1ZRT0fTA_40tA@mail.gmail.com> you wrote:
> 
> > You are wrong.  This includes a number of functions, and macros, too,
> > for example:
...
> That's a very manageable and small series of patches I think if we
> want to use either. I do like an obvious name, and we already have
> CONFIG_...

I think we really need to define a new, so far unused name space for
these, and reserve it for such purpose.

> Yes this will definitely increase the time. The current brute force
> 'sed' of all headers isn't very efficient. How impossible would it be
> to regenerate this only when someone adds a new CONFIG, and then check
> it into the source?

Doesn't work - assume you are hacking on your new code (without
checking in) - and if runs haywire because the needed re-scan is not
done...

> > Does not the already existing "include/autoconf.mk" contain this
> > information?  In any case, please check "tools/scripts/define2mk.sed"
> 
> It only has a list of CONFIG variables that are enabled for the board.
> The C code will then get compile errors if it uses a config that is
> not enabled. So we need to define all the others to be 0 so that the
> code still compiles.

I see.

Thanks.

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The human race is faced with a cruel choice: work  or  daytime  tele-
vision.

  reply	other threads:[~2013-02-19 19:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-18 17:18 [U-Boot] [RFC PATCH] Provide a mechanism to avoid using #ifdef everywhere Simon Glass
2013-02-18 19:23 ` Wolfgang Denk
2013-02-18 21:36   ` Tom Rini
2013-02-19  5:18     ` Simon Glass
2013-02-19  5:13   ` Simon Glass
2013-02-19  9:19     ` Wolfgang Denk
2013-02-19 14:17       ` Harvey Chapman
2013-02-19 16:48       ` Simon Glass
2013-02-19 19:14         ` Wolfgang Denk [this message]
2013-02-21 20:58           ` Simon Glass

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=20130219191412.6C561200530@gemini.denx.de \
    --to=wd@denx.de \
    --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