From: Randy Dunlap <randy.dunlap@oracle.com>
To: Oleg Verych <olecom@flower.upol.cz>
Cc: Sam Ravnborg <sam@ravnborg.org>,
Rusty Russell <rusty@rustcorp.com.au>,
LKML <linux-kernel@vger.kernel.org>,
kbuild-devel@lists.sourceforge.net
Subject: Re: [patch] kbuild: remember ARCH in the object directory
Date: Tue, 12 Jun 2007 08:04:22 -0700 [thread overview]
Message-ID: <20070612080422.988d0da8.randy.dunlap@oracle.com> (raw)
In-Reply-To: <E1Hy3fI-0001Tw-Fy@flower>
On Tue, 12 Jun 2007 12:31:56 +0200 Oleg Verych wrote:
> [patch] kbuild: remember ARCH in the object directory
>
> - rephrase some related (misspelled) comments,
> - remove all trailing whitespace in the top Makefile,
>
> * remember ARCH in the output directory, thus making build of i386
> on amd64 *actually* convenient,
>
> - harmless refactoring of the Makefile generating.
>
> Signed-off-by: Oleg Verych <olecom@flower.upol.cz>
> ---
>
> Just lazy typing `make ARCH=i386` every time i want to check lguest.
Hi Oleg,
So does this only work when O= is used?
I had tried to modify Makefile(s) to use the include/asm symlink
if it exists, so that 'make ARCH=i386' is not needed after the
symlink is created, but I never got that to work.
Thanks, this is useful in any case (not yet tested though).
> Makefile | 17 ++++++++---------
> scripts/mkmakefile | 42 ++++++++++++++++++++++++------------------
> 2 files changed, 32 insertions(+), 27 deletions(-)
>
> Index: linux-2.6.22-rc4-mm2/scripts/mkmakefile
> ===================================================================
> --- linux-2.6.22-rc4-mm2.orig/scripts/mkmakefile 2007-06-12 11:21:27.755466250 +0200
> +++ linux-2.6.22-rc4-mm2/scripts/mkmakefile 2007-06-12 12:04:13.675826250 +0200
> @@ -1,6 +1,6 @@
> -#!/bin/sh
> +#!/bin/sh -e
> # Generates a small Makefile used in the root of the output
> -# directory, to allow make to be started from there.
> -# The Makefile also allow for more convinient build of external modules
> +# directory, to allow kernel build to be started from there.
> +# External modules can't built with it as well.
>
> # Usage
> @@ -9,28 +9,34 @@
> # $3 - version
> # $4 - patchlevel
> +# $5 - ARCH
>
> +set -e
>
> -test ! -r $2/Makefile -o -O $2/Makefile || exit 0
> echo " GEN $2/Makefile"
> +echo "#
> +# Automatically generated by
> +# $0
> +#
> +VERSION = $3
> +PATCHLEVEL = $4
> +
> +KERNELSRC = $1
> +KERNELOUTPUT = $2
> +ARCH = $5
> +" >$2/Makefile
>
> -cat << EOF > $2/Makefile
> -# Automatically generated by $0: don't edit
> +cat << "EOF" >> $2/Makefile
> +MAKEFLAGS += -rR --no-print-directory
>
> -VERSION = $3
> -PATCHLEVEL = $4
> +export ARCH
>
> -KERNELSRC := $1
> -KERNELOUTPUT := $2
> -
> -MAKEFLAGS += --no-print-directory
> +all:
> + $(MAKE) -C $(KERNELSRC) O=$(KERNELOUTPUT)
>
> -.PHONY: all \$(MAKECMDGOALS)
> +$(filter-out all Makefile,$(MAKECMDGOALS)) %/:
> + $(MAKE) -C $(KERNELSRC) O=$(KERNELOUTPUT) $@
>
> -all:
> - \$(MAKE) -C \$(KERNELSRC) O=\$(KERNELOUTPUT)
> +.PHONY: all $(MAKECMDGOALS)
>
> Makefile:;
> -
> -\$(filter-out all Makefile,\$(MAKECMDGOALS)) %/:
> - \$(MAKE) -C \$(KERNELSRC) O=\$(KERNELOUTPUT) \$@
> EOF
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
next prev parent reply other threads:[~2007-06-12 15:04 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-09 9:51 [patch 4/9] lguest: the asm offsets akpm
2007-05-09 20:46 ` Sam Ravnborg
2007-05-10 0:09 ` Rusty Russell
2007-06-11 12:49 ` Oleg Verych
2007-06-11 12:59 ` Sam Ravnborg
2007-06-12 10:31 ` [patch] kbuild: remember ARCH in the object directory Oleg Verych
2007-06-12 15:04 ` Randy Dunlap [this message]
2007-06-12 16:12 ` Randy Dunlap
2007-06-12 17:19 ` Oleg Verych
2007-06-12 18:09 ` Sam Ravnborg
2007-06-13 2:12 ` [kbuild-devel] " H. Peter Anvin
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=20070612080422.988d0da8.randy.dunlap@oracle.com \
--to=randy.dunlap@oracle.com \
--cc=kbuild-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=olecom@flower.upol.cz \
--cc=rusty@rustcorp.com.au \
--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
Powered by JetHome