This simplifies things a bit.
@$(call mkdir_def,$(2))
+@$(MAKE) --no-builtin-rules $(NO_PRINT_DIRECTORY) SOURCES_DIR=$(SOURCES_DIR) RELATIVE_DIR=$(RELATIVE_DIR) -C $(2) \
-f $(SOURCESDIR_MAKEFILE) $(3) $(check-target) $(1:%=%-local)
+ifneq ($(pass),clean)
$(pass)-local: $($(pass)_HOOKS)
endif
+endif
endef
# =======================
endif
-clean-local: clean-local-config-h
-
-clean-local-config-h:
+clean-local::
@$(foreach confh,$(config_h_stamp_files) $(kern_config_h_stamp_files),\
if [ -e $(confh) ] ; then rm $(confh) ; fi ; \
)
# Rules for compilation of C, C++ and assembler sources using Keil's
# (X)C16x tools. For documentation see gcc snippet.
-clean-local: clean-keil
-
-clean-keil:
+clean-local::
$(Q)rm -f $(USER_OBJS_DIR)/*.obj $(USER_OBJS_DIR)/*.lst
endif
+clean-local::
ifdef KERN_RULE_TEMPLATES
KERN_SOURCES := $(sort $(KERN_SOURCES))
$(foreach src,$(filter %.S,$(USER_SOURCES)),$(eval $(call COMPILE_S_o_kern_template,$(SOURCES_DIR)/$(src),$(src:%.S=%.o),)))
endif
-clean-local: clean-custom
@echo Cleaning in $(KERN_OBJS_DIR) and $(USER_OBJS_DIR)
@rm -f $(KERN_OBJS_DIR)/*.o $(USER_OBJS_DIR)/*.[och] $(USER_OBJS_DIR)/*.lo\
$(KERN_OBJS_DIR)/*.d $(USER_OBJS_DIR)/*.d \
RELATIVE_DIR=$(RELATIVE_PREFIX)$(dir $(1)) -C $(LOCAL_BUILD_DIR)/$(dir $(1)) || exit 1 ;
# Hook to clean pass
-clean-local: clean-qt-$(dir $(1))
-clean-qt-$(dir $(1)): $(LOCAL_BUILD_DIR)/$(dir $(1))Makefile
+clean-local:: $(LOCAL_BUILD_DIR)/$(dir $(1))Makefile
@$(QUIET_CMD_ECHO) " QT CLEAN $(dir $(1))"
$(Q)$(MAKE) SOURCES_DIR=$(SOURCES_DIR)/$(dir $(1)) \
RELATIVE_DIR=$(RELATIVE_PREFIX)$(dir $(1)) \
endif
-clean-local:
+clean-local::
@echo Cleaning in $(USER_OBJS_DIR)
@rm -f $(USER_OBJS_DIR)/*.o $(USER_OBJS_DIR)/*.lo \
$(USER_OBJS_DIR)/*.d \
$(A51TOASX) $(SOURCES_DIR)/$${srcfname} $(USER_OBJS_DIR)/$${destfname} ) || exit 1 ; )
-.PHONY: clean-custom
-clean-local: clean-custom
+clean-local::
@echo Cleaning in $(USER_OBJS_DIR)
$(Q)rm -f $(USER_OBJS_DIR)/*$(OBJ_EXT) $(USER_OBJS_DIR)/*.lo \
$(USER_OBJS_DIR)/*.d \
|| $(call cp_cmd,$(SOURCES_DIR)/$(f),$(USER_LIB_DIR)/$(notdir $(f))) || exit 1 ; )
-.PHONY: clean-custom
-clean-local: clean-custom
+clean-local::
$(Q)rm -f $(USER_OBJS_DIR)/*.o $(USER_OBJS_DIR)/*.lo \
$(USER_OBJS_DIR)/*.d \
$(USER_OBJS_DIR)/*.map \
binary-pass-local: $(bin_PROGRAMS:%=$(USER_BIN_DIR)/%.vxe) $(test_PROGRAMS:%=$(USER_TESTS_DIR)/%.vxe) $(utils_PROGRAMS:%=$(USER_UTILS_DIR)/%.vxe)
-clean-local:
+clean-local::
@echo Cleaning in $(USER_OBJS_DIR)
@rm -f $(USER_OBJS_DIR)/*.o $(USER_OBJS_DIR)/*.lo \
$(USER_OBJS_DIR)/*.d \