Re: [PATCH 1/2] kbuild: asm-generic support

From: Arnd Bergmann
Date: Sun Jan 09 2011 - 09:03:55 EST


Hi Sam,

Looks much cleaner to me now, but I still don't see why we even need
the new generic-export-y variable in addition to export-y. Can't we
just simply install all $(filter-out, $(generated-y), $(header-y))
from arch/$(SRCARCH)/include/asm and all $(filter, $(generated-y),
$(header-y)) from rch/$(SRCARCH)/include/generated/asm?

I think that would lead to a less confusing set of rules.

On Sunday 09 January 2011, Sam Ravnborg wrote:
> ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm.h \
> $(srctree)/include/asm-$(SRCARCH)/kvm.h),)
> -header-y += kvm.h
> +generic-export-y += kvm.h
> endif
>
> ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm_para.h \
> $(srctree)/include/asm-$(SRCARCH)/kvm_para.h),)
> -header-y += kvm_para.h
> +generic-export-y += kvm_para.h
> endif
>
> ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/a.out.h \
> $(srctree)/include/asm-$(SRCARCH)/a.out.h),)
> -header-y += a.out.h
> +generic-export-y += a.out.h
> endif

We can probably use the opportunity to clean this up as well, I never
like the idea of conditionalizing the installation of a header on the
presence of the file. Instead, we could either generate these headers
from new generic versions of them, or just put the header-y+= into
arch/$(SRCARCH)/include/asm/Kbuild where it belonged in the first
place.

The Kbuild.asm file was initially meant to list the files that are
exported from every architecture, so we could see the exact differences
in each architecture from its asm/Kbuild file.

Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/