checkpoint before running clean
[feisty_meow.git] / scripts / clam / rules.def
index a6f65b5b3180dfb9c4a0b969e55cf3174d4cd610..c4851ca8487378e057c9bab6405baf6ca4a67718 100644 (file)
@@ -79,7 +79,7 @@ endif
 ifeq "$(NOT_FIRST_MAKE)" ""
        $(HIDESH) -c '\
 if [ ! -f "$(FAILURE_FILE)" ]; then \
-  $(SHELL) $(CLAM_DIR)/sound_play.sh $(CLAM_FINISH_SOUND); \
+  $(SHELL) $(FEISTY_MEOW_SCRIPTS)/multimedia/sound_play.sh $(CLAM_FINISH_SOUND); \
 fi'
 endif
 # toss the flag files so we do not see them again.
@@ -110,14 +110,20 @@ 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 $(OTHER_CLEANS) scratch_other_cleans clean_subdirs  ready_to_clean
+       # no code here.
 
-ready_to_clean: $(OTHER_CLEANS) clean_subdirs
+set_cleaner_variable:
+       $(eval CLEAN := true)
+
+scratch_other_cleans:
+       $(eval OTHER_CLEANS := )
+
+ready_to_clean:
        @echo Whacking [$(CLEANUPS)]
        $(HIDESH) -c '\
 echo the other cleans were: $(OTHER_CLEANS); \
-echo the clean list is: $(CLEANUPS); \
+echo the cleanup removal list is: $(CLEANUPS); \
 if [ ! -z "$(CLEANUPS)" ]; then \
   for i in $(CLEANUPS) nonexistentishfileforlist; do \
     rm -rf "$$i"; \
@@ -127,9 +133,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..."; \