diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2008-06-01 12:50:21 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2008-06-01 12:50:21 +0000 |
commit | e41fbf6daa3ddcb1891a66cc96d15c3ab30d462f (patch) | |
tree | e4722f29c7d25eba706a518832827f463990123c /Makerules | |
parent | 6f538799296c9145e906ba53ddec2226b90cc304 (diff) | |
download | uClibc-alpine-e41fbf6daa3ddcb1891a66cc96d15c3ab30d462f.tar.bz2 uClibc-alpine-e41fbf6daa3ddcb1891a66cc96d15c3ab30d462f.tar.xz |
- since we force make into trying to rebuild unconditionally, we have to
check for changed prerequisites manually.
Diffstat (limited to 'Makerules')
-rw-r--r-- | Makerules | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -107,21 +107,23 @@ disp_t_strip = $($(DISP)_disp_t_strip) disp_ar = $($(DISP)_disp_ar) disp_ld = $($(DISP)_disp_ld) -CFLAGS_gen.dep = -MT $@ -MD -MF $(dir $@).$(notdir $@).dep +any-prereq = $(filter-out FORCE,$?) $(filter-out FORCE $(wildcard $^),$^) # True if not identical. Neither order nor whitespace nor identical flags # matter. compare_flags = $(strip $(filter-out $(cmd_$(1)), $(cmd_$(@))) \ $(filter-out $(cmd_$(@)), $(cmd_$(1)))) -# Rebuild if the used CC or flags changed. +# Rebuild if any prerequisite, the used CC or flags changed. # Previously used flags are stored in the corresponding .%.dep files -maybe_exec = $(if $(strip $(compare_flags)), \ +maybe_exec = $(if $(strip $(compare_flags) $(any-prereq)), \ @set -e; \ $(disp_$(1)); \ $(cmd_$(1)); \ echo 'cmd_$@ := $(cmd_$1)' >> $(dir $@).$(notdir $@).dep) +CFLAGS_gen.dep = -MT $@ -MD -MF $(dir $@).$(notdir $@).dep + cmd_compile.c = $(CC) -c $< -o $@ $(CFLAGS) $(ARCH_CFLAGS) $(CFLAGS-$(suffix $@)) $(filter-out $(CFLAGS-OMIT-$(notdir $<)),$(CFLAGS-$(notdir $(^D)))) $(CFLAGS-$(subst $(top_srcdir),,$(dir $<))) $(CFLAGS-$(notdir $<)) $(CFLAGS-$(notdir $@)) $(CFLAGS_gen.dep) cmd_compile.i = $(cmd_compile.c:-c=-E -dD) cmd_compile.s = $(cmd_compile.c:-c=-S) |