public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@sandeen.net>
To: Dave Chinner <david@fromorbit.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH] xfsprogs: Make the compile output cleaner
Date: Tue, 12 Jan 2010 21:51:24 -0600	[thread overview]
Message-ID: <4B4D433C.7080501@sandeen.net> (raw)
In-Reply-To: <1263350021-5733-1-git-send-email-david@fromorbit.com>

Dave Chinner wrote:
> We don't need to see every compiler command line for every file that
> is compiled. This makes it hard to see warnings and errors during
> compile. For progress notification, we really only need to see the
> diretory/file being operated on.
>
> Turn down the verbosity of output by suppressing various make output
> and provide better overall visibility of which directory is being
> operated on, what the operation is and what is being done to the
> files by the build/clean process.
>
> Sample output from a build:
>
> ....
> Building libxlog
>     [CC] xfs_log_recover.c
>     [CC] util.c
>     [LD] libxlog.la
>   

...

swanky!

What would you think of this on top of it, ripped straight from
kbuild - that way "make V=1" works the same way as kbuild, but
the default is still to be quiet.

Also, just to show my kbuild bias, maybe consider outputting the target
on the quiet line, instead of the source?  :)  But no biggie.

-Eric



diff --git a/Makefile b/Makefile
index 2fbfb51..46e6a3e 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,20 @@
 #
 # Copyright (c) 2000-2006 Silicon Graphics, Inc.  All Rights Reserved.
 #
-Q ?= @
+
+ifeq ("$(origin V)", "command line")
+  BUILD_VERBOSE = $(V)
+endif
+ifndef BUILD_VERBOSE
+  BUILD_VERBOSE = 0
+endif
+
+ifeq ($(BUILD_VERBOSE),1)
+  Q =
+else
+  Q = @
+endif
+
 MAKEOPTS = --no-print-directory Q=$(Q)
 
 TOPDIR = .
diff --git a/include/buildrules b/include/buildrules
index a0c77a9..72edc69 100644
--- a/include/buildrules
+++ b/include/buildrules
@@ -50,11 +50,11 @@ $(LTLIBRARY) : $(SUBDIRS) $(LTOBJECTS)
 	$(Q)$(LTLINK) $(LTLDFLAGS) -o $(LTLIBRARY) $(LTOBJECTS) $(LTLIBS)
 
 %.lo: %.c
-	@echo "    [CC] $<"
+	@echo "    [CC] $@"
 	$(Q)$(LTCOMPILE) -c $<
 else
 %.o: %.c
-	@echo "    [CC] $<"
+	@echo "    [CC] $@"
 	$(Q)$(CC) $(CFLAGS) -c $<
 
 endif


_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2010-01-13  3:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-13  2:33 [PATCH] xfsprogs: Make the compile output cleaner Dave Chinner
2010-01-13  3:51 ` Eric Sandeen [this message]
2010-01-13  4:29   ` Eric Sandeen

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=4B4D433C.7080501@sandeen.net \
    --to=sandeen@sandeen.net \
    --cc=david@fromorbit.com \
    --cc=xfs@oss.sgi.com \
    /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