[U-Boot] [PATCH 06/12] autoscript: Move conditional compilation to Makefile

Peter Tyser ptyser at xes-inc.com
Thu Aug 28 17:26:53 CEST 2008


Hi Jean-Chritophe,

On Thu, 2008-08-28 at 12:27 +0200, Jean-Christophe PLAGNIOL-VILLARD
wrote:
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
> ---
>  common/Makefile                           |    3 +-
>  common/{cmd_autoscript.c => autoscript.c} |   44 --------
>  common/cmd_autoscript.c                   |  158 -----------------------------
>  3 files changed, 2 insertions(+), 203 deletions(-)
>  copy common/{cmd_autoscript.c => autoscript.c} (79%)
> 
> diff --git a/common/Makefile b/common/Makefile
> index 0c8ef5b..92d7a9e 100644
> --- a/common/Makefile
> +++ b/common/Makefile
> @@ -31,7 +31,8 @@ COBJS-y += main.o
>  COBJS-$(CONFIG_CMD_BEDBUG) += bedbug.o
>  COBJS-y += circbuf.o
>  COBJS-$(CONFIG_CMD_AMBAPP) += cmd_ambapp.o
> -COBJS-y += cmd_autoscript.o
> +COBJS-$(CONFIG_AUTOSCRIPT)$(CONFIG_CMD_AUTOSCRIPT) += autoscript.o

Will we run into problems when both CONFIG_AUTOSCRIPT and
CONFIG_CMD_AUTOSCRIPT are defined?  Adding the following should account
for that situation:

COBJS-y += $(COBJS-yy)

> +COBJS-$(CONFIG_CMD_AUTOSCRIPT) += cmd_autoscript.o
>  COBJS-$(CONFIG_CMD_BDI) += cmd_bdinfo.o
>  COBJS-$(CONFIG_CMD_BEDBUG) += cmd_bedbug.o
>  COBJS-$(CONFIG_CMD_BMP) += cmd_bmp.o

Best,
Peter



More information about the U-Boot mailing list