1# SPDX-License-Identifier: GPL-2.0 2 3gen := arch/$(ARCH)/include/generated 4kapi := $(gen)/asm 5 6kapi-hdrs-y := $(kapi)/cpucaps.h 7 8targets += $(addprefix ../../../,$(gen-y) $(kapi-hdrs-y)) 9 10PHONY += kapi 11 12kapi: $(kapi-hdrs-y) $(gen-y) 13 14# Create output directory if not already present 15_dummy := $(shell [ -d '$(kapi)' ] || mkdir -p '$(kapi)') 16 17quiet_cmd_gen_cpucaps = GEN $@ 18 cmd_gen_cpucaps = mkdir -p $(dir $@) && \ 19 $(AWK) -f $(filter-out $(PHONY),$^) > $@ 20 21$(kapi)/cpucaps.h: $(src)/gen-cpucaps.awk $(src)/cpucaps FORCE 22 $(call if_changed,gen_cpucaps) 23