>>>>> Ivan Shmakov <[EMAIL PROTECTED]> writes:
>>>>> Tino Keitel <[EMAIL PROTECTED]> writes:
>> it will be nice if KBUILD_OUTPUT is supported. That way, one source
>> tree can be used to build kernels for differend computers with
>> different machines without a clean and messing around with config
>> files.
> Well, I probably may say that I've some ``initial success'' with
> building in a separate directory. I'd like to mention a couple of
> issues that I've stumbled upon:
I'm currently testing the following hack:
--- /usr/share/kernel-package/kernel_version.mk.~1~ 2007-05-05
12:48:30.000000000 +0700
+++ /usr/share/kernel-package/kernel_version.mk 2008-01-08 21:04:00.000000000
+0600
@@ -39,7 +39,21 @@
# Include the kernel makefile
override dot-config := 1
-include Makefile
+kernel_source \
+ = $(shell sed -e '/^KERNELSRC[[:blank:]]*:\?=[[:blank:]]*/!d; s///' \
+ Makefile)
+ifneq ($(kernel_source),)
+kernel_output \
+ = $(shell sed -e '/^KERNELOUTPUT[[:blank:]]*:\?=[[:blank:]]*/!d; s///' \
+ Makefile)
+kernel_source_makefile = $(kernel_source)/Makefile
+else
+kernel_output =
+kernel_source_makefile = Makefile
+endif
+KBUILD_SRC = $(kernel_source)
+# KBUILD_OUTPUT = $(kernel_output)
+include $(kernel_source_makefile)
dot-config := 1
.PHONY: debian_VERSION debian_PATCHLEVEL debian_SUBLEVEL
It requires one to use kbuild first, e. g.:
$ cd /usr/src/linux-2.6.X.Y
$ make O=/where/is/linux-2.6.X.Y-build menuconfig
...
$
Then, make-kpkg(1) could be used:
$ cd /where/is/linux-2.6.X.Y-build
$ make-kpkg ...
...
$
> * it seems to me that implementing the support for an autoconf-like
> style of passing the source and build directories location, e. g.:
> $ make-kpkg --kernel-source=/where/is/the/source
> would require less time than a kbuild-like one (assuming using the
> existing code base, of course); certainly, one'd need to prefix a
> number of filenames with `$(srctree)/', but it would be even worse to
> prefix almost everything with `$(KBUILD_OUTPUT)/';
No such option is implemented by the patch above.
> * including build-toplevel Makefile has a little sense, since it
> contains (almost) no variables, nor `include's (in the separate build
> directory case); moreover, it defines a rule which may interfere with
> `debian/rules'.
BTW, `Makefile' at top of the Linux 2.6 source tree interferes
with `kernel_version.mk' as well iff the `KBUILD_OUTPUT' Make
variable is defined.
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]