public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@kernel.crashing.org>
To: Marcelo Tosatti <marcelo@conectiva.com.br>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: [PATCH 2.4.19-rc1] Fix building with 'make -r -R'
Date: Mon, 24 Jun 2002 12:20:21 -0700	[thread overview]
Message-ID: <20020624192021.GH3489@opus.bloom.county> (raw)
In-Reply-To: <Pine.LNX.4.44.0206241253120.9274-100000@freak.distro.conectiva>

The following patch fixes 'make -r -R' in current kernels.  From the
make (3.79.1) info page:

     In an explicit rule, there is no stem; so `$*' cannot be determined
     in that way.  Instead, if the target name ends with a recognized
     suffix (*note Old-Fashioned Suffix Rules: Suffix Rules.), `$*' is
     set to the target name minus the suffix.  For example, if the
     target name is `foo.c', then `$*' is set to `foo', since `.c' is a
     suffix.  GNU `make' does this bizarre thing only for compatibility
     with other implementations of `make'.  You should generally avoid
     using `$*' except in implicit rules or static pattern rules.

Which explains why when '-r -R' (aka --no-builtin-rules
--no-builtin-variables) the build fails to make 'init/main.o' or
'init/do_mounts.o'.

-- 
Tom Rini (TR1265)
http://gate.crashing.org/~trini/

===== Makefile 1.158 vs edited =====
--- 1.158/Makefile	Wed Jun  5 15:45:31 2002
+++ edited/Makefile	Fri Jun  7 10:20:25 2002
@@ -355,10 +355,10 @@
 	$(CC) $(CFLAGS) $(CFLAGS_KERNEL) -DUTS_MACHINE='"$(ARCH)"' -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) -c -o init/version.o init/version.c
 
 init/main.o: init/main.c include/config/MARKER
-	$(CC) $(CFLAGS) $(CFLAGS_KERNEL) $(PROFILING) -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) -c -o $*.o $<
+	$(CC) $(CFLAGS) $(CFLAGS_KERNEL) $(PROFILING) -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) -c -o $@ $<
 
 init/do_mounts.o: init/do_mounts.c include/config/MARKER
-	$(CC) $(CFLAGS) $(CFLAGS_KERNEL) $(PROFILING) -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) -c -o $*.o $<
+	$(CC) $(CFLAGS) $(CFLAGS_KERNEL) $(PROFILING) -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) -c -o $@ $<
 
 fs lib mm ipc kernel drivers net: dummy
 	$(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" $(subst $@, _dir_$@, $@)


  parent reply	other threads:[~2002-06-24 19:22 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-24 15:58 Linux 2.4.19-rc1 Marcelo Tosatti
2002-06-24 19:07 ` [PATCH 2.4.19-rc1] BLK_DEV_RAM not BLOCK_DEV_RAM. was: " Stelian Pop
2002-06-24 19:17   ` Rudmer van Dijk
2002-06-24 19:20 ` Tom Rini [this message]
2002-06-24 20:28 ` Pawel Kot
2002-06-24 21:17 ` Linux 2.4.19-rc1 ChangeLog Summary Matthias Andree
2002-06-25 23:06 ` Linux 2.4.19-rc1 Simon Kirby
2002-06-25 23:29   ` DMA from high memory regions Imran Badr
2002-06-26  0:23   ` Linux 2.4.19-rc1 Marcelo Tosatti
2002-06-28 22:41 ` bvermeul
2002-07-02 20:51   ` Marcelo Tosatti
2002-07-02 21:30     ` Marcelo Tosatti
2002-07-03 16:53     ` Bruce Harada
2002-07-12  0:26 ` Linux 2.4.19-rc1: [PATCH] tridentfb Helge Deller

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=20020624192021.GH3489@opus.bloom.county \
    --to=trini@kernel.crashing.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo@conectiva.com.br \
    /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