]> rtime.felk.cvut.cz Git - omk.git/commitdiff
Convert clean pass to "double-colon rules"
authorMichal Sojka <sojkam1@fel.cvut.cz>
Tue, 12 Nov 2013 10:23:00 +0000 (11:23 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Tue, 12 Nov 2013 15:27:53 +0000 (16:27 +0100)
This simplifies things a bit.

snippets/base.omk
snippets/config_h.omk
snippets/keil16x.omk
snippets/linux.omk
snippets/qt.omk
snippets/rtems.omk
snippets/sdcc.omk
snippets/sysless.omk
snippets/vxworks.omk

index 3b811ec776c2b88ba175a6cd7e7af0f960aeb71e..b6708d4664646d5e58c56c0f5efb063344c66b62 100644 (file)
@@ -267,8 +267,10 @@ $(pass)-this-dir: $(foreach subdir,$(SUBDIRS),$(pass)-$(subdir)-subdir)
        @$(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
 
 # =======================
index 863567f6a4e463f55a4ecc71880867fb197aec75..6bbcac517e6d04531ba1ef82d083ebd4eaf14ead 100644 (file)
@@ -72,9 +72,7 @@ include-pass-local: $(kern_config_h_stamp_files)
 
 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 ; \
        )
index b8f741c1d3007dfe12119b5760fc1f23b07bd20c..dd3d81a0f92fccc040a66965c143ae25e961b35f 100644 (file)
@@ -10,9 +10,7 @@
 # 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
 
 
index 99272879226c696a9884bc9c0308d653fe3cca10..61bf4d30c938bfd5d666fb52d84b71f64f4ba0e4 100644 (file)
@@ -781,6 +781,7 @@ $(foreach src,$(filter %.idl,$(USER_IDLS)),$(eval $(call COMPILE_idl_template,$(
 
 endif
 
+clean-local::
 ifdef KERN_RULE_TEMPLATES
 
 KERN_SOURCES := $(sort $(KERN_SOURCES))
@@ -798,7 +799,6 @@ $(foreach src,$(filter %.cpp,$(KERN_SOURCES)),$(eval $(call COMPILE_cc_o_kern_te
 $(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 \
index 35063bcb1e8f5e0c6e4c471c19e89aaf240e95ba..518850e9e23f0863d1ce9cac98417c64c909033b 100644 (file)
@@ -34,8 +34,7 @@ qt-subpass-$(1): $(LOCAL_BUILD_DIR)/$(dir $(1))Makefile
                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)) \
index 7bc0abd77abee3d767d70e932b653dfa8ca92d44..127220f43d0c5cdf092deaea0a6b6f3f21d831f5 100644 (file)
@@ -384,7 +384,7 @@ $(foreach tarfile,$(USER_EMBEDTARFILES),$(eval $(call TARFILE_template,$(tarfile
 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 \
index f84b69d93508153cfffa8d18f4772e75f6d6b6c2..f98e17152f78f674aded6e44556f99f6c2af54a2 100644 (file)
@@ -323,8 +323,7 @@ include-pass-local:
           $(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 \
index e55a0ae2e8178911cc9756b726b9f5555a52844c..c872d76b65c03c741cd0348b44e0bfc3fae179e5 100644 (file)
@@ -272,8 +272,7 @@ include-pass-local:
           || $(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 \
index 17d742966267abd7a0d6fc9c553a48e9d2b40ed0..dfcad50497cf86590bdbb88ed1c3c92338f90dbd 100644 (file)
@@ -179,7 +179,7 @@ library-pass-local: $(addprefix $(USER_INCLUDE_DIR)/,$(cmetric_include_HEADERS))
 
 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 \