mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-01-18 13:07:50 +00:00
27 lines
733 B
Makefile
27 lines
733 B
Makefile
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
|
|
|
|
.PHONY: s-kernel-version
|
|
s-kernel-version:
|
|
./kernel_version.py $(KERNEL_TREE) > tmp-kernel.version
|
|
if ! diff tmp-kernel.version kernel.version ; then \
|
|
mv tmp-kernel.version kernel.version; \
|
|
else \
|
|
rm tmp-kernel.version; \
|
|
fi
|
|
touch s-kernel-version
|
|
|
|
%.xml.tmp: %.toml kernel-config.py kernel_version.py kernel.version
|
|
./kernel-config.py $(KERNEL_TREE) $< > $@
|
|
|
|
%.xml: %.xml.tmp
|
|
mv $< $@
|