lkml.org 
[lkml]   [2002]   [Nov]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] [PATCH] subarch cleanup
On Tue, Nov 19, 2002 at 04:00:29PM -0800, john stultz wrote:
> James, All,
>
> This is a small patch to try to somewhat cleanup the subarch code.
> First it moves all the subarch .h files out of arch/i386/mach-xyz into
> include/asm-i386/mach-xyz, then it changes the include patch to include
> include/asm-i386/mach-xyz and include/asm-i386/mach-generic when
> compiling. This allows the compiler to use the arch specific .h files
> when needed, and then falls back to the generic .h files if no subarch
> specific changes are needed.
Why do you need to move the .h files?

> ifdef CONFIG_VISWS
> -MACHINE := mach-visws
> +MACHINE_C := mach-visws
> +MACHINE_H := mach-visws
> else
> -MACHINE := mach-generic
> +MACHINE_C := mach-generic
> +MACHINE_H := mach-generic

No reason to have two different variables assigned the same value.
If you are modifying this anyway consider something like:
machine-y := mach-generic
machine-$(CONFIG_VISWS) := mach-visws

And then replace $(MACHINE) with $(machine-y).
This makes it much cleaner to add summit for example.

> -CFLAGS += -Iarch/i386/$(MACHINE)
> -AFLAGS += -Iarch/i386/$(MACHINE)
> +CFLAGS += -Iinclude/asm-i386/$(MACHINE_H) -Iinclude/asm-i386/mach-generic
> +AFLAGS += -Iinclude/asm-i386/$(MACHINE_H) -Iinclude/asm-i386/mach-generic

What's wrong with:
CFLAGS += -Iarch/i386/$(MACHINE_H) -Iarch/i386/mach-generic
That should achieve the same effect?

Sam
-
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/

\
 
 \ /
  Last update: 2005-03-22 13:31    [W:0.050 / U:1.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site