diff options
author | Xi Ruoyao <xry111@xry111.site> | 2023-08-01 00:08:56 +0800 |
---|---|---|
committer | Xi Ruoyao <xry111@xry111.site> | 2023-08-01 00:08:56 +0800 |
commit | 70bf5512d96389ea1c068cd20a48093a10d6a963 (patch) | |
tree | 5226c92cd220ba616094c0e6e03d24c0272ed8ee /chapter10/kernel/Makefile | |
parent | 2cf01ab7023ce34da711af45413f4ed7850a9837 (diff) |
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 <screen> here.
Diffstat (limited to 'chapter10/kernel/Makefile')
-rw-r--r-- | chapter10/kernel/Makefile | 19 |
1 files changed, 19 insertions, 0 deletions
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) $< > $@ |