From mboxrd@z Thu Jan 1 00:00:00 1970 From: Timur Tabi Date: Tue, 12 Jun 2007 10:22:11 -0500 Subject: [U-Boot-Users] [PATCH: cmdcfg: 00/19] Introduce initial versions of new Command Config files. In-Reply-To: References: Message-ID: <466EBA23.4030308@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Jon Loeliger wrote: > This patch series implements a "temporary step" in > which both the old and new configuration mechanism > are still fully supported, but the old style using > CFG_CMD_* is deprecated. All references that used > to exist with CFG_CMD_* are now duplicated to have > (CFG_CMD_x || CONFIG_CMD_x) An alternative would have been to define CONFIG_COMMANDS based on the CONFIG_CMD_x values. In cmd_confdefs.h, add something like this: /* If CONFIG_COMMANDS is not defined, then assume we're using CONFIG_CMD_x */ #ifndef CONFIG_COMMANDS #ifdef CONFIG_CMD_AUTOSCRIPT #undef CONFIG_CMD_AUTOSCRIPT #define CONFIG_CMD_AUTOSCRIPT CONFIG_CMD_AUTOSCRIPT #else #define CONFIG_CMD_AUTOSCRIPT 0 #endif ... ( repeat for each CONFIG_CMD_x ) #define CONFIG_COMMANDS \ (CONFIG_CMD_AUTOSCRIPT | \ CONFIG_CMD_x (repeat for each CONFIG_CMD_x) #endif /* #ifndef CONFIG_COMMANDS */ With this technique, you won't need to modify all of the source files that use CONFIG_COMMANDS. -- Timur Tabi Linux Kernel Developer @ Freescale