lkml.org 
[lkml]   [2002]   [Jul]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: [patch] 2.5.25 remove unnecessary recompiles when changing EXTRAVERSION
Date
On Sat, 06 Jul 2002 16:47:21 -0400, 
Albert Cranford <ac9410@bellsouth.net> wrote:
>What do the changes to Makefile-2.5 look like for
>Kbuild-3.1 ?

This has had two minutes of testing. Apply after core-21, it should
auto detect if the uts_release patch has been applied or not. This
will be included in kbuild 2.5 once the uts_release.h patch is included
in 2.5.x, I am holding off in case the uts_release patch has to change.

Index: 18.99/Makefile-2.5
--- 18.99/Makefile-2.5 Fri, 05 Jul 2002 17:16:39 +1000 kaos (linux-2.4/E/d/40_Makefile-2 1.32.2.27.1.8 644)
+++ 18.99(w)/Makefile-2.5 Sun, 07 Jul 2002 11:52:02 +1000 kaos (linux-2.4/E/d/40_Makefile-2 1.32.2.27.1.8 644)
@@ -588,13 +588,24 @@ endif

export KERNELRELEASE VERSION PATCHLEVEL SUBLEVEL EXTRAVERSION USERVERSION

+# This code has to work on kernels with and without a separate uts_release.h.
+# If module.h still uses UTS_RELEASE then then assume that version.h must
+# include uts_release.h.
+
+ifneq ($(shell grep UTS_RELEASE $(KBUILD_SRCTREE_000)include/linux/module.h),)
+ include_uts_release := \#include <linux/uts_release.h>
+else
+ include_uts_release := /* uts_release.h is now handled separately */
+endif
+
$(KBUILD_OBJTREE)include/linux/version.h: $(KBUILD_OBJTREE)A_version FORCE_BUILD
@cd $(KBUILD_OBJTREE)
ifeq ($(KBUILD_WRITABLE),y)
@mkdir -p $(KBUILD_OBJTREE)include/linux
- @(echo \#include \<linux/uts_release.h\> && \
+ @(echo '$(include_uts_release)' && \
echo \#define LINUX_VERSION_CODE `expr $(VERSION) \\* 65536 + $(PATCHLEVEL) \\* 256 + $(SUBLEVEL)` && \
- echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))' \
+ echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))' && \
+ echo '#define KERNEL_VERSION_STRING "$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)"' \
) > $(KBUILD_OBJTREE).tmp_version.h && \
(cmp -s $(KBUILD_OBJTREE).tmp_version.h $@ || mv -f $(KBUILD_OBJTREE).tmp_version.h $@)
endif
-
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/

\
 
 \ /
  Last update: 2005-03-22 13:27    [W:0.020 / U:0.492 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site