intermediates := $(call local-generated-sources-dir)
LOCAL_GENERATED_SOURCES := $(addprefix $(intermediates)/, $(AMD_GENERATED_FILES))
-$(LOCAL_GENERATED_SOURCES): PRIVATE_PYTHON := $(MESA_PYTHON2)
-$(LOCAL_GENERATED_SOURCES): PRIVATE_CUSTOM_TOOL = $(PRIVATE_PYTHON) $^ > $@
-
-$(intermediates)/common/sid_tables.h: $(LOCAL_PATH)/common/sid_tables.py $(LOCAL_PATH)/common/sid.h $(LOCAL_PATH)/registers/amdgfxregs.json $(LOCAL_PATH)/registers/pkt3.json
- $(transform-generated-source)
-
-$(intermediates)/common/amdgfxregs.h: $(LOCAL_PATH)/registers/makeregheader.py $(LOCAL_PATH)/registers/amdgfxregs.json $(LOCAL_PATH)/registers/pkt3.json
- $(transform-generated-source) --sort address --guard AMDGFXREGS_H
+SID_TABLES := $(LOCAL_PATH)/common/sid_tables.py
+
+SID_TABLES_INPUTS := \
+ $(LOCAL_PATH)/common/sid.h \
+ $(LOCAL_PATH)/registers/amdgfxregs.json \
+ $(LOCAL_PATH)/registers/pkt3.json \
+ $(LOCAL_PATH)/registers/gfx10.json \
+ $(LOCAL_PATH)/registers/gfx10-rsrc.json
+
+$(intermediates)/common/sid_tables.h: $(SID_TABLES) $(SID_TABLES_INPUTS)
+ @mkdir -p $(dir $@)
+ @echo "Gen Header: $(PRIVATE_MODULE) <= $(notdir $(@))"
+ $(hide) $(MESA_PYTHON2) $(SID_TABLES) $(SID_TABLES_INPUTS) > $@ || ($(RM) $@; false)
+
+AMDGFXREGS := $(LOCAL_PATH)/registers/makeregheader.py
+
+AMDGFXREGS_INPUTS := \
+ $(LOCAL_PATH)/registers/amdgfxregs.json \
+ $(LOCAL_PATH)/registers/pkt3.json \
+ $(LOCAL_PATH)/registers/gfx10.json \
+ $(LOCAL_PATH)/registers/gfx10-rsrc.json
+
+$(intermediates)/common/amdgfxregs.h: $(AMDGFXREGS) $(AMDGFXREGS_INPUTS)
+ @mkdir -p $(dir $@)
+ @echo "Gen Header: $(PRIVATE_MODULE) <= $(notdir $(@))"
+ $(hide) $(MESA_PYTHON2) $(AMDGFXREGS) $(AMDGFXREGS_INPUTS) --sort address --guard AMDGFXREGS_H > $@ || ($(RM) $@; false)
LOCAL_C_INCLUDES := \
$(MESA_TOP)/include \