Re: [RFC] Splitting kernel headers and deprecating __KERNEL__

From: Sam Ravnborg
Date: Tue Nov 30 2004 - 17:37:53 EST


On Tue, Nov 30, 2004 at 12:47:50PM -0800, Linus Torvalds wrote:
If that's all that people want, I hereby proclaim that
>
> include/asm-xxx/user/xxxx.h
> include/user/xxxx.h
>
> is reserved for user-visible stuff. And now you can send me small and
> localized patches that fix a _particular_ gripe.

Please use:
include/$arch/user-asm/xxxx.h
include/user/xxxx.h

This allows us to

1) To include file foo.h we still distingush between user versus user-asm:
#include <user/foo.h> (include/user/foo.h)
#include <user-asm/foo.h> (include/$arch/user-asm/foo.h)

2) No symlinks needed - just proper options to gcc

Sam

This should do it for the top-level makefile:

===== Makefile 1.549 vs edited =====
--- 1.549/Makefile 2004-11-15 10:00:11 +01:00
+++ edited/Makefile 2004-11-30 23:31:09 +01:00
@@ -345,6 +345,10 @@
# Needed to be compatible with the O= option
LINUXINCLUDE := -Iinclude \
$(if $(KBUILD_SRC),-Iinclude2 -I$(srctree)/include)
+
+# Extend include path with user dir
+LINUXINCLUDE += -Iinclude/$(ARCH) \
+ $(if $(KBUILD_SRC), -I$(srctree)/include/$(ARCH))

CPPFLAGS := -D__KERNEL__ $(LINUXINCLUDE)


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