summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimo Teras <timo.teras@iki.fi>2009-04-16 17:54:28 +0300
committerTimo Teras <timo.teras@iki.fi>2009-04-16 17:54:28 +0300
commit97a71cc5c3c698e211c98212562d3d66ec63f3cd (patch)
tree759d27b94fc7de9882635ff5d87c7be26ae0120b
parentec5b63c5e4d719e07c48b0de0dc0b9f3b25d2cf8 (diff)
downloadapk-tools-97a71cc5c3c698e211c98212562d3d66ec63f3cd.tar.gz
apk-tools-97a71cc5c3c698e211c98212562d3d66ec63f3cd.tar.bz2
apk-tools-97a71cc5c3c698e211c98212562d3d66ec63f3cd.tar.xz
apk-tools-97a71cc5c3c698e211c98212562d3d66ec63f3cd.zip
build: improve dependency file generation
-rw-r--r--Make.rules5
1 files changed, 2 insertions, 3 deletions
diff --git a/Make.rules b/Make.rules
index e633659..cb4e20d 100644
--- a/Make.rules
+++ b/Make.rules
@@ -172,7 +172,7 @@ if_changed_rule = $(if $(strip $(any-prereq) $(arg-check) ), \
#####
# Handle options to gcc.
-c_flags = -Wp,-MD,$(depfile) $(CFLAGS_ALL) $(CFLAGS_$(notdir $@))
+c_flags = -Wp,-MD,$(depfile),-MT,$@ $(CFLAGS_ALL) $(CFLAGS_$(notdir $@))
ld_flags = $(LDFLAGS_ALL) $(LDFLAGS_$(notdir $@))
#####
@@ -183,8 +183,7 @@ cmd_cc_o_c = $(CC) $(c_flags) -c -o $@ $<
define rule_cc_o_c
$(call echo-cmd,cc_o_c) $(cmd_cc_o_c); \
- (echo 'cmd_$@ := $(call make-cmd,cc_o_c)'; \
- echo -n "\n$(obj)/" ; cat $(depfile)) \
+ (echo 'cmd_$@ := $(call make-cmd,cc_o_c)'; echo; cat $(depfile)) \
> $(dot-target).cmd ; \
rm $(depfile)
endef