tree 9c01171195532d449d6897711920d764a90521ba
parent 6d30e3a8995c9fa9e8471bb1dff8e070638df5ea
author Sam Ravnborg <[EMAIL PROTECTED](none)> Thu, 14 Jul 2005 20:18:07 +0000
committer Sam Ravnborg <[EMAIL PROTECTED](none)> Thu, 14 Jul 2005 20:18:07 +0000

kbuild: "PREEMPT" in UTS_VERSION

From: Matt Mackall <[EMAIL PROTECTED]>

Add PREEMPT to UTS_VERSION where enabled as is done for SMP to make
preempt kernels easily identifiable.
Added SMP PREEMPT as comment in compile.h to force it to be
updated when they change (sam).

Signed-off-by: Matt Mackall <[EMAIL PROTECTED]>
Signed-off-by: Sam Ravnborg <[EMAIL PROTECTED]>

 init/Makefile       |    3 ++-
 scripts/mkcompile_h |   12 ++++++++----
 2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/init/Makefile b/init/Makefile
--- a/init/Makefile
+++ b/init/Makefile
@@ -25,4 +25,5 @@ $(obj)/version.o: include/linux/compile.
 
 include/linux/compile.h: FORCE
        @echo '  CHK     $@'
-       @$(CONFIG_SHELL) $(srctree)/scripts/mkcompile_h $@ "$(UTS_MACHINE)" 
"$(CONFIG_SMP)" "$(CC) $(CFLAGS)"
+       $(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkcompile_h $@ \
+       "$(UTS_MACHINE)" "$(CONFIG_SMP)" "$(CONFIG_PREEMPT)" "$(CC) $(CFLAGS)"
diff --git a/scripts/mkcompile_h b/scripts/mkcompile_h
--- a/scripts/mkcompile_h
+++ b/scripts/mkcompile_h
@@ -1,7 +1,8 @@
 TARGET=$1
 ARCH=$2
 SMP=$3
-CC=$4
+PREEMPT=$4
+CC=$5
 
 # If compile.h exists already and we don't own autoconf.h
 # (i.e. we're not the same user who did make *config), don't
@@ -26,8 +27,10 @@ fi
 
 
 UTS_VERSION="#$VERSION"
-if [ -n "$SMP" ] ; then UTS_VERSION="$UTS_VERSION SMP"; fi
-UTS_VERSION="$UTS_VERSION `LC_ALL=C LANG=C date`"
+CONFIG_FLAGS=""
+if [ -n "$SMP" ] ; then CONFIG_FLAGS="SMP"; fi
+if [ -n "$PREEMPT" ] ; then CONFIG_FLAGS="$CONFIG_FLAGS PREEMPT"; fi
+UTS_VERSION="$UTS_VERSION $CONFIG_FLAGS `LC_ALL=C LANG=C date`"
 
 # Truncate to maximum length
 
@@ -37,7 +40,8 @@ UTS_TRUNCATE="sed -e s/\(.\{1,$UTS_LEN\}
 # Generate a temporary compile.h
 
 ( echo /\* This file is auto generated, version $VERSION \*/
-
+  if [ -n "$CONFIG_FLAGS" ] ; then echo "/* $CONFIG_FLAGS */"; fi
+  
   echo \#define UTS_MACHINE \"$ARCH\"
 
   echo \#define UTS_VERSION \"`echo $UTS_VERSION | $UTS_TRUNCATE`\"
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to