X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Fclam%2Frules.def;fp=scripts%2Fclam%2Frules.def;h=a526fb1f392a53c82c768a1ab43dab852f6d93a6;hb=d87617f212d9dff8d5033b81e19a0740846999fe;hp=e9f91b155d5aa7ee70d4107ed9a323a480b8a0d4;hpb=4416905a08e10cc1bd70336c5fbcb3aee9186b2a;p=feisty_meow.git diff --git a/scripts/clam/rules.def b/scripts/clam/rules.def index e9f91b15..a526fb1f 100644 --- a/scripts/clam/rules.def +++ b/scripts/clam/rules.def @@ -110,10 +110,13 @@ exit 0' # files and such that were created by the project. it invokes the makefile # again with the CLEAN variable defined so that this can be passed down into # all subsequent makes. -clean: - $(HIDER)$(MAKE) --silent CLEAN=t ready_to_clean +clean: set_cleaner_variable clean_subdirs $(OTHER_CLEANS) ready_to_clean + # no code here. -ready_to_clean: $(OTHER_CLEANS) clean_subdirs +set_cleaner_variable: + $(eval CLEAN := true) + +ready_to_clean: @echo Whacking [$(CLEANUPS)] $(HIDESH) -c '\ echo the other cleans were: $(OTHER_CLEANS); \ @@ -127,9 +130,12 @@ fi' # "clean_subdirs" travels down each subdirectory and cleans using make. clean_subdirs: $(HIDESH) -c '\ -for i in *; do \ - if [ -d "$$i" ]; then \ - if [ -f "$$i/$(MAKEFILE_NAME)" -a ! "$$i" -ef `pwd` ]; then \ +for smoot87 in *; do \ + if [ -d "$$smoot87" ]; then \ +echo "got inside first check of it being dir: $$smoot87"; \ + if [ -f "$$smoot87/$(MAKEFILE_NAME)" -a ! "$$smoot87" -ef `pwd` ]; then \ +echo "got inside barriers, with filename=$$smoot87 and all conditions met."; \ +echo "the interesting one was: [$(test ! "$$smoot87" -ef `pwd` )]"; \ (cd "$$i"; $(MAKE) --silent NOT_FIRST_MAKE=t -f $(MAKEFILE_NAME) clean); \ else \ echo "Skipping makefile-less directory $$i..."; \