kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: dean.floyd.lkml@gmail.com (Dean Floyd)
To: kernelnewbies@lists.kernelnewbies.org
Subject: quiet compile kernel
Date: Wed, 27 Apr 2011 20:13:05 -0700	[thread overview]
Message-ID: <BANLkTikJs+7ozwKHkeh+XyGYXpiefHzZag@mail.gmail.com> (raw)
In-Reply-To: <BANLkTi=YxrnyWe4RRnD=7sMkX8yjPuBkPw@mail.gmail.com>

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

      reply	other threads:[~2011-04-28  3:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-27 16:48 quiet compile kernel loody
2011-04-27 17:04 ` Prasad Joshi
2011-04-28  3:13   ` Dean Floyd [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BANLkTikJs+7ozwKHkeh+XyGYXpiefHzZag@mail.gmail.com \
    --to=dean.floyd.lkml@gmail.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).