-ready_to_clean: $(OTHER_CLEANING_TASKS)
- echo hey the other clean should have happened above.
- @echo Whacking [$(CLEANUPS)]
-# @echo could also be cleaning the first and last targets...
-# @echo FIRST_TARGETS=$(FIRST_TARGETS)
-# @echo LAST_TARGETS=$(LAST_TARGETS)
+# add late breaking items to the cleanup list. this is mainly the actual
+# targets to build, since those are not specified until the user makefile
+# is included. we take a liberty here and also add different versions of
+# the file suffixes so we can clean all versions of the targets.
+add_to_cleanups_variable: $(SUPPLEMENTAL_CLEANUP_TARGETS)
+ $(eval CLEANUPS = $(ACTUAL_TARGETS) $(CLEANUPS) )
+# $(eval CLEANUPS = $(ACTUAL_TARGETS) $(ACTUAL_TARGETS:%.exe=%) $(ACTUAL_TARGETS:%.dll=%.so) $(ACTUAL_TARGETS:%.so=%.dll) $(CLEANUPS) )
+# echo "new CLEANUPS variable: $(CLEANUPS)"
+
+# main cleaning task.
+ready_to_clean:
+ifneq "$(CLEANUPS)" ""
+ @echo Whacking [$(notdir $(CLEANUPS))]
+endif