History

kbuild: "PREEMPT" in UTS_VERSION

From: Matt Mackall <mpm@selenic.com> 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).

Sam Ravnborg committed 21 years ago

Commit bd5bdd81 parent 6d30e3a2 files · +10 −5Browse files

Unified · Split

2 files
  1. init/Makefile +2 −1
  2. scripts/mkcompile_h +8 −4
init/Makefile+2−1
@@ -25,4 +25,5 @@ $(obj)/version.o: include/linux/compile.h · 24 unmodified lines
25 25
26include/linux/compile.h: FORCE26include/linux/compile.h: FORCE
27 @echo ' CHK $@'27 @echo ' CHK $@'
28 @$(CONFIG_SHELL) $(srctree)/scripts/mkcompile_h $@ "$(UTS_MACHINE)" "$(CONFIG_SMP)" "$(CC) $(CFLAGS)"28 $(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkcompile_h $@ \
29 "$(UTS_MACHINE)" "$(CONFIG_SMP)" "$(CONFIG_PREEMPT)" "$(CC) $(CFLAGS)"
scripts/mkcompile_h+8−4
@@ -1,7 +1,8 @@
1TARGET=$11TARGET=$1
2ARCH=$22ARCH=$2
3SMP=$33SMP=$3
4CC=$44PREEMPT=$4
5CC=$5
5 6
6# If compile.h exists already and we don't own autoconf.h7# If compile.h exists already and we don't own autoconf.h
7# (i.e. we're not the same user who did make *config), don't8# (i.e. we're not the same user who did make *config), don't
@@ -26,8 +27,10 @@ fi · 18 unmodified lines
26 27
27 28
28UTS_VERSION="#$VERSION"29UTS_VERSION="#$VERSION"
29if [ -n "$SMP" ] ; then UTS_VERSION="$UTS_VERSION SMP"; fi30CONFIG_FLAGS=""
30UTS_VERSION="$UTS_VERSION `LC_ALL=C LANG=C date`"31if [ -n "$SMP" ] ; then CONFIG_FLAGS="SMP"; fi
32if [ -n "$PREEMPT" ] ; then CONFIG_FLAGS="$CONFIG_FLAGS PREEMPT"; fi
33UTS_VERSION="$UTS_VERSION $CONFIG_FLAGS `LC_ALL=C LANG=C date`"
31 34
32# Truncate to maximum length35# Truncate to maximum length
33 36
@@ -37,7 +40,8 @@ UTS_TRUNCATE="sed -e s/\(.\{1,$UTS_LEN\}\).*/\1/" · 3 unmodified lines
37# Generate a temporary compile.h40# Generate a temporary compile.h
38 41
39( echo /\* This file is auto generated, version $VERSION \*/42( echo /\* This file is auto generated, version $VERSION \*/
40 43 if [ -n "$CONFIG_FLAGS" ] ; then echo "/* $CONFIG_FLAGS */"; fi
44
41 echo \#define UTS_MACHINE \"$ARCH\"45 echo \#define UTS_MACHINE \"$ARCH\"
42 46
43 echo \#define UTS_VERSION \"`echo $UTS_VERSION | $UTS_TRUNCATE`\"47 echo \#define UTS_VERSION \"`echo $UTS_VERSION | $UTS_TRUNCATE`\"