ref: b551d82d9230c626fef700c9e7eeb8b497f248a1
parent: bbe5e032a400526ca0b0695a892ec2ef54094bdb
parent: 2978bb8762a20294c97b90aca8b2dd306759d363
author: John Koleszar <jkoleszar@google.com>
date: Tue Nov 20 12:22:37 EST 2012
Merge "make: fix dependency generation for flat build tree" into experimental
--- 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
--
⑨