I proposed that earlier in this thread. Please read all messages carefully.
>What if the kernel build would write a file called
>'/boot/enviornment-2.2.14' when you installed it. This file would be a
>make/shell compatible file that simply consisted of parameters. An
>example,
>
>BUILDROOT=/usr/local/src/linux-2.2/14/
>INCLUDEROOT=/usr/local/src/linux-2.2/14/include/
>KERNELCONFIG=/boot/config-2.2.14
>CPPFLAGS=-D_SMP_
>KERNELVERSION=2.2.14
>[..]
>
>The contents would be generated as part of the kernel build process.
The idea is fine, but:
1. It should probably be in the same place as the header files, since
you need the path to the header files anyway. In fact /usr/src/linux
would be a great default.
2. It should be position independant.
It should be in the form of a Makefile fragment like the first part
of the standard kernel Makefile. Paths should be relative to a variable
set earlier, so that you can do:
# Standard module Makefile
# Point to kernel you want to build against (default /usr/src/linux)
KERNELSRC=/usr/src/linux
include $(KERNELSRC)/config.mk
config.mk sets TOPDIR to KERNELSRC and sets all the other variables
such as HPATH, AS, LD, CC, CPP, CFLAGS, etc. See the first 100 lines
of the standard kernel Makefile - it could simply be a copy of that
(taking .config into account)
Mike.
-- The From: and Reply-To: addresses are internal news2mail gateway addresses. Reply to the list or to miquels@cistron.nl (Miquel van Smoorenburg)- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/