Skip to contentSkip to conversation

2.5.25 remove unnecessary recompiles when changing EXTRAVERSION

PATCH Keith Owens 1 participant 1 message Jul 7, 2002 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 2 lines · Albert Cranford

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

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) renamed from 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) +13 -2
@@ -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