mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] mkmakefile: include ARCH on O= builds
@ 2007-07-12  1:40 Bodo Eggert
  2007-07-12  1:58 ` Tony Breeds
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Bodo Eggert @ 2007-07-12  1:40 UTC (permalink / raw)
  To: Linux Kernel Mailing List, kai

If you build using O=builddir ARCH=bar, you'll currently need to supply
ARCH= on builds from the builddir, too. With this patch, the generated
Makefile will do that instead.

make ARCH= will still override the Makefile default, allowing existing 
scripts to work correctly.

Signed-Off-By: Bodo Eggert <7eggert@gmx.de>

diff -X dontdiff -pruN linux-2.6.22/Makefile linux-2.6.22.changed/Makefile
--- linux-2.6.22/Makefile	2007-07-11 23:15:33.000000000 +0200
+++ linux-2.6.22.changed/Makefile	2007-07-12 02:59:39.000000000 +0200
@@ -357,7 +357,7 @@ PHONY += outputmakefile
 outputmakefile:
 ifneq ($(KBUILD_SRC),)
 	$(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkmakefile \
-	    $(srctree) $(objtree) $(VERSION) $(PATCHLEVEL)
+	    $(srctree) $(objtree) $(VERSION) $(PATCHLEVEL) $(ARCH)
 endif
 
 # To make sure we do not include .config for any of the *config targets
diff -X dontdiff -pruN linux-2.6.22/scripts/mkmakefile linux-2.6.22.changed/scripts/mkmakefile
--- linux-2.6.22/scripts/mkmakefile	2006-11-29 22:57:37.000000000 +0100
+++ linux-2.6.22.changed/scripts/mkmakefile	2007-07-12 03:03:49.000000000 +0200
@@ -8,6 +8,7 @@
 # $2 - Output directory
 # $3 - version
 # $4 - patchlevel
+# $5 - patchlevel
 
 
 test ! -r $2/Makefile -o -O $2/Makefile || exit 0
@@ -21,16 +22,17 @@ PATCHLEVEL = $4
 
 KERNELSRC    := $1
 KERNELOUTPUT := $2
+ARCH         := $5
 
 MAKEFLAGS += --no-print-directory
 
 .PHONY: all \$(MAKECMDGOALS)
 
 all:
-	\$(MAKE) -C \$(KERNELSRC) O=\$(KERNELOUTPUT)
+	\$(MAKE) -C \$(KERNELSRC) O=\$(KERNELOUTPUT) ARCH=\$(ARCH)
 
 Makefile:;
 
 \$(filter-out all Makefile,\$(MAKECMDGOALS)) %/:
-	\$(MAKE) -C \$(KERNELSRC) O=\$(KERNELOUTPUT) \$@
+	\$(MAKE) -C \$(KERNELSRC) O=\$(KERNELOUTPUT) ARCH=\$(ARCH) \$@
 EOF
-- 
The tough part about being an officer is that the troops don't know what
they want, but they know for certain what they DON'T want.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] mkmakefile: include ARCH on O= builds
  2007-07-12  1:40 [PATCH] mkmakefile: include ARCH on O= builds Bodo Eggert
@ 2007-07-12  1:58 ` Tony Breeds
  2007-07-12  2:00 ` Randy Dunlap
  2007-07-12 15:09 ` Oleg Verych
  2 siblings, 0 replies; 5+ messages in thread
From: Tony Breeds @ 2007-07-12  1:58 UTC (permalink / raw)
  To: Bodo Eggert; +Cc: Linux Kernel Mailing List, kai

On Thu, Jul 12, 2007 at 03:40:04AM +0200, Bodo Eggert wrote:
> If you build using O=builddir ARCH=bar, you'll currently need to supply
> ARCH= on builds from the builddir, too. With this patch, the generated
> Makefile will do that instead.

<snip>

> diff -X dontdiff -pruN linux-2.6.22/scripts/mkmakefile linux-2.6.22.changed/scripts/mkmakefile
> --- linux-2.6.22/scripts/mkmakefile	2006-11-29 22:57:37.000000000 +0100
> +++ linux-2.6.22.changed/scripts/mkmakefile	2007-07-12 03:03:49.000000000 +0200
> @@ -8,6 +8,7 @@
>  # $2 - Output directory
>  # $3 - version
>  # $4 - patchlevel
> +# $5 - patchlevel

Really?  I suspect you wanted
  +# $5 - architecture

Yours Tony

  linux.conf.au        http://linux.conf.au/ || http://lca2008.linux.org.au/
  Jan 28 - Feb 02 2008 The Australian Linux Technical Conference!


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] mkmakefile: include ARCH on O= builds
  2007-07-12  1:40 [PATCH] mkmakefile: include ARCH on O= builds Bodo Eggert
  2007-07-12  1:58 ` Tony Breeds
@ 2007-07-12  2:00 ` Randy Dunlap
  2007-07-12 15:09 ` Oleg Verych
  2 siblings, 0 replies; 5+ messages in thread
From: Randy Dunlap @ 2007-07-12  2:00 UTC (permalink / raw)
  To: Bodo Eggert; +Cc: Linux Kernel Mailing List, kai

On Thu, 12 Jul 2007 03:40:04 +0200 (CEST) Bodo Eggert wrote:

> If you build using O=builddir ARCH=bar, you'll currently need to supply
> ARCH= on builds from the builddir, too. With this patch, the generated
> Makefile will do that instead.
> 
> make ARCH= will still override the Makefile default, allowing existing 
> scripts to work correctly.
> 
> Signed-Off-By: Bodo Eggert <7eggert@gmx.de>
> 
> diff -X dontdiff -pruN linux-2.6.22/Makefile linux-2.6.22.changed/Makefile
> --- linux-2.6.22/Makefile	2007-07-11 23:15:33.000000000 +0200
> +++ linux-2.6.22.changed/Makefile	2007-07-12 02:59:39.000000000 +0200
> @@ -357,7 +357,7 @@ PHONY += outputmakefile
>  outputmakefile:
>  ifneq ($(KBUILD_SRC),)
>  	$(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkmakefile \
> -	    $(srctree) $(objtree) $(VERSION) $(PATCHLEVEL)
> +	    $(srctree) $(objtree) $(VERSION) $(PATCHLEVEL) $(ARCH)
>  endif
>  
>  # To make sure we do not include .config for any of the *config targets
> diff -X dontdiff -pruN linux-2.6.22/scripts/mkmakefile linux-2.6.22.changed/scripts/mkmakefile
> --- linux-2.6.22/scripts/mkmakefile	2006-11-29 22:57:37.000000000 +0100
> +++ linux-2.6.22.changed/scripts/mkmakefile	2007-07-12 03:03:49.000000000 +0200
> @@ -8,6 +8,7 @@
>  # $2 - Output directory
>  # $3 - version
>  # $4 - patchlevel
> +# $5 - patchlevel

should that ^^^^^^ be "arch" ?


>  test ! -r $2/Makefile -o -O $2/Makefile || exit 0
> @@ -21,16 +22,17 @@ PATCHLEVEL = $4
>  
>  KERNELSRC    := $1
>  KERNELOUTPUT := $2
> +ARCH         := $5
>  
>  MAKEFLAGS += --no-print-directory
>  
>  .PHONY: all \$(MAKECMDGOALS)
>  
>  all:
> -	\$(MAKE) -C \$(KERNELSRC) O=\$(KERNELOUTPUT)
> +	\$(MAKE) -C \$(KERNELSRC) O=\$(KERNELOUTPUT) ARCH=\$(ARCH)
>  
>  Makefile:;
>  
>  \$(filter-out all Makefile,\$(MAKECMDGOALS)) %/:
> -	\$(MAKE) -C \$(KERNELSRC) O=\$(KERNELOUTPUT) \$@
> +	\$(MAKE) -C \$(KERNELSRC) O=\$(KERNELOUTPUT) ARCH=\$(ARCH) \$@
>  EOF
> -- 
> The tough part about being an officer is that the troops don't know what
> they want, but they know for certain what they DON'T want.
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 


---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] mkmakefile: include ARCH on O= builds
  2007-07-12  1:40 [PATCH] mkmakefile: include ARCH on O= builds Bodo Eggert
  2007-07-12  1:58 ` Tony Breeds
  2007-07-12  2:00 ` Randy Dunlap
@ 2007-07-12 15:09 ` Oleg Verych
  2 siblings, 0 replies; 5+ messages in thread
From: Oleg Verych @ 2007-07-12 15:09 UTC (permalink / raw)
  To: linux-kernel

* Bodo Eggert "Thu, 12 Jul 2007 03:40:04 +0200 (CEST)"

> If you build using O=builddir ARCH=bar, you'll currently need to supply
> ARCH= on builds from the builddir, too. With this patch, the generated
> Makefile will do that instead.

I've sent such thing at least twice.

But now i'm thinking about kbuild/kconfig rewrite instead.

> make ARCH= will still override the Makefile default, allowing existing 
> scripts to work correctly.
>
> Signed-Off-By: Bodo Eggert <7eggert@gmx.de>
____


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] mkmakefile: include ARCH on O= builds
@ 2007-07-13 18:16 Bodo Eggert
  0 siblings, 0 replies; 5+ messages in thread
From: Bodo Eggert @ 2007-07-13 18:16 UTC (permalink / raw)
  To: Linux Kernel Mailing List; +Cc: kai, Tony Breeds

If you build using O=builddir ARCH=bar, you'll currently need to supply
ARCH= on builds from the builddir, too. With this patch, the generated
Makefile will do that instead.

make ARCH= will still override the Makefile default, allowing existing 
scripts to work correctly.

Signed-Off-By: Bodo Eggert <7eggert@gmx.de>
---
Changed from previous submission: Documentation is now as intended

diff -X dontdiff -pruN linux-2.6.22/Makefile linux-2.6.22.changed/Makefile
--- linux-2.6.22/Makefile	2007-07-11 23:15:33.000000000 +0200
+++ linux-2.6.22.changed/Makefile	2007-07-12 02:59:39.000000000 +0200
@@ -357,7 +357,7 @@ PHONY += outputmakefile
 outputmakefile:
 ifneq ($(KBUILD_SRC),)
 	$(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkmakefile \
-	    $(srctree) $(objtree) $(VERSION) $(PATCHLEVEL)
+	    $(srctree) $(objtree) $(VERSION) $(PATCHLEVEL) $(ARCH)
 endif
 
 # To make sure we do not include .config for any of the *config targets
diff -X dontdiff -pruN linux-2.6.22/scripts/mkmakefile linux-2.6.22.changed/scripts/mkmakefile
--- linux-2.6.22/scripts/mkmakefile	2006-11-29 22:57:37.000000000 +0100
+++ linux-2.6.22.changed/scripts/mkmakefile	2007-07-12 03:03:49.000000000 +0200
@@ -8,6 +8,7 @@
 # $2 - Output directory
 # $3 - version
 # $4 - patchlevel
+# $5 - arch
 
 
 test ! -r $2/Makefile -o -O $2/Makefile || exit 0
@@ -21,16 +22,17 @@ PATCHLEVEL = $4
 
 KERNELSRC    := $1
 KERNELOUTPUT := $2
+ARCH         := $5
 
 MAKEFLAGS += --no-print-directory
 
 .PHONY: all \$(MAKECMDGOALS)
 
 all:
-	\$(MAKE) -C \$(KERNELSRC) O=\$(KERNELOUTPUT)
+	\$(MAKE) -C \$(KERNELSRC) O=\$(KERNELOUTPUT) ARCH=\$(ARCH)
 
 Makefile:;
 
 \$(filter-out all Makefile,\$(MAKECMDGOALS)) %/:
-	\$(MAKE) -C \$(KERNELSRC) O=\$(KERNELOUTPUT) \$@
+	\$(MAKE) -C \$(KERNELSRC) O=\$(KERNELOUTPUT) ARCH=\$(ARCH) \$@
 EOF
-- 
The tough part about being an officer is that the troops don't know what
they want, but they know for certain what they DON'T want.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-07-13 18:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-12  1:40 [PATCH] mkmakefile: include ARCH on O= builds Bodo Eggert
2007-07-12  1:58 ` Tony Breeds
2007-07-12  2:00 ` Randy Dunlap
2007-07-12 15:09 ` Oleg Verych
2007-07-13 18:16 Bodo Eggert

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®