2023-07-30 01:43:02 +08:00
|
|
|
INPUT = $(wildcard */*.toml */*/*.toml */*/*/*.toml)
|
2023-07-29 23:48:10 +08:00
|
|
|
OUTPUT = $(patsubst %.toml, ../%-kernel.xml, $(INPUT))
|
|
|
|
|
|
|
|
ifeq ($(KERNEL_TREE),)
|
|
|
|
$(error "must set KERNEL_TREE=/path/to/kernel/source")
|
|
|
|
endif
|
|
|
|
|
2023-07-31 20:59:44 +08:00
|
|
|
all: $(OUTPUT) ../introduction/welcome/conventions-kernel.xml
|
2023-07-29 23:48:10 +08:00
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
../%-kernel.xml: %.toml kernel-config.py kernel_version.py kernel.version
|
|
|
|
./kernel-config.py $(KERNEL_TREE) $< > $@
|
2023-07-31 20:59:44 +08:00
|
|
|
|
|
|
|
../introduction/welcome/conventions-kernel.xml: kernel-config.py testdata/Kconfig testdata/config.toml.example
|
|
|
|
./kernel-config.py testdata testdata/config.toml.example > $@
|