Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1288654 > unrolled thread

[PATCH] kbuild: support make dir/file.i for *.S

Started byWang YanQing <udknight@gmail.com>
First post2015-12-10 17:40 +0100
Last post2015-12-15 02:50 +0100
Articles 7 — 4 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] kbuild: support make dir/file.i for *.S Wang YanQing <udknight@gmail.com> - 2015-12-10 17:40 +0100
    Re: [PATCH] kbuild: support make dir/file.i for *.S Michal Marek <mmarek@suse.com> - 2015-12-11 17:30 +0100
    Re: [PATCH] kbuild: support make dir/file.i for *.S Brian Gerst <brgerst@gmail.com> - 2015-12-12 20:20 +0100
      Re: [PATCH] kbuild: support make dir/file.i for *.S Masahiro Yamada <yamada.masahiro@socionext.com> - 2015-12-13 09:20 +0100
      Re: [PATCH] kbuild: support make dir/file.i for *.S Wang YanQing <udknight@gmail.com> - 2015-12-14 18:20 +0100
        Re: [PATCH] kbuild: support make dir/file.i for *.S Michal Marek <mmarek@suse.com> - 2015-12-14 18:20 +0100
          Re: [PATCH] kbuild: support make dir/file.i for *.S Masahiro Yamada <yamada.masahiro@socionext.com> - 2015-12-15 02:50 +0100

#1288654 — [PATCH] kbuild: support make dir/file.i for *.S

FromWang YanQing <udknight@gmail.com>
Date2015-12-10 17:40 +0100
Subject[PATCH] kbuild: support make dir/file.i for *.S
Message-ID<qEcq6-cf-5@gated-at.bofh.it>
This feature could reduce a little time to expand all
the macros in *.S for reading.

Signed-off-by: Wang YanQing <udknight@gmail.com>
---
 Makefile               | 2 ++
 scripts/Makefile.build | 6 ++++++
 2 files changed, 8 insertions(+)

diff --git a/Makefile b/Makefile
index 7558c9c..d7e2060 100644
--- a/Makefile
+++ b/Makefile
@@ -1552,6 +1552,8 @@ endif
 	$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
 %.s: %.S prepare scripts FORCE
 	$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
+%.i: %.S prepare scripts FORCE
+	$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
 %.o: %.S prepare scripts FORCE
 	$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
 %.symtypes: %.c prepare scripts FORCE
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 2c47f9c..2a51d49 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -287,6 +287,12 @@ cmd_as_s_S       = $(CPP) $(a_flags)   -o $@ $<
 $(obj)/%.s: $(src)/%.S FORCE
 	$(call if_changed_dep,as_s_S)
 
+quiet_cmd_cc_i_S = CPP $(quiet_modtag) $@
+cmd_cc_i_S       = $(CPP) $(a_flags)   -o $@ $<
+
+$(obj)/%.i: $(src)/%.S FORCE
+	$(call if_changed_dep,cc_i_S)
+
 quiet_cmd_as_o_S = AS $(quiet_modtag)  $@
 cmd_as_o_S       = $(CC) $(a_flags) -c -o $@ $<
 
-- 
1.8.5.6.2.g3d8a54e.dirty
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1289718

FromMichal Marek <mmarek@suse.com>
Date2015-12-11 17:30 +0100
Message-ID<qEyJY-6SZ-9@gated-at.bofh.it>
In reply to#1288654
Dne 10.12.2015 v 17:33 Wang YanQing napsal(a):
> This feature could reduce a little time to expand all
> the macros in *.S for reading.
> 
> Signed-off-by: Wang YanQing <udknight@gmail.com>

Makes sense. Applied to kbuild.git#kbuild.

Michal

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1290262

FromBrian Gerst <brgerst@gmail.com>
Date2015-12-12 20:20 +0100
Message-ID<qEXS2-6dM-21@gated-at.bofh.it>
In reply to#1288654
On Thu, Dec 10, 2015 at 11:33 AM, Wang YanQing <udknight@gmail.com> wrote:
> This feature could reduce a little time to expand all
> the macros in *.S for reading.
>
> Signed-off-by: Wang YanQing <udknight@gmail.com>
> ---
>  Makefile               | 2 ++
>  scripts/Makefile.build | 6 ++++++
>  2 files changed, 8 insertions(+)
>
> diff --git a/Makefile b/Makefile
> index 7558c9c..d7e2060 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1552,6 +1552,8 @@ endif
>         $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
>  %.s: %.S prepare scripts FORCE
>         $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
> +%.i: %.S prepare scripts FORCE
> +       $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
>  %.o: %.S prepare scripts FORCE
>         $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
>  %.symtypes: %.c prepare scripts FORCE
> diff --git a/scripts/Makefile.build b/scripts/Makefile.build
> index 2c47f9c..2a51d49 100644
> --- a/scripts/Makefile.build
> +++ b/scripts/Makefile.build
> @@ -287,6 +287,12 @@ cmd_as_s_S       = $(CPP) $(a_flags)   -o $@ $<
>  $(obj)/%.s: $(src)/%.S FORCE
>         $(call if_changed_dep,as_s_S)
>
> +quiet_cmd_cc_i_S = CPP $(quiet_modtag) $@
> +cmd_cc_i_S       = $(CPP) $(a_flags)   -o $@ $<
> +
> +$(obj)/%.i: $(src)/%.S FORCE
> +       $(call if_changed_dep,cc_i_S)
> +
>  quiet_cmd_as_o_S = AS $(quiet_modtag)  $@
>  cmd_as_o_S       = $(CC) $(a_flags) -c -o $@ $<

*.s (lower case) is the suffix used for preprocessed assembly files,
and there is already a rule for that.  *.i is for preprocessed C
files.

--
Brian Gerst
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1290582

FromMasahiro Yamada <yamada.masahiro@socionext.com>
Date2015-12-13 09:20 +0100
Message-ID<qFa2S-5Rp-1@gated-at.bofh.it>
In reply to#1290262
2015-12-13 4:13 GMT+09:00 Brian Gerst <brgerst@gmail.com>:
> On Thu, Dec 10, 2015 at 11:33 AM, Wang YanQing <udknight@gmail.com> wrote:
>> This feature could reduce a little time to expand all
>> the macros in *.S for reading.
>>
>> Signed-off-by: Wang YanQing <udknight@gmail.com>
>> ---
>>  Makefile               | 2 ++
>>  scripts/Makefile.build | 6 ++++++
>>  2 files changed, 8 insertions(+)
>>
>> diff --git a/Makefile b/Makefile
>> index 7558c9c..d7e2060 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -1552,6 +1552,8 @@ endif
>>         $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
>>  %.s: %.S prepare scripts FORCE
>>         $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
>> +%.i: %.S prepare scripts FORCE
>> +       $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
>>  %.o: %.S prepare scripts FORCE
>>         $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
>>  %.symtypes: %.c prepare scripts FORCE
>> diff --git a/scripts/Makefile.build b/scripts/Makefile.build
>> index 2c47f9c..2a51d49 100644
>> --- a/scripts/Makefile.build
>> +++ b/scripts/Makefile.build
>> @@ -287,6 +287,12 @@ cmd_as_s_S       = $(CPP) $(a_flags)   -o $@ $<
>>  $(obj)/%.s: $(src)/%.S FORCE
>>         $(call if_changed_dep,as_s_S)
>>
>> +quiet_cmd_cc_i_S = CPP $(quiet_modtag) $@
>> +cmd_cc_i_S       = $(CPP) $(a_flags)   -o $@ $<
>> +
>> +$(obj)/%.i: $(src)/%.S FORCE
>> +       $(call if_changed_dep,cc_i_S)
>> +
>>  quiet_cmd_as_o_S = AS $(quiet_modtag)  $@
>>  cmd_as_o_S       = $(CC) $(a_flags) -c -o $@ $<
>
> *.s (lower case) is the suffix used for preprocessed assembly files,
> and there is already a rule for that.  *.i is for preprocessed C
> files.
>

Right.  We already support *.s and it is completely the same as
what this patch adds (except that *.i is now an alias of *.s,
which is also wrong as Brian pointed out.)

quiet_cmd_as_s_S = CPP $(quiet_modtag) $@
cmd_as_s_S       = $(CPP) $(a_flags)   -o $@ $<

$(obj)/%.s: $(src)/%.S FORCE
         $(call if_changed_dep,as_s_S)


-- 
Best Regards
Masahiro Yamada
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1291359

FromWang YanQing <udknight@gmail.com>
Date2015-12-14 18:20 +0100
Message-ID<qFEX0-DM-17@gated-at.bofh.it>
In reply to#1290262
On Sat, Dec 12, 2015 at 02:13:03PM -0500, Brian Gerst wrote:
> On Thu, Dec 10, 2015 at 11:33 AM, Wang YanQing <udknight@gmail.com> wrote:
> > This feature could reduce a little time to expand all
> > the macros in *.S for reading.
> >
> > Signed-off-by: Wang YanQing <udknight@gmail.com>
> > ---
> >  Makefile               | 2 ++
> >  scripts/Makefile.build | 6 ++++++
> >  2 files changed, 8 insertions(+)
> >
> > diff --git a/Makefile b/Makefile
> > index 7558c9c..d7e2060 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -1552,6 +1552,8 @@ endif
> >         $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
> >  %.s: %.S prepare scripts FORCE
> >         $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
> > +%.i: %.S prepare scripts FORCE
> > +       $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
> >  %.o: %.S prepare scripts FORCE
> >         $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
> >  %.symtypes: %.c prepare scripts FORCE
> > diff --git a/scripts/Makefile.build b/scripts/Makefile.build
> > index 2c47f9c..2a51d49 100644
> > --- a/scripts/Makefile.build
> > +++ b/scripts/Makefile.build
> > @@ -287,6 +287,12 @@ cmd_as_s_S       = $(CPP) $(a_flags)   -o $@ $<
> >  $(obj)/%.s: $(src)/%.S FORCE
> >         $(call if_changed_dep,as_s_S)
> >
> > +quiet_cmd_cc_i_S = CPP $(quiet_modtag) $@
> > +cmd_cc_i_S       = $(CPP) $(a_flags)   -o $@ $<
> > +
> > +$(obj)/%.i: $(src)/%.S FORCE
> > +       $(call if_changed_dep,cc_i_S)
> > +
> >  quiet_cmd_as_o_S = AS $(quiet_modtag)  $@
> >  cmd_as_o_S       = $(CC) $(a_flags) -c -o $@ $<
> 
> *.s (lower case) is the suffix used for preprocessed assembly files,
> and there is already a rule for that.  *.i is for preprocessed C
> files.

Agreed, you are right!

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1291363

FromMichal Marek <mmarek@suse.com>
Date2015-12-14 18:20 +0100
Message-ID<qFEX0-DM-25@gated-at.bofh.it>
In reply to#1291359
Dne 14.12.2015 v 17:14 Wang YanQing napsal(a):
> On Sat, Dec 12, 2015 at 02:13:03PM -0500, Brian Gerst wrote:
>> On Thu, Dec 10, 2015 at 11:33 AM, Wang YanQing <udknight@gmail.com> wrote:
>>> This feature could reduce a little time to expand all
>>> the macros in *.S for reading.
>>>
>>> Signed-off-by: Wang YanQing <udknight@gmail.com>
>>> ---
>>>  Makefile               | 2 ++
>>>  scripts/Makefile.build | 6 ++++++
>>>  2 files changed, 8 insertions(+)
>>>
>>> diff --git a/Makefile b/Makefile
>>> index 7558c9c..d7e2060 100644
>>> --- a/Makefile
>>> +++ b/Makefile
>>> @@ -1552,6 +1552,8 @@ endif
>>>         $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
>>>  %.s: %.S prepare scripts FORCE
>>>         $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
>>> +%.i: %.S prepare scripts FORCE
>>> +       $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
>>>  %.o: %.S prepare scripts FORCE
>>>         $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
>>>  %.symtypes: %.c prepare scripts FORCE
>>> diff --git a/scripts/Makefile.build b/scripts/Makefile.build
>>> index 2c47f9c..2a51d49 100644
>>> --- a/scripts/Makefile.build
>>> +++ b/scripts/Makefile.build
>>> @@ -287,6 +287,12 @@ cmd_as_s_S       = $(CPP) $(a_flags)   -o $@ $<
>>>  $(obj)/%.s: $(src)/%.S FORCE
>>>         $(call if_changed_dep,as_s_S)
>>>
>>> +quiet_cmd_cc_i_S = CPP $(quiet_modtag) $@
>>> +cmd_cc_i_S       = $(CPP) $(a_flags)   -o $@ $<
>>> +
>>> +$(obj)/%.i: $(src)/%.S FORCE
>>> +       $(call if_changed_dep,cc_i_S)
>>> +
>>>  quiet_cmd_as_o_S = AS $(quiet_modtag)  $@
>>>  cmd_as_o_S       = $(CC) $(a_flags) -c -o $@ $<
>>
>> *.s (lower case) is the suffix used for preprocessed assembly files,
>> and there is already a rule for that.  *.i is for preprocessed C
>> files.
> 
> Agreed, you are right!

Ah, I missed. I'll revert the patch in the kbuild tree.

Michal

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1291766

FromMasahiro Yamada <yamada.masahiro@socionext.com>
Date2015-12-15 02:50 +0100
Message-ID<qFMUx-5Li-5@gated-at.bofh.it>
In reply to#1291363
Hi Michal,

2015-12-15 2:16 GMT+09:00 Michal Marek <mmarek@suse.com>:

>
> Ah, I missed. I'll revert the patch in the kbuild tree.


Please drop the noise commit rather than reverting it.
It was just applied a few days ago, and there is only one commit on top of it.




-- 
Best Regards
Masahiro Yamada
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web