I guess it's easier to remember that %.E does "$(CC) -E" or "$(CPP)".
Suggested-by: Andrew Cooper <andrew.coop...@citrix.com> Signed-off-by: Anthony PERARD <anthony.per...@citrix.com> --- xen/Makefile | 4 ++-- xen/Rules.mk | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/xen/Makefile b/xen/Makefile index d27c213c3aa9..91b34d549970 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -586,10 +586,10 @@ cscope: _MAP: $(NM) -n $(TARGET)-syms | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' > System.map -%.o %.i %.s: %.c tools_fixdep FORCE +%.o %.i %.s %.E: %.c tools_fixdep FORCE $(MAKE) $(build)=$(*D) $(*D)/$(@F) -%.o %.s: %.S tools_fixdep FORCE +%.o %.s %.E: %.S tools_fixdep FORCE $(MAKE) $(build)=$(*D) $(*D)/$(@F) %/: tools_fixdep FORCE diff --git a/xen/Rules.mk b/xen/Rules.mk index 6c97f539330a..7d6112a3cdec 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -289,6 +289,11 @@ $(obj)/%.s: $(src)/%.c FORCE $(obj)/%.s: $(src)/%.S FORCE $(call if_changed_dep,cpp_s_S) +$(obj)/%.E: $(src)/%.c FORCE + $(call if_changed_dep,cpp_i_c) +$(obj)/%.E: $(src)/%.S FORCE + $(call if_changed_dep,cpp_s_S) + # Linker scripts, .lds.S -> .lds quiet_cmd_cpp_lds_S = LDS $@ cmd_cpp_lds_S = $(CPP) -P $(call cpp_flags,$(a_flags)) -DLINKER_SCRIPT -MQ $@ -o $@ $< -- Anthony PERARD