From 960e4d8f948ecb537970cba0bed57f1142f1f0b6 Mon Sep 17 00:00:00 2001 From: Chris Koeritz Date: Mon, 3 Oct 2016 20:55:11 -0400 Subject: [PATCH] solved all known make clean issues ha, much nicer now. everything is cleaning right, and the code looks good. moved the too knowledgeable pieces out of the base clam code and into cpp. nice. --- scripts/clam/cpp/rules.def | 4 +++- scripts/clam/rules.def | 14 ++++++-------- scripts/generator/produce_feisty_meow.sh | 3 ++- scripts/generator/whack_build.sh | 5 +++++ 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/scripts/clam/cpp/rules.def b/scripts/clam/cpp/rules.def index 64f2dde5..acbf13c2 100644 --- a/scripts/clam/cpp/rules.def +++ b/scripts/clam/cpp/rules.def @@ -455,8 +455,10 @@ include rules.def cpp_add_to_cleanups_variable: # echo here is actual targets before hand $(ACTUAL_TARGETS) - $(eval CLEANUPS = $(ACTUAL_TARGETS:$(STATIC_LIBRARY_DIR)/%.library=$(STATIC_LIBRARY_DIR)/$(LIB_PREFIX)%.a) $(CLEANUPS) ) + $(eval CLEANUPS = $(ACTUAL_TARGETS:%.exe=%) $(ACTUAL_TARGETS:$(STATIC_LIBRARY_DIR)/%.library=$(STATIC_LIBRARY_DIR)/$(LIB_PREFIX)%.a) $(CLEANUPS) ) # echo "IN CPP, new CLEANUPS variable: $(CLEANUPS)" +#fodder for anything missing a cleanup. +# $(eval CLEANUPS = $(ACTUAL_TARGETS) $(ACTUAL_TARGETS:%.dll=%.so) $(ACTUAL_TARGETS:%.so=%.dll) $(CLEANUPS) ) #dynamic is taken care of in clam base still? #DYNAMIC_LIBRARY_DIR diff --git a/scripts/clam/rules.def b/scripts/clam/rules.def index b4074796..7258fc22 100644 --- a/scripts/clam/rules.def +++ b/scripts/clam/rules.def @@ -112,17 +112,15 @@ scratch_other_cleans: # 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) -# echo "going to add to cleanup variable now with the actual targets as $(ACTUAL_TARGETS)" - $(eval CLEANUPS = $(ACTUAL_TARGETS) $(ACTUAL_TARGETS:%.exe=%) $(ACTUAL_TARGETS:%.dll=%.so) $(ACTUAL_TARGETS:%.so=%.dll) $(CLEANUPS) ) + $(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)" -#hmmm: above is very code knowledgeable. -# we should have a working mechanism for doing a specialized -# type of cleanups addition, so we should rely on that instead of doing it above. -# guard the main cleaning task with our variable -# so we do not pull in subtargets when we do not want to. +# main cleaning task. ready_to_clean: - @echo Whacking [$(CLEANUPS)] +ifneq "$(CLEANUPS)" "" + @echo Whacking [$(notdir $(CLEANUPS))] +endif $(HIDESH) -c '\ if [ ! -z "$(CLEANUPS)" ]; then \ for spork19 in $(CLEANUPS) nonexistentishfileforlist; do \ diff --git a/scripts/generator/produce_feisty_meow.sh b/scripts/generator/produce_feisty_meow.sh index 34a5ebd1..cd5ed651 100644 --- a/scripts/generator/produce_feisty_meow.sh +++ b/scripts/generator/produce_feisty_meow.sh @@ -254,7 +254,8 @@ echo "The build binaries have been re-created (or were already present)." # we won't do the full build if they told us to just do the bootstrap. if [ -z "$JUST_BOOTSTRAP_APPS" ]; then echo Cleaning up the temporary files that were built. - bash "$BUILD_SCRIPTS_DIR/whack_build.sh" clean + bash "$BUILD_SCRIPTS_DIR/whack_build.sh" +#wrong! we don't want to whack it all. clean # recreate our useful junk directories... mkdir -p "$GENERATED_DIR" diff --git a/scripts/generator/whack_build.sh b/scripts/generator/whack_build.sh index f0830a94..fb782772 100644 --- a/scripts/generator/whack_build.sh +++ b/scripts/generator/whack_build.sh @@ -50,11 +50,16 @@ function whack_single_build_area() "$PRODUCTION_DIR/install" \ "$PRODUCTION_DIR/logs" \ "$PRODUCTION_DIR/waste" +# last few mentioning production dir are to clean older code. # echo $(date): " cleaning generated files in source hierarchy..." if [ "$clean_src" == "clean" -o "$clean_src" == "CLEAN" ]; then echo $(date): " ** aggressive cleaning activated..." + + # get rid of the build binaries. + rm -rf "$CLAM_BINARY_DIR" + perl "$FEISTY_MEOW_SCRIPTS/files/zapdirs.pl" "$FEISTY_MEOW_APEX" >>"$CRUDFILE" fi -- 2.34.1