From 70bf5512d96389ea1c068cd20a48093a10d6a963 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Tue, 1 Aug 2023 00:08:56 +0800 Subject: kernel: Use new kernel configuration rendering method Import kernel-config infrastructure from BLFS and use it for kernel configuration. Note that kernel-config.py is slightly different from BLFS: we need role="nodump" for here. --- chapter10/kernel/Makefile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 chapter10/kernel/Makefile (limited to 'chapter10/kernel/Makefile') diff --git a/chapter10/kernel/Makefile b/chapter10/kernel/Makefile new file mode 100644 index 000000000..d02408dcc --- /dev/null +++ b/chapter10/kernel/Makefile @@ -0,0 +1,19 @@ +INPUT = $(wildcard *.toml) +OUTPUT = $(patsubst %.toml, %.xml, $(INPUT)) + +ifeq ($(KERNEL_TREE),) +$(error "must set KERNEL_TREE=/path/to/kernel/source") +endif + +all: $(OUTPUT) + +kernel.version: s-kernel-version; @true +s-kernel-version: Makefile kernel_version.py + ./kernel_version.py $(KERNEL_TREE) > tmp-kernel.version + if ! diff tmp-kernel.version $@ 2>/dev/null >/dev/null; then \ + mv tmp-kernel.version kernel.version; \ + fi + touch s-kernel-version + +%.xml: %.toml kernel-config.py kernel_version.py kernel.version + ./kernel-config.py $(KERNEL_TREE) $< > $@ -- cgit v1.2.3-54-g00ecf