From mboxrd@z Thu Jan 1 00:00:00 1970 From: Timur Tabi Date: Tue, 12 Jun 2007 11:08:27 -0500 Subject: [U-Boot-Users] [PATCH: cmdcfg: 00/19] Introduce initial versions of new Command Config files. In-Reply-To: <20070612155935.62C69353A64@atlas.denx.de> References: <20070612155935.62C69353A64@atlas.denx.de> Message-ID: <466EC4FB.9070706@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 Wolfgang Denk wrote: > In message <466EBA23.4030308@freescale.com> you wrote: >> #ifdef CONFIG_CMD_AUTOSCRIPT >> #undef CONFIG_CMD_AUTOSCRIPT >> #define CONFIG_CMD_AUTOSCRIPT CONFIG_CMD_AUTOSCRIPT >> #else >> #define CONFIG_CMD_AUTOSCRIPT 0 >> #endif > > > #define foo foo ??? Not that looks uterly strange to me... Sorry, that was a typo. I meant #define CONFIG_CMD_AUTOSCRIPT CFG_CMD_AUTOSCRIPT >> ... ( repeat for each CONFIG_CMD_x ) > > grrrghh.... It's still better than modifying dozens of source files! > >> #define CONFIG_COMMANDS \ >> (CONFIG_CMD_AUTOSCRIPT | \ >> CONFIG_CMD_x (repeat for each CONFIG_CMD_x) > > Did you actually test if this works? No exactly, but I use something similar in MPC8349ITX.h. > >> With this technique, you won't need to modify all of the source files that use >> CONFIG_COMMANDS. > > But we *do* want to modify all files to move them to using the new > scheme. Only when we remove the old method entirely. This is a transitional patch - it allows config header files to use CONFIG_CMD_xxx today, and it avoids complicated #if pragmas in all those source files. -- Timur Tabi Linux Kernel Developer @ Freescale