mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Kevin O'Connor" <kevin@koconnor.net>
To: Kai Germaschewski <kai-germaschewski@uiowa.edu>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Kernel compile quiet mode
Date: Sat, 1 Jun 2002 11:08:40 -0400	[thread overview]
Message-ID: <20020601110840.A13076@arizona.localdomain> (raw)
In-Reply-To: <20020531230153.A12477@arizona.localdomain> <Pine.LNX.4.44.0206010228460.21152-100000@chaos.physics.uiowa.edu>

On Sat, Jun 01, 2002 at 02:34:25AM -0500, Kai Germaschewski wrote:
> > > gcc $CFLAGS -DKBUILD_BASENAME=raw -c -o raw.o raw.c
> > > gcc $CFLAGS -DKBUILD_BASENAME=pty -DEXPORT_SYMTAB -c -o pty.o pty.c
> > > gcc $CFLAGS -DKBUILD_BASENAME=misc -DEXPORT_SYMTAB -c -o misc.o misc.c
> > > gcc $CFLAGS -DKBUILD_BASENAME=random -DEXPORT_SYMTAB -c -o random.o random.c
> > > gcc $CFLAGS -DKBUILD_BASENAME=vt -c -o vt.o vt.c
> > > gcc $CFLAGS -DKBUILD_BASENAME=vc_screen -c -o vc_screen.o vc_screen.c
> 
> Not bad, I suppose different people prefer different approaches, anyway. 
> There is, however, still redundant output there, the "-o vt.o" and 
> "KBUILD_BASENAME=vt" should go away as well too, IMO.

I agree about the "-o vt.o" part.  I'm not so sure about KBUILD_BASENAME -
it's a little redundant, but it is sent to the compiler and is different on
each compile.  Anyway, fixing the '-o' redundancy is simple - just don't
send it to the compiler in the first place (the compiler will always do it
anyway).

I've attached another example patch to the end of this message.  Output
looks like:

gcc $CFLAGS -fno-omit-frame-pointer -DKBUILD_BASENAME=sched -c sched.c
gcc $CFLAGS -DKBUILD_BASENAME=dma -c dma.c
gcc $CFLAGS -DKBUILD_BASENAME=fork -c fork.c
gcc $CFLAGS -DKBUILD_BASENAME=exec_domain -DEXPORT_SYMTAB -c exec_domain.c
gcc $CFLAGS -DKBUILD_BASENAME=panic -c panic.c

> 
> [Answered a follow-up mail and didn't realize that l-k was CC'ed in
>  the first one, so here's my reply again.]

Sorry about that.  This one is also CC'ed to lkml.

Thanks,
-Kevin



--- ../gold-2.5/Rules.make      Fri May 31 22:10:04 2002
+++ ./Rules.make        Sat Jun  1 10:57:18 2002
@@ -127,7 +127,7 @@
 %.i: %.c FORCE
        $(call if_changed,cmd_cc_i_c)
 
-cmd_cc_o_c = $(CC) $(c_flags) -c -o $@ $<
+cmd_cc_o_c = $(CC) $(c_flags) -c $<
 
 %.o: %.c FORCE
        $(call if_changed,cmd_cc_o_c)
@@ -396,8 +396,9 @@
 
 # function to only execute the passed command if necessary
 
+echo_cmd = echo '$(strip $(subst $(CFLAGS),$$CFLAGS,$(subst $(CFLAGS_MODULE),$$CFLAGS_MODULE,$($(1)))))'
+
 if_changed = $(if $(strip $? \
                          $(filter-out $($(1)),$(cmd_$(@F)))\
                          $(filter-out $(cmd_$(@F)),$($(1)))),\
-              @echo '$($(1))' && $($(1)) && echo 'cmd_$@ := $($(1))' > $(@D)/.$(@F).cmd)
-
+              @$(call echo_cmd,$(1)) && $($(1)) && echo 'cmd_$@ := $($(1))' > $(@D)/.$(@F).cmd)



-- 
 ------------------------------------------------------------------------
 | Kevin O'Connor                     "BTW, IMHO we need a FAQ for      |
 | kevin@koconnor.net                  'IMHO', 'FAQ', 'BTW', etc. !"    |
 ------------------------------------------------------------------------

      reply	other threads:[~2002-06-01 15:08 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-29 20:22 2.5.19 - What's up with the kernel build? Kai Germaschewski
2002-05-29 20:50 ` Paul P Komkoff Jr
2002-05-29 20:58   ` Jeff Garzik
2002-05-29 22:38     ` Nicolas Pitre
2002-05-29 22:56       ` Thunder from the hill
2002-05-29 23:18         ` Nicolas Pitre
2002-05-29 23:29           ` Daniel Phillips
2002-05-29 23:06       ` Tomas Szepe
2002-05-29 23:40         ` Daniel Phillips
2002-05-30  0:17           ` Nicolas Pitre
2002-05-30  0:36             ` Daniel Phillips
2002-05-30  0:42               ` Jeff Garzik
2002-05-30  0:47                 ` Robert Love
2002-06-03  6:49                 ` Rusty Russell
2002-05-30  2:23               ` Nicolas Pitre
2002-05-30  2:30                 ` Daniel Phillips
2002-05-30  2:00     ` Kai Germaschewski
2002-05-30  2:17       ` Daniel Phillips
2002-05-30  8:45       ` Jeff Garzik
2002-05-30  8:54         ` Erik Andersen
2002-05-30  9:01           ` Russell King
2002-05-30  9:32             ` Erik Andersen
2002-05-30 13:22         ` Kai Germaschewski
2002-05-29 22:14 ` Martin Dalecki
2002-05-29 23:22 ` Tom Rini
2002-05-29 22:45   ` Martin Dalecki
2002-05-30  0:33     ` Kai Germaschewski
2002-06-01  3:01 ` Kernel compile quiet mode Kevin O'Connor
2002-06-01  7:34   ` Kai Germaschewski
2002-06-01 15:08     ` Kevin O'Connor [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=20020601110840.A13076@arizona.localdomain \
    --to=kevin@koconnor.net \
    --cc=kai-germaschewski@uiowa.edu \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®