From: Rejean Loyer Date: Tue, 14 Apr 2015 13:38:23 +0000 (-0400) Subject: buildsystem,makefiles,tarball: improve distclean targets to remove .configs/, *.ews... X-Git-Tag: 0.44.15~130 X-Git-Url: https://ecere.com/cgi-bin/gitweb.cgi?p=sdk;a=commitdiff_plain;h=bd85aa128c2be5f6cd27b8df419f166dea487333 buildsystem,makefiles,tarball: improve distclean targets to remove .configs/, *.ews and *.Makefile as well as obj/. generate makefiles accordingly. --- diff --git a/Cleanfile b/Cleanfile new file mode 100644 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 diff --git a/Makefile b/Makefile index b0c2198..94ca401 100644 --- 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 diff --git a/audio/Makefile b/audio/Makefile index ef0a313..a5749df 100644 --- a/audio/Makefile +++ b/audio/Makefile @@ -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: ; diff --git a/compiler/Makefile b/compiler/Makefile index a9703d5..4f85892 100644 --- a/compiler/Makefile +++ b/compiler/Makefile @@ -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: ; diff --git a/compiler/bootstrap/Makefile b/compiler/bootstrap/Makefile index a3adc4a..a5577d0 100644 --- a/compiler/bootstrap/Makefile +++ b/compiler/bootstrap/Makefile @@ -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: ; diff --git a/compiler/bootstrap/ecc/Makefile b/compiler/bootstrap/ecc/Makefile index 98b8811..5ebd427 100644 --- a/compiler/bootstrap/ecc/Makefile +++ b/compiler/bootstrap/ecc/Makefile @@ -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: ; diff --git a/compiler/bootstrap/ecere/Makefile b/compiler/bootstrap/ecere/Makefile index 9be6e00..3576083 100644 --- a/compiler/bootstrap/ecere/Makefile +++ b/compiler/bootstrap/ecere/Makefile @@ -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: ; diff --git a/compiler/bootstrap/ecp/Makefile b/compiler/bootstrap/ecp/Makefile index f0ccd8f..a558dd6 100644 --- a/compiler/bootstrap/ecp/Makefile +++ b/compiler/bootstrap/ecp/Makefile @@ -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: ; diff --git a/compiler/bootstrap/ecs/Makefile b/compiler/bootstrap/ecs/Makefile index ed53c07..a9ea6da 100644 --- a/compiler/bootstrap/ecs/Makefile +++ b/compiler/bootstrap/ecs/Makefile @@ -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: ; diff --git a/compiler/bootstrap/libec/Makefile b/compiler/bootstrap/libec/Makefile index c38359b..6ad21f8 100644 --- a/compiler/bootstrap/libec/Makefile +++ b/compiler/bootstrap/libec/Makefile @@ -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: ; diff --git a/compiler/ecc/Makefile b/compiler/ecc/Makefile index 9161def..84d1200 100644 --- a/compiler/ecc/Makefile +++ b/compiler/ecc/Makefile @@ -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: ; diff --git a/compiler/ecc/Makefile.bootstrap b/compiler/ecc/Makefile.bootstrap index a9082af..8aac596 100644 --- a/compiler/ecc/Makefile.bootstrap +++ b/compiler/ecc/Makefile.bootstrap @@ -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: ; diff --git a/compiler/ecp/Makefile b/compiler/ecp/Makefile index 0d4dab0..d8b3f45 100644 --- a/compiler/ecp/Makefile +++ b/compiler/ecp/Makefile @@ -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: ; diff --git a/compiler/ecp/Makefile.bootstrap b/compiler/ecp/Makefile.bootstrap index 3a13d82..6441d7a 100644 --- a/compiler/ecp/Makefile.bootstrap +++ b/compiler/ecp/Makefile.bootstrap @@ -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: ; diff --git a/compiler/ecs/Makefile b/compiler/ecs/Makefile index 2e0af28..07e61f1 100644 --- a/compiler/ecs/Makefile +++ b/compiler/ecs/Makefile @@ -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: ; diff --git a/compiler/ecs/Makefile.bootstrap b/compiler/ecs/Makefile.bootstrap index 791a836..b7d703a 100644 --- a/compiler/ecs/Makefile.bootstrap +++ b/compiler/ecs/Makefile.bootstrap @@ -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: ; diff --git a/compiler/libec/Makefile b/compiler/libec/Makefile index b8aa277..3b4fe97 100644 --- a/compiler/libec/Makefile +++ b/compiler/libec/Makefile @@ -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: ; diff --git a/compiler/libec/Makefile.bootstrap b/compiler/libec/Makefile.bootstrap index 7f0c350..0227592 100644 --- a/compiler/libec/Makefile.bootstrap +++ b/compiler/libec/Makefile.bootstrap @@ -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: ; diff --git a/crossplatform.mk b/crossplatform.mk index 8e9324b..769ac63 100644 --- a/crossplatform.mk +++ b/crossplatform.mk @@ -162,11 +162,12 @@ COMPILER_SUFFIX = .$(COMPILER)$(ARCH_SUFFIX) endif endif -# MISC STRING TOOLS +# STRING TOOLS empty := esc := $(empty)$(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)$(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,,) +# hs_crossloop will call 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 diff --git a/deps/Makefile b/deps/Makefile index 9543590..98e228f 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -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: ; diff --git a/deps/freetype-2.3.12/Makefile b/deps/freetype-2.3.12/Makefile index 70a23aa..b667259 100644 --- a/deps/freetype-2.3.12/Makefile +++ b/deps/freetype-2.3.12/Makefile @@ -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: ; diff --git a/deps/jpeg-9a/Makefile b/deps/jpeg-9a/Makefile index 087fbaa..340a33e 100644 --- a/deps/jpeg-9a/Makefile +++ b/deps/jpeg-9a/Makefile @@ -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: ; diff --git a/deps/libffi-3.0.11/Makefile b/deps/libffi-3.0.11/Makefile index b6bb15e..5a62971 100644 --- a/deps/libffi-3.0.11/Makefile +++ b/deps/libffi-3.0.11/Makefile @@ -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: ; diff --git a/deps/libpng-1.6.12/Makefile b/deps/libpng-1.6.12/Makefile index 87767b3..65a8f23 100644 --- a/deps/libpng-1.6.12/Makefile +++ b/deps/libpng-1.6.12/Makefile @@ -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: ; diff --git a/deps/libungif-4.1.1/Makefile b/deps/libungif-4.1.1/Makefile index 9b40bbd..dc9b4a9 100644 --- a/deps/libungif-4.1.1/Makefile +++ b/deps/libungif-4.1.1/Makefile @@ -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: ; diff --git a/deps/zlib-1.2.8/Makefile b/deps/zlib-1.2.8/Makefile index 1122f40..7a753ca 100644 --- a/deps/zlib-1.2.8/Makefile +++ b/deps/zlib-1.2.8/Makefile @@ -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: ; diff --git a/documentor/Makefile b/documentor/Makefile index 128d78d..85ea4ac 100644 --- a/documentor/Makefile +++ b/documentor/Makefile @@ -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: ; diff --git a/ear/Makefile b/ear/Makefile index 6a23fb6..2fb182c 100644 --- a/ear/Makefile +++ b/ear/Makefile @@ -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: ; diff --git a/ear/cmd/Makefile b/ear/cmd/Makefile index 157f31d..4e63001 100644 --- a/ear/cmd/Makefile +++ b/ear/cmd/Makefile @@ -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: ; diff --git a/ear/extract/Makefile b/ear/extract/Makefile index ecf1308..521bf8e 100644 --- a/ear/extract/Makefile +++ b/ear/extract/Makefile @@ -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: ; diff --git a/ecere/Makefile b/ecere/Makefile index c180a3b..4de114a 100644 --- a/ecere/Makefile +++ b/ecere/Makefile @@ -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: ; diff --git a/ecere/Makefile.bootstrap b/ecere/Makefile.bootstrap index affbbe2..a05d012 100644 --- a/ecere/Makefile.bootstrap +++ b/ecere/Makefile.bootstrap @@ -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: ; diff --git a/ecere/Makefile.ecereCOM b/ecere/Makefile.ecereCOM index 71b0818..9d76a8d 100644 --- a/ecere/Makefile.ecereCOM +++ b/ecere/Makefile.ecereCOM @@ -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: ; diff --git a/ecere/Makefile.installer b/ecere/Makefile.installer index 8840653..bd63393 100644 --- a/ecere/Makefile.installer +++ b/ecere/Makefile.installer @@ -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: ; diff --git a/ecere/Makefile.vanilla b/ecere/Makefile.vanilla index 4bd81fd..aeaaf47 100644 --- a/ecere/Makefile.vanilla +++ b/ecere/Makefile.vanilla @@ -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: ; diff --git a/eda/Makefile b/eda/Makefile index faf53de..6c44e21 100644 --- a/eda/Makefile +++ b/eda/Makefile @@ -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: ; diff --git a/eda/drivers/sqlite/Makefile b/eda/drivers/sqlite/Makefile index 97112a2..808d9b3 100644 --- a/eda/drivers/sqlite/Makefile +++ b/eda/drivers/sqlite/Makefile @@ -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: ; diff --git a/eda/drivers/sqliteCipher/Makefile b/eda/drivers/sqliteCipher/Makefile index e8c1e1a..1144080 100644 --- a/eda/drivers/sqliteCipher/Makefile +++ b/eda/drivers/sqliteCipher/Makefile @@ -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: ; diff --git a/eda/libeda/Makefile b/eda/libeda/Makefile index 347a8b6..725dfea 100644 --- a/eda/libeda/Makefile +++ b/eda/libeda/Makefile @@ -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: ; diff --git a/epj2make/Makefile b/epj2make/Makefile index 4fee52c..4290681 100644 --- a/epj2make/Makefile +++ b/epj2make/Makefile @@ -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: ; diff --git a/ide/Makefile b/ide/Makefile index 40c735b..e29be27 100644 --- a/ide/Makefile +++ b/ide/Makefile @@ -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: ; diff --git a/ide/src/project/Project.ec b/ide/src/project/Project.ec index 92bd356..5f14944 100644 --- a/ide/src/project/Project.ec +++ b/ide/src/project/Project.ec @@ -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; diff --git a/installer/Makefile b/installer/Makefile index 244d3fb..5cc4277 100644 --- a/installer/Makefile +++ b/installer/Makefile @@ -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: ;