1pmu-events-y += pmu-events.o 2JDIR = pmu-events/arch/$(SRCARCH) 3JSON = $(shell [ -d $(JDIR) ] && \ 4 find $(JDIR) -name '*.json' -o -name 'mapfile.csv') 5JDIR_TEST = pmu-events/arch/test 6JSON_TEST = $(shell [ -d $(JDIR_TEST) ] && \ 7 find $(JDIR_TEST) -name '*.json') 8JEVENTS_PY = pmu-events/jevents.py 9 10# 11# Locate/process JSON files in pmu-events/arch/ 12# directory and create tables in pmu-events.c. 13# 14 15ifeq ($(NO_JEVENTS),1) 16$(OUTPUT)pmu-events/pmu-events.c: pmu-events/empty-pmu-events.c 17 $(call rule_mkdir) 18 $(Q)$(call echo-cmd,gen)cp $< $@ 19else 20$(OUTPUT)pmu-events/pmu-events.c: $(JSON) $(JSON_TEST) $(JEVENTS_PY) 21 $(call rule_mkdir) 22 $(Q)$(call echo-cmd,gen)$(PYTHON) $(JEVENTS_PY) $(SRCARCH) pmu-events/arch $@ 23endif 24