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

Re: [XEN PATCH v8 34/47] build: add %.E targets



On 25/11/2021 13:39, Anthony PERARD wrote:
> 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 995815e82235..e39a6f82859a 100644
> --- a/xen/Makefile
> +++ b/xen/Makefile
> @@ -609,10 +609,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
>       $(Q)$(MAKE) $(build)=$(*D) $(*D)/$(@F)

So what I hadn't realised when asking was that Linux calls this .i and
we've already got support for what I wanted.  Sorry :)

Thus, I suspect we probably don't want to take an extra %.E alias to the
existing %.i, although...

>  
> -%.o %.s: %.S tools_fixdep FORCE
> +%.o %.s %.E: %.S tools_fixdep FORCE
>       $(Q)$(MAKE) $(build)=$(*D) $(*D)/$(@F)
>  
>  %/: tools_fixdep FORCE
> diff --git a/xen/Rules.mk b/xen/Rules.mk
> index 73d5b82ab2e7..745d892d0707 100644
> --- a/xen/Rules.mk
> +++ b/xen/Rules.mk
> @@ -287,6 +287,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)

... I don't currently see support for %.i from %.S in the tree.  That
one probably would be useful to introduce.

~Andrew

> +
>  # 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 $@ $<




 


Rackspace

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