* [PATCH] "PREEMPT" in UTS_VERSION
@ 2005-02-09 18:40 Matt Mackall
2005-03-14 20:49 ` Sam Ravnborg
0 siblings, 1 reply; 3+ messages in thread
From: Matt Mackall @ 2005-02-09 18:40 UTC (permalink / raw)
To: Sam Ravnborg, linux-kernel
Add PREEMPT to UTS_VERSION where enabled as is done for SMP to make
preempt kernels easily identifiable.
Signed-off-by: Matt Mackall <mpm@selenic.com>
Index: mm1/scripts/mkcompile_h
===================================================================
--- mm1.orig/scripts/mkcompile_h 2004-04-03 19:38:28.000000000 -0800
+++ mm1/scripts/mkcompile_h 2005-02-08 23:02:11.000000000 -0800
@@ -2,6 +2,7 @@
ARCH=$2
SMP=$3
CC=$4
+PREEMPT=$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
@@ -27,6 +28,7 @@
UTS_VERSION="#$VERSION"
if [ -n "$SMP" ] ; then UTS_VERSION="$UTS_VERSION SMP"; fi
+if [ -n "$PREEMPT" ] ; then UTS_VERSION="$UTS_VERSION PREEMPT"; fi
UTS_VERSION="$UTS_VERSION `LC_ALL=C LANG=C date`"
# Truncate to maximum length
Index: mm1/init/Makefile
===================================================================
--- mm1.orig/init/Makefile 2005-02-04 11:22:34.000000000 -0800
+++ mm1/init/Makefile 2005-02-08 23:02:07.000000000 -0800
@@ -25,4 +25,4 @@
include/linux/compile.h: FORCE
@echo ' CHK $@'
- @$(CONFIG_SHELL) $(srctree)/scripts/mkcompile_h $@ "$(UTS_MACHINE)" "$(CONFIG_SMP)" "$(CC) $(CFLAGS)"
+ @$(CONFIG_SHELL) $(srctree)/scripts/mkcompile_h $@ "$(UTS_MACHINE)" "$(CONFIG_SMP)" "$(CC) $(CFLAGS)" "$(CONFIG_PREEMPT)"
--
Mathematics is the supreme nostalgia of our time.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] "PREEMPT" in UTS_VERSION
2005-02-09 18:40 [PATCH] "PREEMPT" in UTS_VERSION Matt Mackall
@ 2005-03-14 20:49 ` Sam Ravnborg
2005-03-14 21:01 ` Matt Mackall
0 siblings, 1 reply; 3+ messages in thread
From: Sam Ravnborg @ 2005-03-14 20:49 UTC (permalink / raw)
To: Matt Mackall; +Cc: linux-kernel
On Wed, Feb 09, 2005 at 10:40:11AM -0800, Matt Mackall wrote:
> Add PREEMPT to UTS_VERSION where enabled as is done for SMP to make
> preempt kernels easily identifiable.
I have the following patch in my tree now. It has the advantage that
compile.h gets updated when you change the PREEMPT setting.
How many scripts parsing the output of `uname -v` will break because of
this?
Sam
===== init/Makefile 1.28 vs edited =====
--- 1.28/init/Makefile 2005-01-05 03:48:07 +01:00
+++ edited/init/Makefile 2005-03-14 21:30:13 +01:00
@@ -25,4 +25,5 @@
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)"
===== scripts/mkcompile_h 1.17 vs edited =====
--- 1.17/scripts/mkcompile_h 2003-09-10 08:41:43 +02:00
+++ edited/scripts/mkcompile_h 2005-03-14 21:43:50 +01:00
@@ -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 @@
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 @@
# 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`\"
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] "PREEMPT" in UTS_VERSION
2005-03-14 20:49 ` Sam Ravnborg
@ 2005-03-14 21:01 ` Matt Mackall
0 siblings, 0 replies; 3+ messages in thread
From: Matt Mackall @ 2005-03-14 21:01 UTC (permalink / raw)
To: linux-kernel
On Mon, Mar 14, 2005 at 09:49:17PM +0100, Sam Ravnborg wrote:
> On Wed, Feb 09, 2005 at 10:40:11AM -0800, Matt Mackall wrote:
> > Add PREEMPT to UTS_VERSION where enabled as is done for SMP to make
> > preempt kernels easily identifiable.
> I have the following patch in my tree now. It has the advantage that
> compile.h gets updated when you change the PREEMPT setting.
>
> How many scripts parsing the output of `uname -v` will break because of
> this?
None that wouldn't have already broken from free-form extraversion and
vendor version crap, I suspect.
--
Mathematics is the supreme nostalgia of our time.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-03-14 21:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-09 18:40 [PATCH] "PREEMPT" in UTS_VERSION Matt Mackall
2005-03-14 20:49 ` Sam Ravnborg
2005-03-14 21:01 ` Matt Mackall
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox