[flashrom] [PATCH] flashrom dependencies

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Tue Mar 30 05:12:26 CEST 2010


Hi Stefan,

thanks for your patch. Review follows.

On 24.03.2010 15:39, Stefan Reinauer wrote:
> With the attached patch it is no longer necessary to have an extra
> dependency step.
> Create dependencies on the fly rather than in a separate step.
>
> Signed-off-by: Stefan Reinauer <stepan at coresystems.de>
>
> --- Makefile	(revision 972)
> +++ Makefile	(working copy)
> @@ -244,17 +244,14 @@
>  TAROPTIONS = $(shell LC_ALL=C tar --version|grep -q GNU && echo "--owner=root --group=root")
>  
>  %.o: %.c .features
> -	$(CC) $(CFLAGS) $(CPPFLAGS) $(FEATURE_CFLAGS) $(SVNDEF) -o $@ -c $<
> +	$(CC) -MMD $(CFLAGS) $(CPPFLAGS) $(FEATURE_CFLAGS) $(SVNDEF) -o $@ -c $<
>  
>  clean:
> -	rm -f $(PROGRAM) *.o
> +	rm -f $(PROGRAM) $(OBJS) $(OBJS:.o=.d)
>  
>   

Unfortunately, this breaks make clean (and therefore make distclean) for
non-default configurations because OBJS will only contain the currently
selected modules. You can reproduce this easily with

# make CONFIG_BITBANG_SPI=yes CONFIG_GFXNVIDIA=yes CONFIG_ATAHPT=yes
CONFIG_DEDIPROG=yes
# make clean
# ls *.o *.d
atahpt.d  atahpt.o  bitbang_spi.d  bitbang_spi.o  dediprog.d 
dediprog.o  gfxnvidia.d  gfxnvidia.o

Regards,
Carl-Daniel

-- 
http://www.hailfinger.org/





More information about the flashrom mailing list