Re: [RFC] [PATCH] subarch cleanup

From: Sam Ravnborg (sam@ravnborg.org)
Date: Thu Nov 21 2002 - 13:33:04 EST


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/



This archive was generated by hypermail 2b29 : Sat Nov 23 2002 - 22:00:37 EST