shithub: libvpx

Download patch

ref: 2978bb8762a20294c97b90aca8b2dd306759d363
parent: a57dbd957b44a5b72bd404a3b006aaf5a5eb4bc0
author: John Koleszar <jkoleszar@google.com>
date: Mon Nov 19 05:45:20 EST 2012

make: fix dependency generation for flat build tree

Update the fmt_deps function to use a new sed expression to convert the
object file name generated by the compiler into the path-transformed
name of the .o and .d files.

Prior to this patch, changing a header file would not trigger an
incremental build.

Change-Id: I07f498a1d134577b89a72e3f1143c737b31a0636

--- a/build/make/Makefile
+++ b/build/make/Makefile
@@ -112,7 +112,7 @@
 	$(qexec)mkdir -p $$(dir $$@)
 	$(qexec)$(CC) $$(INTERNAL_CFLAGS) $$(CFLAGS) -M $$< | $(fmt_deps) > $$@
 
-$(BUILD_PFX)$(call xform_obj_path,$(1))%.c.o: $(1)%.c $(BUILD_PFX)$(call xform_obj_path,$(1))%.c.d
+$(BUILD_PFX)$(call xform_obj_path,$(1))%.c.o: $(1)%.c
 	$(if $(quiet),@echo "    [CC] $$@")
 	$(qexec)$(CC) $$(INTERNAL_CFLAGS) $$(CFLAGS) -c -o $$@ $$<
 
--- a/build/make/configure.sh
+++ b/build/make/configure.sh
@@ -435,10 +435,10 @@
 EOF
 
     if enabled rvct; then cat >> $1 << EOF
-fmt_deps = sed -e 's;^__image.axf;\$(dir \$@)\$(notdir \$<).o \$@;' #hide
+fmt_deps = sed -e 's;^__image.axf;\$\${@:.d=.o} \$\$@;' #hide
 EOF
     else cat >> $1 << EOF
-fmt_deps = sed -e 's;^\([a-zA-Z0-9_]*\)\.o;\$(dir \$@)\1\$(suffix \$<).o \$@;'
+fmt_deps = sed -e 's;^\([a-zA-Z0-9_]*\)\.o;\$\${@:.d=.o} \$\$@;'
 EOF
     fi