From 7840268dfdea02554f683016569e82b3466ccb18 Mon Sep 17 00:00:00 2001 From: Chris Koeritz Date: Mon, 3 Oct 2016 16:39:48 -0400 Subject: [PATCH] checkpoint before running clean prior to launching new cleaning script; want to make sure it doesn't go rogue. --- doc/clam_manual/clam_docs.html | 2 +- nucleus/library/security/dll_security.h | 4 +-- nucleus/library/tests_algorithms/makefile | 2 +- nucleus/library/tests_basis/makefile | 2 +- nucleus/library/tests_filesystem/makefile | 2 +- nucleus/library/tests_mathematics/makefile | 2 +- nucleus/library/tests_nodes/makefile | 2 +- nucleus/library/tests_timely/makefile | 2 +- scripts/archival/snarf_feisty_meow.pl | 3 +-- scripts/clam/clean_subdirs.sh | 31 ++++++++++++++++++++++ scripts/clam/rules.def | 5 +++- 11 files changed, 45 insertions(+), 12 deletions(-) create mode 100644 scripts/clam/clean_subdirs.sh diff --git a/doc/clam_manual/clam_docs.html b/doc/clam_manual/clam_docs.html index caee455a..cce1f292 100644 --- a/doc/clam_manual/clam_docs.html +++ b/doc/clam_manual/clam_docs.html @@ -2157,7 +2157,7 @@ time_sta.cpp
TARGETS = mechanisms.dll
LOCAL_LIBS_USED = basis
- DEFINITIONS += BUILD_MECHANISMS USE_HOOPLE_DLLS

+ DEFINITIONS += BUILD_MECHANISMS USE_FEISTY_MEOW_DLLS

include cpp/rules.def

diff --git a/nucleus/library/security/dll_security.h b/nucleus/library/security/dll_security.h index da26a14c..c4a405b7 100644 --- a/nucleus/library/security/dll_security.h +++ b/nucleus/library/security/dll_security.h @@ -23,11 +23,11 @@ // windows class tags for the data structures library: // define BUILD_SECURITY when you are creating the dll and -// define USE_HOOPLE_DLLS when you are importing a class from the dll. +// define USE_FEISTY_MEOW_DLLS when you are importing a class from the dll. #ifdef BUILD_SECURITY #define HOOPLE_DLL_EXPORT_CLASS #define HOOPLE_DLL_EXPORT_FUNCTION -#elif defined(USE_HOOPLE_DLLS) +#elif defined(USE_FEISTY_MEOW_DLLS) #define HOOPLE_DLL_IMPORT_CLASS #define HOOPLE_DLL_IMPORT_FUNCTION #else diff --git a/nucleus/library/tests_algorithms/makefile b/nucleus/library/tests_algorithms/makefile index 46f442b3..fbf3be4f 100644 --- a/nucleus/library/tests_algorithms/makefile +++ b/nucleus/library/tests_algorithms/makefile @@ -3,7 +3,7 @@ include cpp/variables.def PROJECT = tests_algorithms TYPE = test TARGETS = test_sorts.exe -DEFINITIONS += USE_HOOPLE_DLLS +DEFINITIONS += USE_FEISTY_MEOW_DLLS LOCAL_LIBS_USED = unit_test application processes loggers configuration mathematics nodes \ structures textual timely filesystem structures basis RUN_TARGETS = $(ACTUAL_TARGETS) diff --git a/nucleus/library/tests_basis/makefile b/nucleus/library/tests_basis/makefile index 16165886..6c322004 100644 --- a/nucleus/library/tests_basis/makefile +++ b/nucleus/library/tests_basis/makefile @@ -5,7 +5,7 @@ TYPE = test SOURCE = checkup.cpp TARGETS = test_array.exe test_boilerplate.exe test_mutex.exe test_string.exe \ test_system_preconditions.exe -DEFINITIONS += USE_HOOPLE_DLLS +DEFINITIONS += USE_FEISTY_MEOW_DLLS LOCAL_LIBS_USED = unit_test application processes loggers configuration mathematics nodes \ structures textual timely filesystem structures basis RUN_TARGETS = $(ACTUAL_TARGETS) diff --git a/nucleus/library/tests_filesystem/makefile b/nucleus/library/tests_filesystem/makefile index fb7e2a97..fb163a75 100644 --- a/nucleus/library/tests_filesystem/makefile +++ b/nucleus/library/tests_filesystem/makefile @@ -4,7 +4,7 @@ PROJECT = tests_filesystem TYPE = test TARGETS = test_byte_filer.exe test_directory.exe test_directory_tree.exe test_file_info.exe \ test_file_time.exe test_filename.exe test_huge_file.exe -DEFINITIONS += USE_HOOPLE_DLLS +DEFINITIONS += USE_FEISTY_MEOW_DLLS LOCAL_LIBS_USED = unit_test application configuration filesystem loggers \ mathematics nodes processes structures textual timely structures basis \ loggers diff --git a/nucleus/library/tests_mathematics/makefile b/nucleus/library/tests_mathematics/makefile index bef10eb2..4fb032a4 100644 --- a/nucleus/library/tests_mathematics/makefile +++ b/nucleus/library/tests_mathematics/makefile @@ -3,7 +3,7 @@ include cpp/variables.def PROJECT = tests_mathematics TYPE = test TARGETS = test_chaos.exe test_double_plus.exe test_math_ops.exe -DEFINITIONS += USE_HOOPLE_DLLS +DEFINITIONS += USE_FEISTY_MEOW_DLLS LOCAL_LIBS_USED = unit_test application configuration filesystem loggers mathematics nodes \ structures processes textual timely structures basis RUN_TARGETS = $(ACTUAL_TARGETS) diff --git a/nucleus/library/tests_nodes/makefile b/nucleus/library/tests_nodes/makefile index 30ddb492..a8c2e75e 100644 --- a/nucleus/library/tests_nodes/makefile +++ b/nucleus/library/tests_nodes/makefile @@ -4,7 +4,7 @@ PROJECT = tests_node TYPE = test TARGETS = test_list.exe test_node.exe test_packable_tree.exe test_symbol_tree.exe test_tree.exe LOCAL_LIBS_USED = unit_test application nodes loggers processes filesystem configuration timely textual structures basis -DEFINITIONS += USE_HOOPLE_DLLS +DEFINITIONS += USE_FEISTY_MEOW_DLLS RUN_TARGETS = $(ACTUAL_TARGETS) include cpp/rules.def diff --git a/nucleus/library/tests_timely/makefile b/nucleus/library/tests_timely/makefile index a5e17ec0..f3690f45 100644 --- a/nucleus/library/tests_timely/makefile +++ b/nucleus/library/tests_timely/makefile @@ -3,7 +3,7 @@ include cpp/variables.def PROJECT = tests_timely TYPE = test TARGETS = test_earth_time.exe test_stopwatch.exe -DEFINITIONS += USE_HOOPLE_DLLS +DEFINITIONS += USE_FEISTY_MEOW_DLLS LOCAL_LIBS_USED = unit_test application processes loggers configuration mathematics nodes \ structures textual timely filesystem structures basis RUN_TARGETS = $(ACTUAL_TARGETS) diff --git a/scripts/archival/snarf_feisty_meow.pl b/scripts/archival/snarf_feisty_meow.pl index 1785a958..c532dddb 100644 --- a/scripts/archival/snarf_feisty_meow.pl +++ b/scripts/archival/snarf_feisty_meow.pl @@ -25,7 +25,7 @@ use Env qw(HOME); local($number) = &retrieve_number("aa_backup"); # variables used throughout here. -local($snarf_file_base) = &snarf_prefix("feisty_meow"); +local($snarf_file_base) = &snarf_prefix("archived_feisty_meow"); local($snarf_file) = &snarf_name($snarf_file_base, $number); # store the archive number in the file for retrieval on the other side. @@ -49,7 +49,6 @@ local($root) = &canonicalize("$HOME/feisty_meow"); &backup_hierarchy($snarf_file_base, $number, $root, "kona"); &backup_hierarchy($snarf_file_base, $number, $root, "nucleus"); &backup_hierarchy($snarf_file_base, $number, $root, "octopi"); -&backup_hierarchy($snarf_file_base, $number, $root, "osgi"); &backup_hierarchy($snarf_file_base, $number, $root, "scripts"); &backup_hierarchy($snarf_file_base, $number, $root, "webby"); diff --git a/scripts/clam/clean_subdirs.sh b/scripts/clam/clean_subdirs.sh new file mode 100644 index 00000000..dd06d0c9 --- /dev/null +++ b/scripts/clam/clean_subdirs.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +# travels down each subdirectory and cleans using make. +function clean_subdirectories() +{ + # keep the variable local to avoid contaminating + # other runs. + local smoot87 + + # find all the subdirectories. + for smoot87 in $(find . -mindepth 1 -maxdepth 1 -type f); do +echo name is $i + +# # skip if not a directory. +# if [ ! -d "$smoot87" ]; then continue; fi +#echo "inside first check of it being dir: $smoot87" + + # make sure there's a makefile there. + if [ -f "$smoot87/$MAKEFILE_NAME" ]; then +echo "inside barriers, with filename=$smoot87 and all conditions met." + pushd "$smoot87" + make --silent NOT_FIRST_MAKE=t -f $MAKEFILE_NAME clean + else + echo "Skipping makefile-less directory $smoot87..." + fi + done +} + +# execute our function on current directory. +clean_subdirectories + diff --git a/scripts/clam/rules.def b/scripts/clam/rules.def index a526fb1f..c4851ca8 100644 --- a/scripts/clam/rules.def +++ b/scripts/clam/rules.def @@ -110,12 +110,15 @@ 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: set_cleaner_variable clean_subdirs $(OTHER_CLEANS) ready_to_clean +clean: set_cleaner_variable $(OTHER_CLEANS) scratch_other_cleans clean_subdirs ready_to_clean # no code here. set_cleaner_variable: $(eval CLEAN := true) +scratch_other_cleans: + $(eval OTHER_CLEANS := ) + ready_to_clean: @echo Whacking [$(CLEANUPS)] $(HIDESH) -c '\ -- 2.34.1