]> granicus.if.org Git - libvpx/commitdiff
make: fix dependency generation for flat build tree
authorJohn Koleszar <jkoleszar@google.com>
Mon, 19 Nov 2012 18:45:20 +0000 (10:45 -0800)
committerJohn Koleszar <jkoleszar@google.com>
Tue, 20 Nov 2012 15:36:35 +0000 (07:36 -0800)
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

build/make/Makefile
build/make/configure.sh

index be9ee6ddf95b91e6426c220ce5603bfd6d66b6f6..b5d0d52ece3143f3d6c7f2db399e106681f3485a 100644 (file)
@@ -112,7 +112,7 @@ $(BUILD_PFX)$(call xform_obj_path,$(1))%.c.d: $(1)%.c
        $(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 $$@ $$<
 
index 05bbabe777d3a9e1ff880f2907c13cd4e9485fb3..d9b0fe7cd5b7a23bbad9784d2e270d2897e99fd5 100755 (executable)
@@ -435,10 +435,10 @@ RTCD_OPTIONS = ${RTCD_OPTIONS}
 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