# 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); \
# "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..."; \