buildsystem,makefiles,tarball: improve distclean targets to remove .configs/, *.ews...
authorRejean Loyer <redj@ecere.com>
Tue, 14 Apr 2015 13:38:23 +0000 (09:38 -0400)
committerJerome St-Louis <jerome@ecere.com>
Thu, 28 Jul 2016 22:23:24 +0000 (18:23 -0400)
43 files changed:
Cleanfile [new file with mode: 0644]
Makefile
audio/Makefile
compiler/Makefile
compiler/bootstrap/Makefile
compiler/bootstrap/ecc/Makefile
compiler/bootstrap/ecere/Makefile
compiler/bootstrap/ecp/Makefile
compiler/bootstrap/ecs/Makefile
compiler/bootstrap/libec/Makefile
compiler/ecc/Makefile
compiler/ecc/Makefile.bootstrap
compiler/ecp/Makefile
compiler/ecp/Makefile.bootstrap
compiler/ecs/Makefile
compiler/ecs/Makefile.bootstrap
compiler/libec/Makefile
compiler/libec/Makefile.bootstrap
crossplatform.mk
deps/Makefile
deps/freetype-2.3.12/Makefile
deps/jpeg-9a/Makefile
deps/libffi-3.0.11/Makefile
deps/libpng-1.6.12/Makefile
deps/libungif-4.1.1/Makefile
deps/zlib-1.2.8/Makefile
documentor/Makefile
ear/Makefile
ear/cmd/Makefile
ear/extract/Makefile
ecere/Makefile
ecere/Makefile.bootstrap
ecere/Makefile.ecereCOM
ecere/Makefile.installer
ecere/Makefile.vanilla
eda/Makefile
eda/drivers/sqlite/Makefile
eda/drivers/sqliteCipher/Makefile
eda/libeda/Makefile
epj2make/Makefile
ide/Makefile
ide/src/project/Project.ec
installer/Makefile

diff --git a/Cleanfile b/Cleanfile
new file mode 100644 (file)
index 0000000..ef8f885
--- /dev/null
+++ b/Cleanfile
@@ -0,0 +1,46 @@
+.PHONY: distclean distclean_all_subdirs
+ifneq ($(V),1)
+.SILENT:
+endif
+
+_cf = Cleanfile
+_d1 = ../
+_d2 = $(_d1)../
+_d3 = $(_d2)../
+_d4 = $(_d3)../
+_d5 = $(_d4)../
+_d6 = $(_d5)../
+_d7 = $(_d6)../
+_d8 = $(_d7)../
+find_sdk_src_root = $(if $(wildcard $(_cf)),,$(if $(wildcard $(_d1)$(_cf)),$(_d1),$(if $(wildcard $(_d2)$(_cf)),$(_d2),$(if $(wildcard $(_d3)$(_cf)),$(_d3),$(if $(wildcard $(_d4)$(_cf)),$(_d4),$(if $(wildcard $(_d5)$(_cf)),$(_d5),$(if $(wildcard $(_d6)$(_cf)),$(_d6),$(if $(wildcard $(_d7)$(_cf)),$(_d7),$(if $(wildcard $(_d8)$(_cf)),$(_d8),)))))))))
+
+ifneq ($(wildcard $(_CF_DIR)Cleanfile),)
+   _SDK_SRC_ROOT = $(_CF_DIR)
+endif
+ifeq ($(wildcard $(_SDK_SRC_ROOT)Cleanfile),)
+   _SDK_SRC_ROOT = $(find_sdk_src_root)
+endif
+
+$(_SDK_SRC_ROOT)Cleanfile: ;
+$(_SDK_SRC_ROOT)crossplatform.mk: ;
+
+include $(_SDK_SRC_ROOT)crossplatform.mk
+
+subdirs := $(sort $(filter-out obj,$(hs_ls_dir)))
+
+cd_make_distclean_all_subdirs = $(cd) $(call fp_opt_quotes,$(1)) && $(_MAKE) -f $(_SDK_SRC_ROOT)../Cleanfile _SDK_SRC_ROOT=$(_SDK_SRC_ROOT)../ $(if $(BUILD_DIR),BUILD_DIR=$(BUILD_DIR)$(1)/ ,) distclean distclean_all_subdirs && cd ..
+
+distclean_all_subdirs:
+ifdef _SDK_SRC_ROOT
+       $(call hs_crossloop,$(subdirs),cd_make_distclean_all_subdirs)
+endif
+
+distclean:
+ifdef _SDK_SRC_ROOT
+       $(call rmr,obj/)
+       $(call rmr,.configs/)
+ ifndef KEEP_EWS_FILES
+       $(call rm,*.ews)
+ endif
+       $(call rm,*.Makefile)
+endif
index b0c2198..94ca401 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -3,6 +3,8 @@ ifneq ($(V),1)
 .SILENT:
 endif
 
+_CF_DIR =
+
 include crossplatform.mk
 include default.cf
 
@@ -465,24 +467,8 @@ endif
        $(call rmr,obj/$(PLATFORM)/)
        @$(call echo,Done.)
 
-distclean: outputdirs
-ifndef LINUX_TARGET
-       cd deps && $(MAKE) distclean
-endif
-       cd ecere && $(MAKE) distclean
-       cd compiler && $(MAKE) distclean
-       cd ear && $(MAKE) distclean
-       cd epj2make && $(MAKE) distclean
-       cd ide && $(MAKE) distclean
-       cd documentor && $(MAKE) distclean
-ifneq ($(ECERE_AUDIO),n)
-       cd audio && $(MAKE) distclean
-endif
-ifdef CodeGuard
-       cd codeGuard && $(MAKE) distclean
-endif
-       cd eda && $(MAKE) distclean
-       $(call rmr,obj/)
+distclean:
+       $(MAKE) -f Cleanfile distclean distclean_all_subdirs
        @$(call echo,Done.)
 
 DOC = doc
index ef0a313..a5749df 100644 (file)
@@ -238,8 +238,8 @@ clean: cleantarget
 realclean: cleantarget
        $(call rmr,$(OBJ))
 
-distclean: cleantarget
-       $(call rmr,obj/)
+distclean:
+       $(_MAKE) -f $(_CF_DIR)Cleanfile distclean distclean_all_subdirs
 
 Makefile: ;
 $(_CF_DIR)crossplatform.mk: ;
index a9703d5..4f85892 100644 (file)
@@ -54,11 +54,7 @@ realclean:
        cd ecs && $(MAKE) realclean
 
 distclean:
-       cd bootstrap && $(MAKE) distclean
-       cd libec && $(MAKE) distclean
-       cd ecp && $(MAKE) distclean
-       cd ecc && $(MAKE) distclean
-       cd ecs && $(MAKE) distclean
+       $(MAKE) -f $(_CF_DIR)Cleanfile distclean distclean_all_subdirs
 
 Makefile: ;
 $(_CF_DIR)crossplatform.mk: ;
index a3adc4a..a5577d0 100644 (file)
@@ -38,13 +38,8 @@ realclean: cleantarget
        cd ecc && $(MAKE) realclean
        cd ecs && $(MAKE) realclean
 
-distclean: cleantarget
-       $(call rmr,obj/)
-       cd ecere && $(MAKE) distclean
-       cd libec && $(MAKE) distclean
-       cd ecp && $(MAKE) distclean
-       cd ecc && $(MAKE) distclean
-       cd ecs && $(MAKE) distclean
+distclean:
+       $(MAKE) -f $(_CF_DIR)Cleanfile distclean distclean_all_subdirs
 
 Makefile: ;
 $(_CF_DIR)crossplatform.mk: ;
index 98b8811..5ebd427 100644 (file)
@@ -118,8 +118,8 @@ clean: objdir
 realclean: objdir
        $(call rmr,$(OBJ))
 
-distclean: objdir
-       $(call rmr,obj/)
+distclean:
+       $(_MAKE) -f $(_CF_DIR)Cleanfile distclean distclean_all_subdirs
 
 Makefile: ;
 $(_CF_DIR)crossplatform.mk: ;
index 9be6e00..3576083 100644 (file)
@@ -213,8 +213,8 @@ clean: objdir
 realclean: objdir
        $(call rmr,$(OBJ))
 
-distclean: objdir
-       $(call rmr,obj/)
+distclean:
+       $(_MAKE) -f $(_CF_DIR)Cleanfile distclean distclean_all_subdirs
 
 Makefile: ;
 $(_CF_DIR)crossplatform.mk: ;
index f0ccd8f..a558dd6 100644 (file)
@@ -118,8 +118,8 @@ clean: objdir
 realclean: objdir
        $(call rmr,$(OBJ))
 
-distclean: objdir
-       $(call rmr,obj/)
+distclean:
+       $(_MAKE) -f $(_CF_DIR)Cleanfile distclean distclean_all_subdirs
 
 Makefile: ;
 $(_CF_DIR)crossplatform.mk: ;
index ed53c07..a9ea6da 100644 (file)
@@ -118,8 +118,8 @@ clean: objdir
 realclean: objdir
        $(call rmr,$(OBJ))
 
-distclean: objdir
-       $(call rmr,obj/)
+distclean:
+       $(_MAKE) -f $(_CF_DIR)Cleanfile distclean distclean_all_subdirs
 
 Makefile: ;
 $(_CF_DIR)crossplatform.mk: ;
index c38359b..6ad21f8 100644 (file)
@@ -188,8 +188,8 @@ clean: objdir
 realclean: objdir
        $(call rmr,$(OBJ))
 
-distclean: objdir
-       $(call rmr,obj/)
+distclean:
+       $(_MAKE) -f $(_CF_DIR)Cleanfile distclean distclean_all_subdirs
 
 Makefile: ;
 $(_CF_DIR)crossplatform.mk: ;
index 9161def..84d1200 100644 (file)
@@ -165,8 +165,8 @@ clean: cleantarget
 realclean: cleantarget
        $(call rmr,$(OBJ))
 
-distclean: cleantarget
-       $(call rmr,obj/)
+distclean:
+       $(_MAKE) -f $(_CF_DIR)Cleanfile distclean distclean_all_subdirs
 
 Makefile: ;
 $(_CF_DIR)crossplatform.mk: ;
index a9082af..8aac596 100644 (file)
@@ -130,8 +130,8 @@ clean: cleantarget
 realclean: cleantarget
        $(call rmr,$(OBJ))
 
-distclean: cleantarget
-       $(call rmr,obj/)
+distclean:
+       $(_MAKE) -f $(_CF_DIR)Cleanfile distclean distclean_all_subdirs
 
 Makefile.bootstrap: ;
 $(_CF_DIR)crossplatform.mk: ;
index 0d4dab0..d8b3f45 100644 (file)
@@ -163,8 +163,8 @@ clean: cleantarget
 realclean: cleantarget
        $(call rmr,$(OBJ))
 
-distclean: cleantarget
-       $(call rmr,obj/)
+distclean:
+       $(_MAKE) -f $(_CF_DIR)Cleanfile distclean distclean_all_subdirs
 
 Makefile: ;
 $(_CF_DIR)crossplatform.mk: ;
index 3a13d82..6441d7a 100644 (file)
@@ -132,8 +132,8 @@ clean: cleantarget
 realclean: cleantarget
        $(call rmr,$(OBJ))
 
-distclean: cleantarget
-       $(call rmr,obj/)
+distclean:
+       $(_MAKE) -f $(_CF_DIR)Cleanfile distclean distclean_all_subdirs
 
 Makefile.bootstrap: ;
 $(_CF_DIR)crossplatform.mk: ;
index 2e0af28..07e61f1 100644 (file)
@@ -163,8 +163,8 @@ clean: cleantarget
 realclean: cleantarget
        $(call rmr,$(OBJ))
 
-distclean: cleantarget
-       $(call rmr,obj/)
+distclean:
+       $(_MAKE) -f $(_CF_DIR)Cleanfile distclean distclean_all_subdirs
 
 Makefile: ;
 $(_CF_DIR)crossplatform.mk: ;
index 791a836..b7d703a 100644 (file)
@@ -130,8 +130,8 @@ clean: cleantarget
 realclean: cleantarget
        $(call rmr,$(OBJ))
 
-distclean: cleantarget
-       $(call rmr,obj/)
+distclean:
+       $(_MAKE) -f $(_CF_DIR)Cleanfile distclean distclean_all_subdirs
 
 Makefile.bootstrap: ;
 $(_CF_DIR)crossplatform.mk: ;
index b8aa277..3b4fe97 100644 (file)
@@ -368,8 +368,8 @@ clean: cleantarget
 realclean: cleantarget
        $(call rmr,$(OBJ))
 
-distclean: cleantarget
-       $(call rmr,obj/)
+distclean:
+       $(_MAKE) -f $(_CF_DIR)Cleanfile distclean distclean_all_subdirs
 
 Makefile: ;
 $(_CF_DIR)crossplatform.mk: ;
index 7f0c350..0227592 100644 (file)
@@ -259,8 +259,8 @@ clean: cleantarget
 realclean: cleantarget
        $(call rmr,$(OBJ))
 
-distclean: cleantarget
-       $(call rmr,obj/)
+distclean:
+       $(_MAKE) -f $(_CF_DIR)Cleanfile distclean distclean_all_subdirs
 
 Makefile.bootstrap: ;
 $(_CF_DIR)crossplatform.mk: ;
index 8e9324b..769ac63 100644 (file)
@@ -162,11 +162,12 @@ COMPILER_SUFFIX = .$(COMPILER)$(ARCH_SUFFIX)
 endif
 endif
 
-# MISC STRING TOOLS
+# STRING TOOLS
 empty :=
 esc := $(empty)\7f$(empty)
 space := $(empty) $(empty)
 comma := ,
+quote := "
 slash := $(empty)/$(empty)
 backslash := $(empty)\$(empty)
 escspace = $(subst $(space),$(backslash)$(space),$(subst $(backslash)$(space),$(space),$(1)))
@@ -174,6 +175,44 @@ hidspace = $(subst $(space),$(esc),$(subst $(backslash)$(space),$(esc),$(1)))
 shwspace = $(subst $(esc),$(backslash)$(space),$(1))
 unescp_all = $(subst $(esc),$(backslash),$(subst $(backslash),,$(subst $(backslash)$(backslash),$(esc),$(1))))
 
+# HIDDEN SPACE STRING TOOLS
+temporaty_token := _+;:;+_:;+;:_:+;+:_
+hidden_space := $(empty)\7f$(empty)
+hs_hide = $(subst $(space),$(hidden_space),$(1))
+hs_unhide = $(subst $(hidden_space),$(space),$(1))
+hs_escape = $(subst $(hidden_space),$(backslash)$(space),$(1))
+hs_process = $(subst $(space),$(hidden_space),$(subst $(backslash)$(space),$(hidden_space),$(1)))
+hs_quote_all = $(foreach item,$(1),"$(call hs_unhide,$(item))")
+hs_quote_each = $(foreach item,$(1),$(if $(findstring $(esc),$(item)),"$(call hs_unhide,$(item))",$(item)))
+
+# FILE PATH TOOLS
+fp_unquote = $(subst $(quote),,$(1))
+fp_opt_quotes = $(if $(findstring $(space),$(1)),"$(1)",$(1))
+fp_no_parent_dir = $(foreach item,$(1),$(if $(findstring ..,$(item)),,$(item)))
+
+# FILE SYSTEM TOOLS
+# hs_ls doc
+#     usage: $(hs_ls) | $(hs_ls_dir) | $(hs_ls_files)
+#     result:
+#      -      for hs_ls: a list of files and directories in the current dir
+#                        i.e.: fileA dir1/ fileB fileC dir2/ dir3/
+#      -  for hs_ls_dir: a list of directories in the current dir
+#                        i.e.: dir1 dir2 dir3
+#      - for hs_ls_file: a list of files in the current dir
+#                        i.e.: fileA fileB fileC
+#     notes:
+#      - hs_ls* functions work in current dir, you can't specify a directory
+#      - hs_ls* functions do not report hidden files and directories because wildcard doesn't
+#        you would never get such a list: .fileA .dir1/
+hs_ls = $(subst $(temporaty_token),$(space),$(subst ./,,$(call hs_hide,$(subst $(space)./,$(temporaty_token),$(wildcard ./*/)))))
+hs_ls_dir = $(subst /,,$(foreach item,$(hs_ls),$(if $(findstring /,$(item)),$(item),)))
+hs_ls_file = $(foreach item,$(hs_ls),$(if $(findstring /,$(item)),,$(item)))
+
+# CONTROL FLOW TOOLS
+# hs_crossloop usage: $(call hs_crossloop,<list>,<command_function>)
+#                     hs_crossloop will call <command_function> with the item as first parameter ($(1))
+hs_crossloop = $(call hs_unsafe_crossloop,$(call fp_no_parent_dir,$(1)),$(2))
+
 # PATH SEPARATOR STRING TOOLS
 ifdef WINDOWS_HOST
 ifndef MSYSCON
@@ -243,6 +282,7 @@ ifeq ($(D),1)
    DEBUG_IS_ON := defined
 endif
 ifdef WIN_SHELL_COMMANDS
+   cd = @cd
    nullerror = 2>NUL
    echo = $(if $(1),echo $(1))
    touch = $(if $(1),@cmd /c "for %%I in ($(call sys_path,$(1))) do @(cd %%~pI && type nul >> %%~nxI && copy /by %%~nxI+,, > nul 2>&1 && cd %%cd%%)")
@@ -252,7 +292,9 @@ ifdef WIN_SHELL_COMMANDS
    rmr = $(if $(1),-rmdir /s$(if $(SILENT_IS_ON), /q,) $(call sys_path,$(1))$(if $(SILENT_IS_ON), > nul,))
    mkdir = $(if $(1),-mkdir $(call sys_path,$(1))$(if $(SILENT_IS_ON), > nul,)$(if $(DEBUG_IS_ON),, 2>&1))
    rmdir = $(if $(1),-rmdir$(if $(SILENT_IS_ON), /q,) $(call sys_path,$(1))$(if $(SILENT_IS_ON), > nul,))
+   hs_unsafe_crossloop = ${if $(1),${if $(2),@cmd /c "for %%I in (${call hs_quote_each,$(1)}) do ${call $(2),%%I}",},}
 else
+   cd = cd
    nullerror = 2>/dev/null
    echo = $(if $(1),echo "$(1)")
    touch = $(if $(1),touch $(1))
@@ -262,6 +304,7 @@ else
    rmr = $(if $(1),-rm -fr$(if $(SILENT_IS_ON),,v) $(1))
    mkdir = $(if $(1),-mkdir -p$(if $(SILENT_IS_ON),,v) $(1))
    rmdir = $(if $(1),-rmdir$(if $(SILENT_IS_ON),, -v) $(1))
+   hs_unsafe_crossloop = ${if $(1),${if $(2),for item in ${call hs_quote_each,$(1)}; do ${call $(2),"$$item"}; done,},}
 endif
 
 # potential common use variables
index 9543590..98e228f 100644 (file)
@@ -41,12 +41,7 @@ realclean:
        cd libffi-3.0.11 && $(MAKE) realclean
 
 distclean:
-       cd freetype-2.3.12 && $(MAKE) distclean
-       cd libpng-1.6.12 && $(MAKE) distclean
-       cd zlib-1.2.8 && $(MAKE) distclean
-       cd jpeg-9a && $(MAKE) distclean
-       cd libungif-4.1.1 && $(MAKE) distclean
-       cd libffi-3.0.11 && $(MAKE) distclean
+       $(MAKE) -f $(_CF_DIR)Cleanfile distclean distclean_all_subdirs
 
 Makefile: ;
 $(_CF_DIR)crossplatform.mk: ;
index 70a23aa..b667259 100644 (file)
@@ -317,8 +317,8 @@ clean: cleantarget
 realclean: cleantarget
        $(call rmr,$(OBJ))
 
-distclean: cleantarget
-       $(call rmr,obj/)
+distclean:
+       $(_MAKE) -f $(_CF_DIR)Cleanfile distclean distclean_all_subdirs
 
 Makefile: ;
 $(_CF_DIR)crossplatform.mk: ;
index 087fbaa..340a33e 100644 (file)
@@ -357,8 +357,8 @@ clean: cleantarget
 realclean: cleantarget
        $(call rmr,$(OBJ))
 
-distclean: cleantarget
-       $(call rmr,obj/)
+distclean:
+       $(_MAKE) -f $(_CF_DIR)Cleanfile distclean distclean_all_subdirs
 
 Makefile: ;
 $(_CF_DIR)crossplatform.mk: ;
index b6bb15e..5a62971 100644 (file)
@@ -135,8 +135,8 @@ clean: cleantarget
 realclean: cleantarget
        $(call rmr,$(OBJ))
 
-distclean: cleantarget
-       $(call rmr,obj/)
+distclean:
+       $(_MAKE) -f $(_CF_DIR)Cleanfile distclean distclean_all_subdirs
 
 Makefile: ;
 $(_CF_DIR)crossplatform.mk: ;
index 87767b3..65a8f23 100644 (file)
@@ -195,8 +195,8 @@ clean: cleantarget
 realclean: cleantarget
        $(call rmr,$(OBJ))
 
-distclean: cleantarget
-       $(call rmr,obj/)
+distclean:
+       $(_MAKE) -f $(_CF_DIR)Cleanfile distclean distclean_all_subdirs
 
 Makefile: ;
 $(_CF_DIR)crossplatform.mk: ;
index 9b40bbd..dc9b4a9 100644 (file)
@@ -102,8 +102,8 @@ clean: cleantarget
 realclean: cleantarget
        $(call rmr,$(OBJ))
 
-distclean: cleantarget
-       $(call rmr,obj/)
+distclean:
+       $(_MAKE) -f $(_CF_DIR)Cleanfile distclean distclean_all_subdirs
 
 Makefile: ;
 $(_CF_DIR)crossplatform.mk: ;
index 1122f40..7a753ca 100644 (file)
@@ -193,8 +193,8 @@ clean: cleantarget
 realclean: cleantarget
        $(call rmr,$(OBJ))
 
-distclean: cleantarget
-       $(call rmr,obj/)
+distclean:
+       $(_MAKE) -f $(_CF_DIR)Cleanfile distclean distclean_all_subdirs
 
 Makefile: ;
 $(_CF_DIR)crossplatform.mk: ;
index 128d78d..85ea4ac 100644 (file)
@@ -244,8 +244,8 @@ clean: cleantarget
 realclean: cleantarget
        $(call rmr,$(OBJ))
 
-distclean: cleantarget
-       $(call rmr,obj/)
+distclean:
+       $(_MAKE) -f $(_CF_DIR)Cleanfile distclean distclean_all_subdirs
 
 Makefile: ;
 $(_CF_DIR)crossplatform.mk: ;
index 6a23fb6..2fb182c 100644 (file)
@@ -31,8 +31,7 @@ realclean:
        cd cmd && $(MAKE) realclean
 
 distclean:
-       cd extract && $(MAKE) distclean
-       cd cmd && $(MAKE) distclean
+       $(MAKE) -f $(_CF_DIR)Cleanfile distclean distclean_all_subdirs
 
 Makefile: ;
 $(_CF_DIR)crossplatform.mk: ;
index 157f31d..4e63001 100644 (file)
@@ -171,8 +171,8 @@ clean: cleantarget
 realclean: cleantarget
        $(call rmr,$(OBJ))
 
-distclean: cleantarget
-       $(call rmr,obj/)
+distclean:
+       $(_MAKE) -f $(_CF_DIR)Cleanfile distclean distclean_all_subdirs
 
 Makefile: ;
 $(_CF_DIR)crossplatform.mk: ;
index ecf1308..521bf8e 100644 (file)
@@ -267,8 +267,8 @@ clean: cleantarget
 realclean: cleantarget
        $(call rmr,$(OBJ))
 
-distclean: cleantarget
-       $(call rmr,obj/)
+distclean:
+       $(_MAKE) -f $(_CF_DIR)Cleanfile distclean distclean_all_subdirs
 
 Makefile: ;
 $(_CF_DIR)crossplatform.mk: ;
index c180a3b..4de114a 100644 (file)
@@ -2061,8 +2061,8 @@ realclean: cleantarget
        $(MAKE) -f Makefile.ecereCOM realclean
        $(MAKE) -f Makefile.vanilla realclean
 
-distclean: cleantarget
-       $(call rmr,obj/)
+distclean:
+       $(_MAKE) -f $(_CF_DIR)Cleanfile distclean distclean_all_subdirs
 
 Makefile: ;
 $(_CF_DIR)crossplatform.mk: ;
index affbbe2..a05d012 100644 (file)
@@ -278,8 +278,8 @@ clean: cleantarget
 realclean: cleantarget
        $(call rmr,$(OBJ))
 
-distclean: cleantarget
-       $(call rmr,obj/)
+distclean:
+       $(_MAKE) -f $(_CF_DIR)Cleanfile distclean distclean_all_subdirs
 
 Makefile.bootstrap: ;
 $(_CF_DIR)crossplatform.mk: ;
index 71b0818..9d76a8d 100644 (file)
@@ -343,8 +343,8 @@ clean: cleantarget
 realclean: cleantarget
        $(call rmr,$(OBJ))
 
-distclean: cleantarget
-       $(call rmr,obj/)
+distclean:
+       $(_MAKE) -f $(_CF_DIR)Cleanfile distclean distclean_all_subdirs
 
 Makefile.ecereCOM: ;
 $(_CF_DIR)crossplatform.mk: ;
index 8840653..bd63393 100644 (file)
@@ -1862,8 +1862,8 @@ clean: cleantarget
 realclean: cleantarget
        $(call rmr,$(OBJ))
 
-distclean: cleantarget
-       $(call rmr,obj/)
+distclean:
+       +$(call cdmake,./,-f $(_CF_DIR)Cleanfile distclean distclean_all_subdirs)
 
 Makefile.installer: ;
 $(_CF_DIR)crossplatform.mk: ;
index 4bd81fd..aeaaf47 100644 (file)
@@ -1470,8 +1470,8 @@ clean: cleantarget
 realclean: cleantarget
        $(call rmr,$(OBJ))
 
-distclean: cleantarget
-       $(call rmr,obj/)
+distclean:
+       $(_MAKE) -f $(_CF_DIR)Cleanfile distclean distclean_all_subdirs
 
 Makefile.vanilla: ;
 $(_CF_DIR)crossplatform.mk: ;
index faf53de..6c44e21 100644 (file)
@@ -40,11 +40,7 @@ ifdef EDASQLiteCipher
 endif
 
 distclean:
-       cd libeda && $(MAKE) distclean
-       cd drivers && cd sqlite && $(MAKE) distclean
-ifdef EDASQLiteCipher
-       cd drivers && cd sqliteCipher && $(MAKE) distclean
-endif
+       $(MAKE) -f $(_CF_DIR)Cleanfile distclean distclean_all_subdirs
 
 Makefile: ;
 $(_CF_DIR)crossplatform.mk: ;
index 97112a2..808d9b3 100644 (file)
@@ -223,8 +223,8 @@ clean: cleantarget
 realclean: cleantarget
        $(call rmr,$(OBJ))
 
-distclean: cleantarget
-       $(call rmr,obj/)
+distclean:
+       $(_MAKE) -f $(_CF_DIR)Cleanfile distclean distclean_all_subdirs
 
 Makefile: ;
 $(_CF_DIR)crossplatform.mk: ;
index e8c1e1a..1144080 100644 (file)
@@ -248,8 +248,8 @@ clean: cleantarget
 realclean: cleantarget
        $(call rmr,$(OBJ))
 
-distclean: cleantarget
-       $(call rmr,obj/)
+distclean:
+       $(_MAKE) -f $(_CF_DIR)Cleanfile distclean distclean_all_subdirs
 
 Makefile: ;
 $(_CF_DIR)crossplatform.mk: ;
index 347a8b6..725dfea 100644 (file)
@@ -266,8 +266,8 @@ clean: cleantarget
 realclean: cleantarget
        $(call rmr,$(OBJ))
 
-distclean: cleantarget
-       $(call rmr,obj/)
+distclean:
+       $(_MAKE) -f $(_CF_DIR)Cleanfile distclean distclean_all_subdirs
 
 Makefile: ;
 $(_CF_DIR)crossplatform.mk: ;
index 4fee52c..4290681 100644 (file)
@@ -240,8 +240,8 @@ clean: cleantarget
 realclean: cleantarget
        $(call rmr,$(OBJ))
 
-distclean: cleantarget
-       $(call rmr,obj/)
+distclean:
+       $(_MAKE) -f $(_CF_DIR)Cleanfile distclean distclean_all_subdirs
 
 Makefile: ;
 $(_CF_DIR)crossplatform.mk: ;
index 40c735b..e29be27 100644 (file)
@@ -738,8 +738,8 @@ endif
 realclean: cleantarget
        $(call rmr,$(OBJ))
 
-distclean: cleantarget
-       $(call rmr,obj/)
+distclean:
+       $(_MAKE) -f $(_CF_DIR)Cleanfile distclean distclean_all_subdirs
 
 Makefile: ;
 $(_CF_DIR)crossplatform.mk: ;
index 92bd356..5f14944 100644 (file)
@@ -3610,6 +3610,9 @@ private:
             f.Printf("\t$(call rmdir,%s)\n", targetDirExpNoSpaces);
          if(!relObjDir)
             f.Puts("\t$(call rmr,obj/)\n");
+         f.Puts("\t$(call rmr,.configs/)\n");
+         f.Puts("\t$(call rm,*.ews)\n");
+         f.Puts("\t$(call rm,*.Makefile)\n");
 
          delete f;
 
index 244d3fb..5cc4277 100644 (file)
@@ -6237,8 +6237,8 @@ endif
 realclean: cleantarget
        $(call rmr,$(OBJ))
 
-distclean: cleantarget
-       $(call rmr,obj/)
+distclean:
+       $(_MAKE) -f $(_CF_DIR)Cleanfile distclean distclean_all_subdirs
 
 Makefile: ;
 $(_CF_DIR)crossplatform.mk: ;