
Dear "Hu Mingkai-B21284",
sorry for the late reply [I have to admit that I kind of loist track where we are with this discussion - too many diverging statements found].
In message 73839B4A0818E747864426270AC332C3043F59F0@zmy16exm20.fsl.freescale.net you wrote:
How do you think of this method? Or can we handle the different options as follows?
MPC8536DS_NAND_config: unconfig @echo "" >$(obj)include/config.h; @echo "#define CONFIG_$(subst MPC8536DS_,,$(subst config,U_BOOT,$@))" \ > $(obj)include/config.h @$(MKCONFIG) -a MPC8536DS ppc mpc85xx mpc8536ds freescale @echo "CONFIG_$(subst MPC8536DS_,,$(subst config,U_BOOT,$@)) = > y" \ >> $(obj)include/config.mk
If there's an orthogonal option, such as 36BIT, we have to handle it seperately:
MPC8536DS_NAND_config \ MPC8536DS_NAND_36BIT_config: unconfig @echo "" >$(obj)include/config.h; @if [ "$(findstring _36BIT_,$@" ] ; then \ echo "#define CONFIG_PHYS_64BIT" >>$(obj)include/config.h ; \ fi @echo "#define CONFIG_$(subst MPC8536DS_,,$(subst config,U_BOOT,$@))" \ > $(obj)include/config.h @$(MKCONFIG) -a MPC8536DS ppc mpc85xx mpc8536ds freescale @echo "CONFIG_$(subst MPC8536DS_,,$(subst config,U_BOOT,$@)) = y" \ >> $(obj)include/config.mk
I don't like either of these.
It should be enough to pass the make target name to the mkconfig script resp. the board config file, i. e. in this case either "CONFIG_MPC8536DS_NAND" or "CONFIG_MPC8536DS_NAND_36BIT". The rest of the scripting/decision making can then be done in the board config file.
If you want to avoid conflicts, feel free to chose a distict prefix, say CONFIG_MK_* or CONFIG_MAKE_* or so.
Best regards,
Wolfgang Denk