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).
Showing the changes to scripts (1 of 2 files). Show all
Unified · Split
| @@ -1,7 +1,8 @@ | ||
| 1 | 1 | TARGET=$1 |
| 2 | 2 | ARCH=$2 |
| 3 | 3 | SMP=$3 |
| 4 | −CC=$4 | |
| 4 | +PREEMPT=$4 | |
| 5 | +CC=$5 | |
| 5 | 6 | |
| 6 | 7 | # If compile.h exists already and we don't own autoconf.h |
| 7 | 8 | # (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 | |
| 28 | 29 | UTS_VERSION="#$VERSION" |
| 29 | −if [ -n "$SMP" ] ; then UTS_VERSION="$UTS_VERSION SMP"; fi | |
| 30 | −UTS_VERSION="$UTS_VERSION `LC_ALL=C LANG=C date`" | |
| 30 | +CONFIG_FLAGS="" | |
| 31 | +if [ -n "$SMP" ] ; then CONFIG_FLAGS="SMP"; fi | |
| 32 | +if [ -n "$PREEMPT" ] ; then CONFIG_FLAGS="$CONFIG_FLAGS PREEMPT"; fi | |
| 33 | +UTS_VERSION="$UTS_VERSION $CONFIG_FLAGS `LC_ALL=C LANG=C date`" | |
| 31 | 34 | |
| 32 | 35 | # Truncate to maximum length |
| 33 | 36 | |
| @@ -37,7 +40,8 @@ UTS_TRUNCATE="sed -e s/\(.\{1,$UTS_LEN\}\).*/\1/" · 3 unmodified lines | ||
| 37 | 40 | # Generate a temporary compile.h |
| 38 | 41 | |
| 39 | 42 | ( echo /\* This file is auto generated, version $VERSION \*/ |
| 40 | − | |
| 43 | + if [ -n "$CONFIG_FLAGS" ] ; then echo "/* $CONFIG_FLAGS */"; fi | |
| 44 | + | |
| 41 | 45 | echo \#define UTS_MACHINE \"$ARCH\" |
| 42 | 46 | |
| 43 | 47 | echo \#define UTS_VERSION \"`echo $UTS_VERSION | $UTS_TRUNCATE`\" |