* quiet compile kernel
@ 2011-04-27 16:48 loody
2011-04-27 17:04 ` Prasad Joshi
0 siblings, 1 reply; 3+ messages in thread
From: loody @ 2011-04-27 16:48 UTC (permalink / raw)
To: kernelnewbies
Hi all:
I found the compile message of kernel is quite succinct, when we set
V=0, and I try to make my project output as clean as kernel did.
Then I traced the Makefile and it just define "quiet" and "Q" then export it.
Where is the exact place that quiet build begin?
Is that complicated to copy this quiet-build process?
--
Thanks for your help,
miloody
^ permalink raw reply [flat|nested] 3+ messages in thread
* quiet compile kernel
2011-04-27 16:48 quiet compile kernel loody
@ 2011-04-27 17:04 ` Prasad Joshi
2011-04-28 3:13 ` Dean Floyd
0 siblings, 1 reply; 3+ messages in thread
From: Prasad Joshi @ 2011-04-27 17:04 UTC (permalink / raw)
To: kernelnewbies
On Wed, Apr 27, 2011 at 5:48 PM, loody <miloody@gmail.com> wrote:
> Hi all:
> I found the compile message of kernel is quite succinct, when we set
> V=0, and I try to make my project output as clean as kernel did.
>
> Then I traced the Makefile and it just define "quiet" and "Q" then export it.
> Where is the exact place that quiet build begin?
>
> Is that complicated to copy this quiet-build process?
Here is a simple way to do it
Makefile:
ifeq ($(strip $(V)),)
E = @echo
Q = @
else
E = @\#
Q =
endif
export E Q
%.o: %.c
$(E) " CC " $@
$(Q) $(CC) -c $(CFLAGS) $< -o $@
So when V is defined, the make command will display the detailed
compilation message or else it will only show an echoed message. One
can also add a check for verbose level.
Thanks and Regards,
Prasad
>
> --
> Thanks for your help,
> miloody
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* quiet compile kernel
2011-04-27 17:04 ` Prasad Joshi
@ 2011-04-28 3:13 ` Dean Floyd
0 siblings, 0 replies; 3+ messages in thread
From: Dean Floyd @ 2011-04-28 3:13 UTC (permalink / raw)
To: kernelnewbies
On Wed, Apr 27, 2011 at 10:04 AM, Prasad Joshi <prasadjoshi124@gmail.com> wrote:
> On Wed, Apr 27, 2011 at 5:48 PM, loody <miloody@gmail.com> wrote:
>> Hi all:
>> I found the compile message of kernel is quite succinct, when we set
>> V=0, and I try to make my project output as clean as kernel did.
>>
>> Then I traced the Makefile and it just define "quiet" and "Q" then export it.
>> Where is the exact place that quiet build begin?
>>
>> Is that complicated to copy this quiet-build process?
>
> Here is a simple way to do it
>
> Makefile:
> ifeq ($(strip $(V)),)
> ? ? ? ?E = @echo
> ? ? ? ?Q = @
> else
> ? ? ? ?E = @\#
> ? ? ? ?Q =
> endif
> export E Q
>
> %.o: %.c
> ? ? ? ?$(E) " ?CC ? ? ?" $@
> ? ? ? ?$(Q) $(CC) -c $(CFLAGS) $< -o $@
>
>
> So when V is defined, the make command will display the detailed
> compilation message or else it will only show an echoed message. One
> can also add a check for verbose level.
You may also want to do something like the following:
.SILENT:
%.o: %.c
echo " CC $<"
$(CC) -g -c $< -o $@
--
Dean
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-04-28 3:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-27 16:48 quiet compile kernel loody
2011-04-27 17:04 ` Prasad Joshi
2011-04-28 3:13 ` Dean Floyd
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).