aboutsummaryrefslogtreecommitdiffstats
path: root/kernel-config
diff options
context:
space:
mode:
authorXi Ruoyao <xry111@xry111.site>2023-12-05 15:01:36 +0800
committerXi Ruoyao <xry111@xry111.site>2023-12-05 15:01:36 +0800
commit900bdf4ab1adcf771e8e512dcb3128d0bd869eac (patch)
treee00b9d1537a8b36d6e9b701d1d90cd5f2b1c354a /kernel-config
parentda09255a1c12628bbf186063e47320a4ac9e09c4 (diff)
kernel-config: Don't leave bad .xml files when the command fails
Diffstat (limited to 'kernel-config')
-rw-r--r--kernel-config/Makefile5
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel-config/Makefile b/kernel-config/Makefile
index f7dc9a5eef..d7d6e296d3 100644
--- a/kernel-config/Makefile
+++ b/kernel-config/Makefile
@@ -19,8 +19,11 @@ s-kernel-version:
fi
touch s-kernel-version
-../%-kernel.xml: %.toml kernel-config.py kernel_version.py kernel.version
+%-kernel.xml.tmp: %.toml kernel-config.py kernel_version.py kernel.version
./kernel-config.py $(KERNEL_TREE) $< > $@
+../%-kernel.xml: %-kernel.xml.tmp
+ mv $< $@
+
../introduction/welcome/conventions-kernel.xml: kernel-config.py testdata/Kconfig testdata/config.toml.example
./kernel-config.py testdata testdata/config.toml.example > $@