
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.