[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[XEN PATCH v7 51/51] build: add %.E targets


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Date: Tue, 24 Aug 2021 11:50:38 +0100
  • Authentication-results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Anthony PERARD <anthony.perard@xxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, "Ian Jackson" <iwj@xxxxxxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Tue, 24 Aug 2021 11:01:58 +0000
  • Ironport-hdrordr: A9a23:LVvb+qsbCsTmq7RwlcfEHnEG7skCyoMji2hC6mlwRA09TyXGra 2TdaUgvyMc1gx7ZJh5o6HnBEGBKUm9yXcH2/hpAV7CZnishILGFvAH0WKP+VPd8k7Fh6RgPM VbAs9D4bTLZDAX4voSizPIcOrIteP3lZxA8t2urUuFIzsKV4hQqyNCTiqLGEx/QwdLQbAjEo CH28ZBrz28PVwKc8WSHBA+LqT+juyOsKijTQ8NBhYh5gXLpyiv8qTGHx+R2Qpbey9TwI0l7X POn2XCl+qeWrCAu1HhPl3ontRrcejau5h+7Qu3+4oowwDX+0eVjUJaKvi/VX4O0aWSAR0R4a HxSl8bTr9OAjXqDyyISFLWqnPd+Sdr5Hn4xVCCh3z/5cT/WTIhEsJEwZlUax3D9iMbzadBOY 9wrhakXqBsfGT9deXGlqn1fgAvklDxrWspkOYVgXAaWYwCaKVJpYha+E9OCp8PEC/z9YhiSY BVfYnhzecTdUnfY2HSv2FpztDpVnMvHg2eSkxHvsCOyTBZkH1w0kNdzs0CmXUL8o47VvB/lq 35G7UtkKsLQt4dbKp7CutEScyrCnbVSRaJK26WKUSPLtBzB5sMke+E3FwR3pDVRHUl9upPpH 3xaiIqiYdpQTOSNSSn5uw1zjndBH66QSngjtpD4pQRgMyNeIbW
  • Ironport-sdr: 1jd2RLyJdsLUw7xBH6tEvn6hZ2r8TOw62HDrkvbwSG6H4IHuQHDxYJ0/o838D0LZZ8tw46Trpd Euk1QwcD3MXVFPJuy4SupGRqMNlPYdWz9xhfnwITTHTe7eQZSjqsE/Bzt4LqHui+L11KBB6xOM ab3Fl5fKfFB3F7uVMWcK8Qlg/UwZSULC8DkqKZSnpFsmb40puDnk6QYzPfkJaLk3m7Z6BQkRDG 33cbz/yIyaZlhmhag/X0KZcwa3KjdrWbNZhel+UuhMNPPAX0Vt81EaptD+5lE2H9DfNRZm8Cj9 nggmCTZ2WBXNen3og9rSKrIL
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

I guess it's easier to remember that %.E does "$(CC) -E" or "$(CPP)".

Suggested-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
---
 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




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.