mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@novell.com>
To: <sam@ravnborg.org>
Cc: <linux-kernel@vger.kernel.org>
Subject: [PATCH] fix mkmakefile
Date: Mon, 30 Jan 2006 10:05:09 +0100	[thread overview]
Message-ID: <43DDE4D5.76F0.0078.0@novell.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 548 bytes --]

From: Jan Beulich <jbeulich@novell.com>

With the current way of generating the Makefile in the output directory
for builds outside of the source tree, specifying real targets (rather
than phony ones) doesn't work in an already (partially) built tree, as
the stub Makefile doesn't have any dependency information available.
Thus, all targets where files may actually exist must be listed
explicitly and, due to what I'd call a make misbehavior, directory
targets must then also be special cased.

Signed-Off-By: Jan Beulich <jbeulich@novell.com>



[-- Attachment #2: linux-2.6.16-rc1-mkmakefile.patch --]
[-- Type: text/plain, Size: 1244 bytes --]

From: Jan Beulich <jbeulich@novell.com>

With the current way of generating the Makefile in the output directory
for builds outside of the source tree, specifying real targets (rather
than phony ones) doesn't work in an already (partially) built tree, as
the stub Makefile doesn't have any dependency information available.
Thus, all targets where files may actually exist must be listed
explicitly and, due to what I'd call a make misbehavior, directory
targets must then also be special cased.

Signed-Off-By: Jan Beulich <jbeulich@novell.com>

diff -Npru /home/jbeulich/tmp/linux-2.6.16-rc1/scripts/mkmakefile 2.6.16-rc1-mkmakefile/scripts/mkmakefile
--- /home/jbeulich/tmp/linux-2.6.16-rc1/scripts/mkmakefile	2006-01-03 04:21:10.000000000 +0100
+++ 2.6.16-rc1-mkmakefile/scripts/mkmakefile	2006-01-25 09:55:53.000000000 +0100
@@ -20,12 +20,15 @@ KERNELSRC    := $1
 KERNELOUTPUT := $2
 
 MAKEFLAGS += --no-print-directory
+MAKEARGS  := -C \$(KERNELSRC) O=\$(KERNELOUTPUT)
+
+.PHONY: all \$(MAKECMDGOALS)
 
 all:
-	\$(MAKE) -C \$(KERNELSRC) O=\$(KERNELOUTPUT)
+	\$(MAKE) \$(MAKEARGS)
 
-%::
-	\$(MAKE) -C \$(KERNELSRC) O=\$(KERNELOUTPUT) \$@
+Makefile:;
 
+\$(filter-out all Makefile,\$(MAKECMDGOALS)) %/:
+	\$(MAKE) \$(MAKEARGS) \$@
 EOF
-

                 reply	other threads:[~2006-01-30  9:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=43DDE4D5.76F0.0078.0@novell.com \
    --to=jbeulich@novell.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sam@ravnborg.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®