From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Denk Date: Tue, 19 Feb 2013 20:14:12 +0100 Subject: [U-Boot] [RFC PATCH] Provide a mechanism to avoid using #ifdef everywhere In-Reply-To: References: <1361207920-24983-1-git-send-email-sjg@chromium.org> <20130218192348.7AB75200531@gemini.denx.de> <20130219091915.6690D200530@gemini.denx.de> Message-ID: <20130219191412.6C561200530@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Simon Glass, In message 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.