From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Grandegger Date: Thu, 24 May 2007 14:39:59 +0200 Subject: [U-Boot-Users] [PATCH] fix compilation problem for mpc8349itx CFG_RAMBOOT In-Reply-To: <200705241210.19623@zigzag.lvk.cs.msu.su> References: <20070523231108.D0480353428@atlas.denx.de> <200705241210.19623@zigzag.lvk.cs.msu.su> Message-ID: <4655879F.2050508@grandegger.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Nikita V. Youshchenko wrote: >>> In this case: >>> - command xxx could be compiled in, if CONFIG_CMD_XXX is defined, and >>> not> compiled in if not defined; >>> - it could be easy to define/undefine such macros in config >> But you get problems when you want to configure a board with settings >> like: >> >> * 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. Full ack. We need an include file for the default commands (cmd_default.h) and one for all other commands (cmd_not_default.h). And "cmd_all.h" will include both. Then you can do exactly the same as with the bit masks and it scales nicely. Wolfgang.