From: Jon Loeliger Date: Thu, 24 May 2007 13:36:30 -0500 Subject: [U-Boot-Users] [PATCH] fix compilation problem for mpc8349itx CFG_RAMBOOT In-Reply-To: <20070524123653.1231835264E@atlas.denx.de> References: <20070524123653.1231835264E@atlas.denx.de> Message-ID: <1180031790.21124.19.camel@ld0161-tx32> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thu, 2007-05-24 at 07:36, Wolfgang Denk wrote: > Dear Nikita, > > in message <200705241210.19623@zigzag.lvk.cs.msu.su> you wrote: > > > > > * all commands except foo, bar and baz > > > > #include "define_all_cmds.h" > > #undef CONFIG_CMD_FOO > > #undef CONFIG_CMD_BAR > > #undef CONFIG_CMD_BAZ > > > > > * all default commands plus foo, but without baz > > > > #include "define_default_cmds.h" > > #define CONFIG_CMD_FOO > > #undef CONFIG_CMD_BAZ > > > > > I guess then you will have to list up all commands you want to > > > include somewhere - either in the board onfig file or in another > > > header file. > > > > Sure - in separate headers files. I see no problems here. It scales. > > Good idea. Shall we go for that? > > Any other opinions, ACKs or NACKs? I am, in general, in favor of the approach. We should be a bit cautious though. In this example: #include "define_default_cmds.h" #define CONFIG_CMD_FOO #undef CONFIG_CMD_BAZ it is likely that this should rather be: #include "define_default_cmds.h" #ifndef CONFIG_CMD_FOO #define CONFIG_CMD_FOO #endif #undef CONFIG_CMD_BAZ or #include "define_default_cmds.h" #undef CONFIG_CMD_FOO #define CONFIG_CMD_FOO #undef CONFIG_CMD_BAZ just in case CONFIG_CMD_FOO is previously defined to something non-empty like "1" or so. jdl