aboutsummaryrefslogtreecommitdiffstats
path: root/chapter10/kernel/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'chapter10/kernel/Makefile')
-rw-r--r--chapter10/kernel/Makefile8
1 files changed, 6 insertions, 2 deletions
diff --git a/chapter10/kernel/Makefile b/chapter10/kernel/Makefile
index d02408dcc..e04d2d6b1 100644
--- a/chapter10/kernel/Makefile
+++ b/chapter10/kernel/Makefile
@@ -8,10 +8,14 @@ endif
all: $(OUTPUT)
kernel.version: s-kernel-version; @true
-s-kernel-version: Makefile kernel_version.py
+
+.PHONY: s-kernel-version
+s-kernel-version:
./kernel_version.py $(KERNEL_TREE) > tmp-kernel.version
- if ! diff tmp-kernel.version $@ 2>/dev/null >/dev/null; then \
+ if ! diff tmp-kernel.version kernel.version ; then \
mv tmp-kernel.version kernel.version; \
+ else \
+ rm tmp-kernel.version; \
fi
touch s-kernel-version